This feature is in beta and is being gradually rolled out to accounts.
Personalization variables, also called merge tags, automatically insert information into an email when it is sent. Use personalization variables to customize email content with contact information, custom fields, or information from an automation trigger.
For example, you can use a personalization variable to automatically add each contact's first name to an email.
The following variables are available in campaigns and automations:
|
Variable |
Inserts |
|---|---|
|
{{first_name}} |
Contact's first name |
|
{{last_name}} |
Contact's last name |
|
{{name}} |
Contact's full name |
|
{{email}} |
Contact's email address |
|
{{phone}} |
Contact's phone number |
|
{{company}} |
Contact's company |
|
{{date}} |
Date the email is sent in MM/DD/YYYY format |
|
{{current_year}} |
Year the email is sent |
|
{{unsubscribe_url}} |
Contact's unique unsubscribe link |
|
{{custom.field_key}} |
Value from a custom contact field Replace field_key in {{custom.field_key}} with the key for the custom field you want to use. Use bracket syntax when the field key contains a hyphen, space, or starts with a number |
Automations can also use variables containing information from the event that triggered the automation. These variables are only available when the automation uses the corresponding trigger and cannot be used in campaigns.
New Order automations can also use billing and shipping address information.
|
Variable |
Inserts |
|---|---|
|
{{event.id}} |
Order ID |
|
{{event.status}} |
Order status |
|
{{event.subtotal}} |
Order subtotal |
|
{{event.total}} |
Order total |
|
{{event.invoice_number}} |
Invoice number |
|
{{event.payment.currency}} |
Payment currency |
|
{{event.payment.status}} |
Payment status |
|
{{event.shipping_method.name}} |
Shipping method |
|
{{event.shipping_method.cost}} |
Shipping cost |
Use item variables to insert information about individual products from an order or abandoned cart:
|
Variable |
Insert |
|---|---|
|
{{event.items.0.name}} |
Item name |
|
{{event.items.0.quantity}} |
Item quantity |
|
{{event.items.0.unit_price}} |
Item unit price |
|
{{event.items.0.sku}} |
Item SKU |
|
{{event.items.0.image}} |
Item image |
|
{{event.items.0.total}} |
Item total for orders |
Item numbering starts at 0. For example, use {{event.items.1.name}} for the second item and {{event.items.2.name}} for the third item. The total variable is available for orders.
Additional trigger variables include:
|
Trigger |
Variable |
|---|---|
|
New member |
{{event.status}} |
|
Label added or removed |
{{event.tag}} |
|
Campaign opened or clicked |
{{event.campaignId}} |
|
Date reached |
{{event.date_field}}, {{event.date}}, {{event.fired_on}} Note that date_field identifies the date field the automation is monitoring, date contains the applicable date, and fired_on contains the date the contact entered the automation. |
New Order and Abandoned Cart automations can use billing and shipping address information.
Replace billing_address with shipping_address to use the corresponding shipping information.
|
Variable |
Insert |
|---|---|
|
{{event.billing_address.first_name}} |
First name |
|
{{event.billing_address.last_name}} |
Last name |
|
{{event.billing_address.full_name}} |
Full name |
|
{{event.billing_address.phone}} |
Phone number |
|
{{event.billing_address.street}} |
Street address |
|
{{event.billing_address.city}} |
City |
|
{{event.billing_address.state}} |
State or region |
|
{{event.billing_address.country}} |
Country |
|
{{event.billing_address.zip}} |
Postal code |
If a personalization variable does not have a value, it is replaced with blank content. For example, if a contact does not have a first name, {{first_name}} does not appear in the sent email.
Add a fallback value when you want alternative text to appear instead:
Hi {{ first_name | default: "there" }},
If the contact has a first name, the email displays Hi Jane,. If no first name is available, it displays Hi there,.