How to Use Custom Object Fields in Pardot HML

Share this article...

HML is what’s used to personalize Pardot emails, email, dynamic content, landing pages, forms, and user email signatures. You may already know that it’s easy to select a merge field from the Pardot merge picker to add personalization, and is effective in increasing prospect engagement.

For your next campaign, you want to take HML further and add personalization based on custom object data. For example, you would like to insert the name of the product the prospect has just purchased, or the date when their onboarding process will start. When you open the Pardot merge picker, you can only see ‘Recipient’ (lead, contact, person account fields) and others, but no custom objects. This means you can’t use custom object data directly from the object.

“SDocs”

It’s not easy, but it’s not impossible. You have to find a way to sync the field data from the custom object to the prospect object, which is possible using two possible workarounds. I’m going to expand on Lori’s advice that she shared when showing us how to extend dynamic content for you to use for merge fields too.

Note: Before you continue, do check that this is now not native functionality. The rate that the Pardot product is developing means that these workarounds (applicable at the time of writing, November 2020) may not be necessary. Check the Pardot Releases website first.

Lead or Contact Formula Field to Prospect Field (Solution 1)

For this first workaround, we’re going to create a formula field on the lead or contact object* that will reference your custom object field. The data in the custom object field will appear as read-only text in the lead/contact formula field.

Once we have the data on the lead/contact, we can map the field to a Pardot prospect custom field. Here is how your field data will move around:

  • Data starts in the custom object field (Salesforce)
  • Goes to a lead or contact formula field (Salesforce)
  • Syncs to a prospect custom field (Pardot)

*take a moment to think about your Salesforce data model. In 99% of the cases, the related object you want to pull data from will be related to either the lead or the contact, not both. Hopefully, it will be obvious but is certainly worth checking. If it is applicable to only one object, then you will need to segment you Pardot lists appropriately before sending using the ‘Prospect CRM status’ filter (which will only include prospects who are leads, or prospect who are contacts, depending on your selection).

Step 1: Create a formula field

Create a formula field on the lead or contact object that pulls the field data from the custom object. The output type will be ‘text’:

For example, I have a project custom object that has a field ‘start date’. I want to pull the start date into an email, so this formula field below will pull that start date in from the project the contact is related to.

Step 2: Map formula field to Pardot

Create a new prospect custom field in Pardot (text), and map it to the Salesforce formula field. That custom prospect field will be available to use from the Pardot merge picker.

Caution! The cons:

  1. Clue yourself up on what triggers the Pardot/Salesforce sync. Changes to formula fields do not trigger the sync, so if you decide to use this method be aware of how your data is being updated. It’s worth running a data check before sending an email (by using dynamic lists or exporting to CSV to check the field data).
  2. What are the data relationships that are impacting that field? For example, can a contact be related to more than one project in Salesforce? What happens then? Which should Salesforce (and Pardot) take as the truth? (in this use case, it would be the most recently created project, or the project with the earliest start date).

Ensure you think these points through carefully (or seek the advice of a Pardot expert) before implementing this workaround.

Pardot Custom Object to Prospect Field (Solution 2)

For the second workaround, we’re going to use Pardot custom objects and transform the data from the custom object record to the prospect record. Note that you must have Pardot Advanced edition, or have the Pardot custom object add-on.

You can pull custom object data directly from Salesforce into a Pardot custom object, but it’s a one-way sync, and it’s read-only. If you can get the data into a prospect custom field, then we are good to go!

  • Data starts in the custom object field (Salesforce)
  • Syncs to a custom object field, read-only (Pardot)
  • Inserted into a prospect custom field (Pardot)

How do you insert the data into a prospect field from a custom object field? You can use an automation rule to say ‘when prospect custom object field is …, then set prospect custom field to …’.

Caution! The cons:

Unlike Salesforce formula fields, Pardot automation rules require you to define the exact value that the automation rule needs to insert into the target field. You can see that this would work for picklist/dropdown values, where there is a defined set of possible values. The potential upkeep is why both Lori and I would recommend solution 1.

However, a plus point. In cases where the processing limits on the Salesforce side are already stretched, to avoid exceeding the governor limits (and stressing out your admin) this solution means you can keep it within Pardot and have control over it.

Summary

If you want to take HML further and add personalization based on custom object data, you can see that it’s not easy, but it’s not impossible. When you open the Pardot merge picker, you won’t see custom object fields, and so the trick is to get the custom object data into the prospect fields using one of the two workarounds in this post.

I hope that this article has given you good insight into the caution you must take when implementing a workaround like this. Please check the Pardot Releases website first.

Finally, there are more clever ways to extend Pardot dynamic content personalization beyond the current limitations awaiting you, so check out this post.

Leave a Reply