web
You’re offline. This is a read only version of the page.
close
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

I have the same question (0)
  • Suggested answer
    Nya Profile Picture
    29,060 on at

    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.

  • NeilSmith Profile Picture
    35 on at

    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.

  • NeilSmith Profile Picture
    35 on at

    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

  • Nya Profile Picture
    29,060 on at

    Hi,

    Thanks for your sharing!

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
Tom_Gioielli Profile Picture

Tom_Gioielli 108 Super User 2025 Season 2

#2
Jimmy Passeti Profile Picture

Jimmy Passeti 50 Most Valuable Professional

#3
Gerardo Rentería García Profile Picture

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

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans