Skip to main content

Notifications

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!

  • janalukic Profile Picture
    janalukic 70 on at
    RE: E-Mail Dynamic Content

    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

  • Suggested answer
    Elisa del valle Profile Picture
    Elisa del valle 10 on at
    RE: E-Mail Dynamic Content

    please I have the same question, could you help us

  • janalukic Profile Picture
    janalukic 70 on at
    RE: E-Mail Dynamic Content

    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

  • AlexJay Profile Picture
    AlexJay 420 on at
    RE: E-Mail Dynamic Content

    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
    janalukic 70 on at
    RE: E-Mail Dynamic Content

    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>

  • Verified answer
    Nya Profile Picture
    Nya 29,058 on at
    RE: E-Mail Dynamic Content

    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

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

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Announcing Forum Attachment Improvements!

We're excited to announce that attachments for replies in forums and improved…

Vahid Ghafarpour – Community Spotlight

We are excited to recognize Vahid Ghafarpour as our February 2025 Community…

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,969 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 230,842 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans