Introducing Handlebars Merge Language for Pardot: Ensure Perfect Personalization Every Time

Every time I get an email with an obvious blank field or junk data such as “Hi First Name,” I can’t help but try to figure out where things went wrong for the sending marketer. As the product manager for email at Pardot, I am obsessed with great, personalized marketing and I’m committed to ensuring that these mistakes don’t happen for our customers and recipients get the right message every time.

That’s why I’m excited to introduce Handlebars Merge Language (HML) for Pardot. HML is a new merge language for personalizing email in Pardot. It’s easy to upgrade your content, search for the fields you need and the language is shared by Salesforce Lightning Templates, laying the foundation for more email compatibility down the road.

HML improves personalization by adding a new tool to your arsenal for delivering tailored content to your prospects: the #if statement. Using an #if statement allows you to check whether a field has data directly in the email. When you know whether the data is present, you can then provide the optimal content for both cases.

Let’s take a look at how HML is helping marketers create better customer experiences with perfect personalization and relevant offers.

Avoid Personalization and Grammar Mistakes

Let’s say you want to use your recipient’s first name in your email greeting, like “We’ve got good news for you, Heather!”

If you don’t know your recipient’s first name, it’s hard to avoid the all-too-common personalization and punctuation fail, “We’ve got good news for you, !” 

One option could be to use a global default like “Friend” or “Customer,” but that might feel too unnatural. What if we just left it out completely, but made sure the punctuation looked right?

Here’s how you can solve this with #if:

{{#if Recipient.FirstName}}! // First we’ll check for the first name
We’ve got good news for you, {{Recipient.FirstName}}! // Here’s the content if we have a First Name
{{else}} // What to do if there is no first name?
We’ve got good news for you!
{{/if}} // End the #if statement

This will produce two versions of your email, personalized and formatted correctly:

Version 1


Version 2

Provide Engaging and Relevant Calls-to-Action

But what about a scenario that’s a little more complex? 

For example, nearing the end of a quarter is a great time to send email to generate interest and drive leads from Marketing to Sales for cross selling opportunities. A great way to ensure that handoff is smooth and seamless is to include the contact information for the recipient to reach out if they’re enticed by your call to action.

This is easy to do if the recipient already has an account owner with a phone number. But if that’s not the case, you’d like to provide more generic contact information. 

By having different content in each case, you can provide the most specific and relevant information to those who have it, while having a great back-up for those who don’t.

Here’s how you can solve this with #if:

Have questions about your account?

{{#if Recipient.Owner.Phone}} // We’ll check if the owner’s phone number is populated
Contact {{Recipient.Owner.Name}} at {{Recipient.Owner.Phone}}. // We’ll include the name and phone number if there is a phone number.
{{else}} // And if there isn’t a phone number?
Contact us at // We’ll provide a generic email address so recipients can still reach out
{{/if}} // end the if statement

Version 1


Version 2

What I love about this approach is that it provides contact information for all of the email’s recipients, including highly specific information when available, but still provides a call to action when it’s not available.

Get Started with HML Today

While the examples here are spaced out for clarity, be sure to preview emails as you’re getting familiar with HML to catch things like line breaks. Also, if you do have a default mail merge value set for a field, it will always use that default if the field is empty.

Make sure an empty or awkward personalization doesn’t happen to you! Upgrade your Pardot account to HML today and give it a try in your email!