Add advanced logical processing to your email design in Dynamics 365 for Marketing
To make the content of your emails even more personal to recipients in Dynamics 365 for Marketing you can use a combination of three things
- Handlebars.js, syntax for writing dynamic logic
- Assist-Edit button, helps you construct valid dynamic expressions
- Test Send button, helps you simulate a recipient to test the logic and expressions
In this example I'll ensure that the opening greeting to an email recipient is in the language of the recipient.
I have two contacts, Karen Borger from Denmark, and Andrew Dixon from the US. When I send out a newsletter to Karen, I want the opening line to be "Hej Karen" ('Hej' is danish for 'Hi'), and when Andrew opens the newsletter sent to him, I want the opening line to be "Hi Andrew"
Karen's contact record
Andrew's contact record
I create an email and - to solve the above requirements - I add syntax for an IF-THEN-ELSE statement (red), as well as the correct fieldnames from the Assist-Edit helper; contact.firstname and contact.address1_country (green)
The syntax is added to the email in a text context block as one long string (1) to avoid line shifts and ensure correct space between greeting and first name.
Using the Test Send button (2) I can send the mail to myself, while simulating sending to Karen and Andrew.
After clicking Test Send a "Quick Create: Marketing Email Test Send" task pane opens, in which I specify my own email address, and point out Karen Borger as the Test contact (1)
To send the mail I click Save (1)
Dynamics 365 for Marketing confirms the mail is sent (1)
In my inbox I open the mail sent to me with Karen as the test contact, and verify that the greeting is "Hej Karen" as expected (1)
I repeat the above, only now with Andrew Dixon as the Test contact (1)
And verify that the greating to Andrew is "Hi" - also as expected
With this example I've shown you how you can use advanced logical procession to make the content of your emails even more personal to recipients in Dynamics 365 for Marketing
See also
- More Dynamics 365 for Marketing blog posts - link
Comments
- Anonymous
September 19, 2018
(The content was deleted per user request)