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,...
Answered

E-Mail Dynamic Content

(0) ShareShare
ReportReport
Posted on by 641

Hi,

could someone help me out with a dynamic content expression regarding the event name of the contact? I know it is a 1:N relationship thus we need a {{#each}} loop however I am not able to put this right since I dont know which fields to put in the expression.

Thanks!

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

    Hi,

    First of all, if you’d like to show event name in a marketing email, it is necessary to make sure that the contact is created by event registration of the event. In the Details tab from the form of these contacts, a field called Originating event which specifies a 1: N relationship between Event and Contact. Only Contact generated in Event Registration will automatically populate this field.

     pastedimage1620278176331v1.png

    It means that you cannot show a list of events the contact registered. Only the Originating event can be shown with a dynamic content in the email.

     pastedimage1620278184710v2.png

    The {{#each}} loop can only be used in the entities have a N: 1 relationship with Contact.

     

    For more fields in Event entity shown in marketing email, you can refer to my answer in the following issue:

    https://community.dynamics.com/365/marketing/f/dynamics-365-for-marketing-forum/417212/dynamic-event-information-fields-in-marketing-emails/1143083#1143083

     

    If this helped you, I'd appreciate it if you'd mark this as a Verified Answer, which may in turn help others as well.

    Best Regards,

    Nya

  • janalukic Profile Picture
    70 on at

    Hi Nya,

    is there any way to filter the #each loop? I have a contact who registered for 2 events: EVENT A and EVENT B.

    I want to send a confirmation email and include the registration ID for Event A, yet exclude Event B.

    What I tried to do is create a segment

    "Registrations for Event A", hoping that this would do the trick. Unfortunately this did not work (please see details below)

    Is there anything else that can be applied to use #each loop yet filter the criteria?

    pastedimage1643036279659v1.png

      <ul style="color: #3575d3">
        {{#each
    contact.msevtmgt_eventregistration_contact_msevtmgt_contactid}}
        <li>{{this.msevtmgt_name}}</li>
        {{/each}}
    </ul>

  • AlexJay Profile Picture
    422 on at

    Hi Jana, this is possible, you can use IF statements within an EACH loop to filter out records. You would need to reference and hard code the GUID of the Event. Sorry not at my machine currently to provide an example but let me know if you need one.

    Recently I’ve been looking more at sending event registration emails from real-time marketing as can trigger on the event registration being created and pass in tokens for the registration, event and contact without needing code in the templates. Unfortunately emails sent from real-time don’t yet show against the contact but this will be resolved in June according to the most recent release wave announcements.

  • janalukic Profile Picture
    70 on at

    Hi Alex,

    Thanks for your input! I was rather hoping to find the solution to double {{#each}} loop, but this is not supported. I was also not able to resolve my issue using real-time marketing, but I found a workaround, so we managed to fix the main issue.

    Speaking of #if conditioning, do you know if can Date fields be used as well?

    For example using if conditioning on event start date msevtmgt_eventstartdate

    Thanks,

    Jana

  • Suggested answer
    Elisa del valle Profile Picture
    10 on at

    please I have the same question, could you help us

  • janalukic Profile Picture
    70 on at

    Hi Elisa,

    I am not sure which question you are referring to :)

    Date fields are not supported, so you would need to create a new field (whole number or text) to be able to use it in the email.

    Regarding double loop - Also not supported. We created a new relationship between the contact and the target entity, allowing us to get to the necessary information using one loop.

    Cheers,

    Jana

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 137 Super User 2025 Season 2

#2
#ManoVerse Profile Picture

#ManoVerse 57

#3
Jimmy Passeti Profile Picture

Jimmy Passeti 50 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans