4 HML Tricks for Advanced Pardot Personalization

Share this article...

Pardot introduced HML in late 2019 as the way to add personalization to Pardot assets. In short, HML is an update from the old %%Mergetag%% language in Pardot with a new format of double curly brackets or “handlebars” {{ }}.

I wanted to find out how many Pardot marketers had or had not enabled HML. Luckily, I was able to poll a Pardot audience when I gave my presentation at ParDreamin’ 2020.

“SDocs”

I was somewhat surprised to discover that more than a quarter of the audience hadn’t enabled HML yet.

Let the video, and the article that follows, serve to demystify what HML is and inspire you to take it further!

What is HML?

HML is a newer way to add personalization to Pardot marketing assets – at the most basic level, it involves replacing %% %% with {{ }}.

Field names take on a much more “Salesforce-based flavor” (if you’re accustomed to Salesforce formula fields).

%%First_Name%% becomes {{Recipient.FirstName}} and %%prospect_account.name%% becomes {{Recipient.Account.Name}} and so forth. There is nearly a 1:1 relationship between the old fields and the new ones, with a few notable exceptions:

  • Account Description is dropped
  • Address One and Address Two fields are now a single field
  • The Pardot HTML Signature has been dropped. This is likely due to the retirement of the Pardot login system and gradual transitioning of Pardot user management to Salesforce.
  • New fields for {{Current_Day}}, {{Current_Month}} and {{Current_Year}}
  • A new {{Resubscribe}} Option, discussed below.

The most exciting feature of HML is the ability to use conditional logic to display content. That is the focus of most of the tricks I will be showing you. First, let’s look at enabling HML.

Enable Pardot HML

Don’t Be Scared, Just Push the Button

If you haven’t updated your Pardot account to Handlebar Merge Language (HML) yet, you’re probably getting one of Pardot’s famous big-green-button-notifications inviting you to enable it. Relax, you can push the button. I promise nothing bad will happen!

The conversion takes only a few minutes and the most immediate noticeable effect is…nothing. Everything in your account will still work. Now, you have access to a lot of cool new features.

Pardot Email Templates when you Enable HML

One effect you will notice first when you upgrade is that when you open an existing email template, Pardot will automatically upgrade that template’s merge tags to HML. After it’s saved, you will notice a green checkbox in the template’s list view that shows it’s been HML upgraded.

The key thing here is that you do not have to upgrade your existing templates if you don’t want to or need to (they will continue to work as before). But the moment you edit one, Pardot will do the update. So over time, many of your templates will migrate to the updated format.

Now let’s get look at the HML tricks I’ve discovered while working with a wide range of client use cases.

Trick #1: Allow Prospect Resubscribe

…on Form Handlers and Operational Emails

HML enables prospect resubscribe feature. The resubscribe message automatically pops up on a Pardot form for cookied prospects that are opted out, inviting them to resubscribe. I was once again surprised to hear that the majority of the people attending my presentation hadn’t enabled this feature.

You might be thinking “well, this feature does nothing for me because I use form handlers on my site, and this is for Pardot forms only.”

First things first, to use his trick, you must fully enable the feature in your account setup including creating a resubscribe email template. Pardot helpfully includes a boilerplate resubscribe email at the end of the set of prebuilt email templates.

This trick uses the {{Resubscribe}} merge tag that’s part of this capability.

As you may know, even if an unsubscribed person submits a form or form handler in Pardot, an autoresponder will still send even if they are unsubscribed. This is to avoid a bad user experience when your prospect requests something—you want to make sure they get it regardless of opt-in status.

So the key here is to incorporate that {{Resubscribe}} merge tag – but only if the person is actually opted out.

To do this, we have to build two automations to flag people who have opted out with a custom field that we use as the basis for showing our resubscribe message (based on conditions).

  • Create a custom field to hold this information, call it something like “Is Opted Out”
  • The automation will look for Prospect Email Status > Is > Opted Out
  • Then Change “Is Opted Out” to Yes

That one is going to run only once. The second automation clears this field after they opt back in. This one needs to be set to repeat, but we don’t really want it running against everyone every day, so the time parameter is there to prevent it from running against everyone every day.

  • The automation will look for Prospect Email Status > Isn’t > Opted Out
  • And Prospect Time > Last activity days ago > is less than 1
  • Then Clear the field “Is Opted Out”

Clearing the field is very important to understand in the context of HML’s conditionality. Conditional content is based on the presence of data vs blank.

Now, to our resubscribe tag. This code shows the message on your autoresponder email only if the person’s Is Opted Out custom field contains yes, otherwise it shows nothing.

{{#if Recipient.Is_Opted_Out}} You have opted out of our emails! Click here to resubscribe! {{Resubscribe}}{{else}}{{/if}}

You can of course use the Pardot link tool in the email builder to include the {{Resubscribe}} as a link on the text instead of showing the whole URL. Just choose {{Resubscribe}} from the link type dropdown.

Once again, note that the fact the “Is Opted Out” field contains a value (any value) is the “switch” to show the message. If it’s blank, nothing shows.

Two additional things to notice here. First, the field that is determining if the message is shown or not isn’t part of the displayed message at all. It can, but it doesn’t have to be. The second thing is that there’s nothing after the {{else}}—you can choose not to show anything at all.

So the basic pattern of the If/Else HML content is:

{{The_Field_We_Are_Checking}}
The primary message we are showing if the field we are checking has something in it. We can also display {{The_Field_We_Are_Checking}} as well as {{Other Fields}} as we wish.
{{else}}
The alternative message and {{other fields}} we are checking if the field we are checking is blank.
{{/if}

Trick #2: Show a Variable List of URLs

You want to show your email recipient a particular URL, so this trick assumes you have created a custom field to store that URL. Suppose you have several different products and you want to show links to the user manual for each, but only if the person has purchased that product. If you don’t own the product, the field is blank.

Once again, if you own the product, we’re going to populate the field with a URL for the manual so we can show the link. Here’s the code:

{{#if Recipient.Product1}} {{{Recipient.Product1}}} {{else}} {{/if}}
{{#if Recipient.Product2}} {{{Recipient.Product2}}} {{else}} {{/if}}
{{#if Recipient.Product3}} {{Recipient.Product3}}} {{else}} {{/if}}
{{#if Recipient.Product4}} {{Recipient.Product4}}} {{else}} {{/if}}

So if I owned product 1 and 3, I would see 2 URLs here, because the content in the field is a URL.

Note that using triple brackets will render the URL exactly as it exists in the field (absolute). Depending on your URL format you may have to experiment with the double or triple bracket options.

Variations for you to try out:

You can just display the link as the HML pattern shown above would do, or use the email builder to create a link over text saying “Product 1 Manual”. How you do this depends on how you want to store the link

If you don’t want to track clicks on these elements, then store the entire link in your custom field including https:// and use the <other> link protocol. The url is your {{Recipient.Product.1}} merge tag.

If you do want to track clicks, then only store the part after https:// and use the https:// protocol and the {{Recipient.Product.1}} as the URL and Pardot will build a trackable link in the email.

Be careful about how you store your original value in your custom field, the two patterns shown above work only one way depending on how you stored the link.

Trick #3: Display Salesperson Information to Assigned Prospects – Otherwise Display ‘Request a Demo’

Does the prospect have an assigned user yet, and if they are, it shows the assigned user’s contact information. If they are not assigned, it shows a link offering a demo to the prospect that’s (presumably) waiting to be qualified.

{{#if Recipient.Owner.Name}}
Your Sales Rep is:
{{Recipient.Owner.Name}}
{{Recipient.Owner.Phone}}
{{Recipient.Owner.Email}}
{{else}}
Want to Schedule a demo? Click here.{{/if}}

The key here is if there is no ‘owner name’ (not assigned), then that field is blank, so the alternate content is shown. Note also that the contact information in the HML merge fields is now coming from the Salesforce user profile, so make sure your sales team have those fields populated.

The bonus content is using HML to pre-populate that demo request link.

Let’s suppose that your team uses Calendly and you want to make that demo request as frictionless as possible. We can pre-populate the Calendly fields by passing HML information in the link.

In the email builder, we construct our link by passing values in the link using HML to populate the values. This example is the standard Calendly signup format, containing two fields:

  • Name
  • Email

calendly.com/demo_team/meetingtype?name={{Recipient.FirstName}}%20{{Recipient.LastName}}&email={{Recipient.Email}}

Notice how we used HML values in the URL. Pardot will rewrite those values when it sends the email. We combined the first name and last name fields from Pardot into a single value to pass to “name” since Pardot does not have a merge tag for a combined first name and last name. Using the %20 will place a space between the first name and last name when it gets to Calendly, since you can’t pass an actual space in a URL.

There are lots of other ways you can do with adding variables from Pardot into a custom URL using HML in this manner. For example, if you had a system where rendering a URL with a customer ID in it showed your customer a custom page, you could create a link that combines https://thebaseurl.com/{Recipient_Customer_ID}} to render a custom link for each customer.

Trick #4: Use a Form Handler as a Custom link with HML

This is the concept that really blew people’s minds at the Pardreamin’ presentation. The first thing to understand that a form handler is (at its core) just a really fancy link. So we can use a form handler in a Pardot email just like any other link, except that a form handler means we get a form submission and the possibility to add completion actions.

Why would you want to do this?

One reason might be that you want to send information in a comment and collect some data that you don’t want to store in Pardot as a field. I call this the “event with a vegan lunch” technique. I have an upcoming event and I want to know who is coming, and who needs a special meal; however, I don’t really want to create a custom field for someone’s lunch preference, but instead, I want to collect the information in an email.

So I construct 3 links in my event confirmation email that feeds a form hander something to my Pardot comments that indicates if my attendee is simply coming, or is coming (link 1) and wants a vegan (link 2) or a gluten-free lunch (link 3):

https://go.pardot.com/l/4772/5okjnkm?email={{Recipient.Email}}&comments=RSVP

https://go.pardot.com/l/4772/5okjnkm?email={{Recipient.Email}}&comments=RSVP Vegan_Lunch

https://go.pardot.com/l/4772//5okjnkm?email={{Recipient.Email}}&comments=RSVP_GF_Lunch

The completion actions on both forms are to add each prospect to the total attendee list

The completion actions on the vegan form adds your vegan prospects to the vegan lunch list, and the same for adding gluten free prospects to the gluten-free list.
The result is you have a list of all attendees, and two lists for special dietary requirements. Plus a backup in the comments so your sales team can see their customers’ RSVPs and know if they’ve requested the dietary requirements.

You could also accomplish the same thing (with different completion actions) using custom redirects and get the same result – that’s if you didn’t want to give the option for prospects to put anything in the comments. The point here is that if you use form handers you can get the added impact of what amounts to a secondary form submit. A really powerful reason for this is you might want to concatenate multiple field’s information in a single field, or into the comments.
https://go.pardot.com/l/4772/5okjnkm?email={{Recipient.Email}}&combined_field={{Custom_Field_1}}%20{{Custom_field_2}}

Finally, you can use this concept with HML’s if/else functionality to alternatively display different form handler based links depending on a condition of the controlling field. For example, if someone had a customer ID, you perhaps show one version of the form handler, and if not, a second one.

Summary

Handlebar Merge Language is more than simply a replacement for the old merge tag formatting, the addition of the conditional statements means it adds a basic form of dynamic content to all Pardot account plans, and it opens up a whole new range of options for how you can customize your content to more effectively market to your prospects and serve your customers.

Let us know which ones you’ve tried out in the comments below!

One thought on “4 HML Tricks for Advanced Pardot Personalization

  1. Bill Fetter

    Update on this article– you still CAN use the HTML signature as a merge field– it is just that whereas it once was 2 fields, it’s now one field, and it will sub in the HTML version on the HTML email and the text version on the text version of the email. AND you can use HML in the HTML signature field (but not the URL field or the Text Signature fields)

Leave a Reply