Skip to main content

Notifications

Customer experience | Sales, Customer Insights,...
Suggested answer

Can't select dynamic fields from proper relationship (Marketing emails)

Posted on by 800

Hi,

I am setting up D365 Marketing and creating marketing email templates. We are using the API  in combination with a custom form to create event registrations. That works great.
But now I would like to e-mail these persons who registered for an event. When creating the marketing email templates I noticed when using the assist function I did not see the relationship I needed:
Event Registration -> Contact. What I did see was the relationship Contact -> Event Registration, which is the wrong one.

The bottom line is, I want to email persons who registered for a particular event with specific information regarding that event. My Segments and Customer Journeys are set on specific events, how do I configure my emails to specific events and/or event registrations?

What I want to achieve is to get the GUID in this line of code to be dynamic:

{{msevtmgt_event(1235363d-d7ab-ea11-a812-000d3a49e531).msevtmgt_eventstartdate}}
  • Suggested answer
    RE: Can't select dynamic fields from proper relationship (Marketing emails)

    Hi Jacques, 

    Feel free to shoot your Ideas to our Ideas Forum, and don't forget to Verify the answers that you find useful. 

    Thanks!
    Defne

  • cloflyMao Profile Picture
    cloflyMao 25,198 on at
    RE: Can't select dynamic fields from proper relationship (Marketing emails)

    Hi Jacques,

    Your workaround sounds great.

    Welcome to submit any thought to Ideas forum.

    Regards,

    Clofly

  • JacquesNL Profile Picture
    JacquesNL 800 on at
    RE: Can't select dynamic fields from proper relationship (Marketing emails)

    Hi Clofly,

    Thank you for the reply, I understand your solution, but this is not the solution because it is not variable. It is still written with a hardcoded GUID. It surprises me that this is not possible to create a variable solution.

    I am trying the following workaround: Everytime a event registration is created (or the event lookup on it changes), I update the Originating Event field on the related contact with the Event lookup from the Event Registration. Then I am using the Contact - Originating Event relationship in the assist-edit to get the needed event info. Can't seem to find another way.

    Thanks again!

    Br,

    Jacques

  • cloflyMao Profile Picture
    cloflyMao 25,198 on at
    RE: Can't select dynamic fields from proper relationship (Marketing emails)

    Hi Jacques,

    The relationship between Contact and Event is 1:N, in other word, a contact may has multiple event registrations from different events, therefore, we need to loop through all associated records of current contact with #each statement,

    then using a conditional statement to only show information of a specific event.

    {{#each contact.msevtmgt_eventregistration_contact_msevtmgt_contactid}}
        {{#if (eq this.msevtmgt_event '1235363d-d7ab-ea11-a812-000d3a49e531')}} 
        

    Hi {{contact.firstname}},

    The event {{this.msevtmgt_name}} will start on {{this.msevtmgt_eventstartdate}}

    {{/if}} {{/each}}

    Please refer to following articles for more details about explanation of relationship in assist-edit:

    https://docs.microsoft.com/en-us/dynamics365/marketing/dynamic-email-content#how-assist-edit-presents-database-relationships

    and how to loop through records with 1:N relationship:

    https://docs.microsoft.com/en-us/dynamics365/marketing/dynamic-email-content#for-each-loops

    Regards,

    Clofly

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,253 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,188 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans