Merge Tags
Utilize HTML Merge Tags to pull variable audience data into creative designs and beyond.
Last updated
Utilize HTML Merge Tags to pull variable audience data into creative designs and beyond.
Last updated
Poplar offers a variety of flexible and creative ways to customize mailers based on multiple types of collected Audience data. These personalizations can be broken down into three merge tag categories: Default, Location Based, and Custom - all of which can be dynamically optimized by the use of Shopify’s Liquid Template language. All merge tag names must be formatted to exactly match the corresponding column header in your Mail File or Mailing API request.
Poplar will automatically populate default merge tags based on recipient data received via CSV upload or trigger integration. In your HTML creative, default merge tags are always preceded by recipient.
to access the core recipient data in your mail file or API request.
The platform will NOT prompt you to set default values for default merge tags. This means that in the event of a blank value or mismatched data, your creative will print with a blank. Double check all column headers and Test all triggers before launch to ensure there are no merge tag data discrepancies.
Missing first name data will populate as Current Resident and will appear on your creative as such - if you are using the {{recipient.first_name}}
merge tag, make sure first name is provided for every recipient.
See the Custom Merge Tag section for details on how to use first name with a default value...
Column Header or Field
Merge Tag
full_name
{{recipient.full_name}}
first_name
{{recipient.first_name}}
last_name
{{recipient.last_name}}
address_1
{{recipient.address_1}}
address_2
{{recipient.address_2}}
city
{{recipient.city}}
state
{{recipient.state}}
or {{recipient.state_name}}
postal_code
{{recipient.postal_code}}
{{recipient.email}}
identifier
{{recipient.identifier}}
Location based merge tags populate with data pulled from Saved Locations within your Poplar account. They are considered default merge tags, meaning the platform will NOT prompt you to set a default value to appear in the event of missing data. Location based merge tags provide a flexible and easy way to customize creative based on Geolocation settings.
Saved Location Field
Merge Tag
Location Name
{{location.name}}
Address 1
{{location.address_1}}
Address 2
{{location.address_2}}
City
{{location.city}}
State
{{location.state}}
or {{location.state_name}}
Postal Code
{{location.postal_code}}
Merge field 1
{{location.merge_field_1}}
Merge field 2
{{location.merge_field_2}}
Merge field 3
{{location.merge_field_3}}
Poplar populates custom merge tag data by pulling from any additional column headers in your CSV Mail File, or any values present in the merge_tags
object of your triggered API request. When HTML creative files are uploaded, the platform will scan for any custom merge tags present in your design and prompt you to set a default value. The default value will populate the custom merge tag in the event of a blank field or mismatched data in your CSV mail file or API request.
Uploading and storing files under Audiences will strip all custom merge tag values and extra column headers. To preserve custom merge tags for a One Time Send, drag & drop your CSV file directly into the platform during the launch process.
When adding custom merge tags to you HTML, make sure they are always preceded by custom.
This is how the platform differentiates between default and custom merge tags. The following are common examples of custom merge tags:
Column Header or Field
Merge Tag
promo-code
{{custom.promo-code}}
expiration-date
{{custom.expiration-date}}
sales-rep
{{custom.sales-rep}}
spend-amount
{{custom.spend-amount}}
loyalty-level
{{custom.loyalty-level}}
first-name
{{custom.first-name}}
If you don't have first name data for every recipient, you can create an additional custom merge tag named anything BUT first_name (ie. first-name or firstname). The platform will prompt you to set a default value (ie. "there" or "friend") to appear in the event of missing data.
Poplar accepts the use of Shopify's Liquid Template language in HTML creatives. Liquid is an open-source templating language that lets you add nifty logic to dynamic data to make it even more flexible by using:
Objects Add high-level variability to dynamic data in your creative. All default and custom merge tags used in creative are classified as objects.
Tags
Let you add conditional logic (using operators) to your messages. The most basic form is an if...else
statement.
Filters Allow you to reformat and set consistent formatting (ie uppercase, lowercase, or proper-case) merge tag values.
There's no limit on the number of ways you can get creative with Liquid Templates; below are some sample use cases and code snippets to get you started. We highly recommend testing all your Liquid templates thoroughly in order to ensure they are error free!
Add an expiration date to your creative that will always show 90 days from the time of print. The Liquid filter below creates a Unix timestamp, adds the number of seconds in 90 days and then reformats the date. See more date formats...
If your audience data contains some values that appear in all caps, lowercase, or a mix of both, Liquid can be used to ensure they appear consistently formatted in your creative design. Below is an example for how to make sure all first_name data appears in proper case, with the first letter uppercase and the rest lowercase.
Offer a variable discount based on a customer’s purchase history, average order value, loan-to-value, etc. The Liquid tag below will use a custom merge tag to display a different message based on the purchase_history
value listed in your audience data.
Dynamically alter legal text based on the recipient's city
or state
.
Show a different product image based on characteristics related to the recipient’s most frequently purchased item. Below we have a custom merge tag called item-color
, and the image shown in the creative features items of a similar color to those most frequently purchased.
Reach out to support@heypoplar.com for more use cases or assistance...