Photo by Pablo Gentile @ Unsplash

Making your Marketing Emails More Personal

Are you more likely to open an email addressed to you by name, or to a valued customer? Personalization in Marketing Communications is an absolute must these days - whether it be through your email correspondences or landing pages.

In Dynamics we have the Personalization menu available to us - which allows you to look at embedding either Dynamic (differs by who you're talking to) or Static (stays the same regardless) content. The most common usage I've found is to select attributes stored directly on the contact entity, such as their first name - or drilling into the Account from the contact to get the company name.

The 'Content Assist' window within Dynamics 365 Marketing

But what happens when your data doesn't include the fields you've used in your personalization? In Realtime Marketing we have an option for defining a default value for each 'token' - but that hasn't made it's way to Outbound Marketing yet. Don't fret though! There is something we can do to resolve this - and it has something to do with those curly brackets around our data!

Handlebars is a popular templating language - and is used in Dynamics Marketing when embedding data from the Dataverse. The above example looked directly at the contact entity, and then at the fullname attribute - but Handlebars allows for much more than basic data selection, such as if statements and each loops.

The most common problem I've run into is addressing the reader, even if I don't know their first name. To avoid setting up a condition on your Customer Journey - you can utilise the below handlebars snippet:

Hello {{#if (ne contact.firstname '')}}{{contact.firstname}}{{else}}customer{{/if}}

Most handlebars 'helpers' start off with the hash symbol, in this case #if. We then have a query in normal brackets that will return true or false. In this example we're looking to see if the contact's first name is not equal (ne) to an empty string. For anyone that has a first name, this will return true, and we can display the first name as normal - otherwise we'd like to display something else (like 'customer').