Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Customer experience | Sales, Customer Insights,...
Suggested answer

Adding session information to Marketing Email

(0) ShareShare
ReportReport
Posted on by 35

We have an event with three sessions.

When a customer registers for the event they must select one of the sessions - only one.

I would like to send a confirmation email after registration which lists the session they have chosen.

I have tried using a dynamic variable {{contact.msevtmgt_sessionregistration_contact_msevtmgt_contactid}} but get an error saying I have to use #each.

I have no idea how this is supposed to work and have not been able to find any understandable explanation of how to use this.

I find it odd that something like this is not a "standard" function within the system.

Can anyone help me with setting this up?

Many thanks

Neil Smith

  • Nya Profile Picture
    29,060 on at
    RE: Adding session information to Marketing Email

    Hi,

    Thanks for your sharing!

  • NeilSmith Profile Picture
    35 on at
    RE: Adding session information to Marketing Email

    I have managed to display the name of the registered session by using an if statement to compare the session id obtained by your code with the actual session ids as follows. It took a bit of trial and error but seems to work.

    <p>Your registered session:</p>

    <ul>

    {{#each contact.msevtmgt_sessionregistration_contact_msevtmgt_contactid}}

    {{#if (eq this.msevtmgt_sessionid '<sessionid1>')}}

    <li>Registered session: {{msevtmgt_session(<sessionid1).msevtmgt_name}}</li>

    {{else if (eq this.msevtmgt_sessionid '<sessionid2')}}

    <li>Registered session: {{msevtmgt_session(sessionid2).msevtmgt_name}}</li>

    {{else if (eq this.msevtmgt_sessionid '<sessionid3>')}}

    <li>Registered session: {{msevtmgt_session(<sessionid3>).msevtmgt_name}}</li>

    {{/if}}

    {{/each}}

    </ul>

    Don't know if this is a good method, but it works for me.

    Neil Smith

  • NeilSmith Profile Picture
    35 on at
    RE: Adding session information to Marketing Email

    Hi Nya,

    thanks for that.

    That has enabled me to show the registered session id, which is more than I had earlier.

    I now need to find out how to show the session name instead of the id.

    I'd already seen the link you sent and as I mentioned earlier I didn't rally understand anything.

  • Suggested answer
    Nya Profile Picture
    29,060 on at
    RE: Adding session information to Marketing Email

    Hi Neil Smith,

    Since there is an N:1 relationship between Session Registration entity and Contact entity, the expression you provided cannot indicate a certain session registration record for a contact.

    You can refer to the following section to adjust your expression.

    For-each loops

    The code snippet could be inserted with the Code block element in the email designer.

    pastedimage1639126747541v1.png

    It would be something like:

     

    Your registered session:

      {{#each contact.msevtmgt_sessionregistration_contact_msevtmgt_contactid}}
    • name:{{this.msevtmgt_sessionid}}
    • {{/each}}

    However, it can only show the id of the session. It is previewed as:

    pastedimage1639127266911v2.png

    Since the dynamic content does not support the entity relationships that go beyond one level, only the fields in Session Registration entity can be accessed.

    If you are sure that the contact can only register one session, you can create a lookup field in Contact entity to record the session, so that you can use the expression you provided simply without a code block and show the name of the session directly.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Ramesh Kumar – Community Spotlight

We are honored to recognize Ramesh Kumar as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
Holly Huffman Profile Picture

Holly Huffman 103

#2
Muhammad Shahzad Shafique Profile Picture

Muhammad Shahzad Sh... 96 Most Valuable Professional

#3
Gerardo Rentería García Profile Picture

Gerardo Rentería Ga... 51 Most Valuable Professional

Product updates

Dynamics 365 release plans