D365 Marketing Weekly
Have you seen the D365 Marketing Weekly newsletter yet?
A weekly issue covering features, functionality and news on the topic of Marketing, specifically covering Dynamics 365 Marketing and other interesting tools and tips for anyone interested in the subject.
Subscribe Here
*** NOTE: ALL INFORMATION IS ACCURATE AT DATE OF PUBLISHING ***

There are so many options in Realtime Marketing emails for creating conditional and personalised content. Most of it is pretty easy to add, and a few clicks of buttons and you’re on your way. What about when it comes to determining what goes in to the subject or preview text of the email? It’s not so obvious how to do that, but it’s still possible with a few clicks and pretty straightforward once you know how. Let’s take a look at how to use inline conditions in email subjects, and this example we will do it based on switching the language displayed depending on the preferred language of the recipient.

First thing, create your email. Once that’s done, click on the personalise icon from the right hand side and then click on Add condition in the Inline conditions section.

Click to view in detail

Give the first condition a name. This one will be for people who would prefer their emails in French. The condition to set would then to access a field you use on the Contact (or Lead) field to determine that language. Note that although you might see a language field, there is no point using it if you don’t ever ask the Contacts about what language they would prefer, so make sure it’s a field actually used by your organisation!

Click to view in detail

Once you’ve accessed the field, set the logic. In this case, if the Language field on the Contact equals French.

Click to view in detail

Now do the same thing again and add any other languages you want to check for. In my example I have French and German. I don’t need to add an option for English because that will end up being my default. Once you’ve added all of your conditions, click on the little code icon from the top right of the Inline conditions section.

Click to view in detail

Now you can build your condition. Pick the first condition, then add in the next one, then click on the box to add a Default content condition.

Click to view in detail

Now you just need to add in what you actually want to display in between each of the conditions. So from the code example above, you can see below where I have added in what I want the subject to be for each language.

{{#if German}}Haben Sie unsere neueste Veranstaltung gesehen {{FirstName}}?{{else if French}}Avez-vous vu notre dernier événement {{FirstName}}?{{else}}Have you seen our latest event {{FirstName}}?{{/if}}

Once you’ve put your full code together, go ahead and paste it in to the Subject field of the email.

Click to view in detail

You can preview the email to see what it will look like. First we can see it in English, because neither French nor German are found.

Click to view in detail

If you then set French (or whatever condition you have added) to True, the subject will change to display that value.

Click to view in detail

Finally, I change it to be True for German, and then we see that text instead.

Click to view in detail

So not that difficult, and yet another way to create a truly customised dynamic email to send to your Contacts or Leads. Hope this helps!


Check out the latest post:
Auto Assign Leads Without Code Using Lead Scoring & Work Assignment


D365 Marketing Weekly
Have you seen the D365 Marketing Weekly newsletter yet?
A weekly issue covering features, functionality and news on the topic of Marketing, specifically covering Dynamics 365 Marketing and other interesting tools and tips for anyone interested in the subject.
Subscribe Here
This is just 1 of 477 articles. You can browse through all of them by going to the main blog page, or navigate through different categories to find more content you are interested in. You can also subscribe and get new blog posts emailed to you directly.




4 thoughts on “Using Inline Conditions In Email Subjects -Customer Insights Journeys

  1. Hi Megan,

    Great article, as usual. You have been instrumental in my continuous improving confidence with Dynamics Customer Insights.
    I’ve got a hurdle. I followed the article for Lead and Contact it seems quite straight forward. Think is, I’m unsure how I would do this if the attribute I need to condition on is not Lead or Contact. For example: I have three different salutation fields against Account in case I wish to communicate to equal partners at a company, or a customer mya have directed me to contact them with formal or informal salutation. If I want to market to Accounts in a particular industry, some will have Partnership salutation others will have formal and informal. When I select the attribute for Account it wishes me to name a single record. What if I wish to communicate to more than one customer and they have different salutations? Any thoughts?

    1. Hi Mark, hopefully I am following you. If it’s asking you to name a single record, I am guessing you picked the Account table first when you selected the attribute. Instead, pick the Contact, then the Account field from the Contact and then you should be able to get to your salutation fields and set up your conditions. Hope that helps!

  2. Thank you, Megan, for the advice that helped with the subject line 🙂

    If we want to apply inline conditions to the body of the text in the email, can we do the same as we have done for the subject of the email and if so, how would we do that?

    1. Hi Mark, you answered your own question. Can you do the same as with the subject… YES, and how, well, the same as with the subject 😉

Leave a Reply

Your email address will not be published. Required fields are marked *