You may have encountered this scenario before: you're sending an email to contacts in CRM, but you'd like to reference a field (or multiple fields) on the account record that the contact is associated with.

Good news: you can make this happen within ClickDimensions email templates! This is achieved by using FreeMarker code that's added to the template from the Personalize button within the email template designer. With FreeMarker, you can reference fields on lead, contact, account and owner records within CRM.

In this example, we are sending an email to a contact, but we want to include personalization about the contact's related account record within the email template.

This is the contact record for Molly within CRM, who is part of the Tomato Gardens account:

This is the account record for Tomato Gardens within CRM, which is owned by Louella:

Within our email, we want to include the contact's associated company name, the company account number and the name of the company's account coordinator (owner record). These fields need to be dynamic within the email so they can show correct information to the recipients.

To start setting this up within a ClickDimensions email template designer, choose the Personalize button within the designer.

To address the contact by his or her first name, simply choose the First Name field from the Contact section of the Personalization menu.

Since we are referencing the contact's account information, we will use parent account parameters when choosing the personalization fields. These are found within the Personalization menu, within the lead or contact fields, but at the bottom of the respective menus:

NOTE: This is not the same thing as choosing fields from the Account drop-down menu. Those fields will only appear if the email is sent to an actual account record within CRM. We are sending this email to contact records, so it's best to choose the parent account fields as they relate to the contact record. Using these fields will show values from the account record that is related to the contact record. This article on FreeMarker language will help illustrate the relationship.

This is how it looks when we build our email template:

When Molly receives the email, it looks like this:

The FreeMarker successfully references the data on the account record that acts as a parent account for Molly's contact record within CRM.

Remember, this can apply to custom fields that may exist within your CRM. Be sure that you have saved and published your customizations, as well as published metadata before trying this!

Happy Marketing!

Written by Molly Morat, ClickDimensions Marketing Success Manager