Skip to main content
All CollectionsFAQComposing Emails
Using Merge Fields with SmartrMail
Using Merge Fields with SmartrMail

Learn what merge fields are and how to use them

P
Written by Peter Connolly
Updated over a year ago

Using merge fields allows you to add personalized and dynamic content to your SmartrMail emails. The information for merge fields is imported from data in your email lists and e-commerce store. 

You can add merge fields to the text in your emails through our text editor.

The text editor will add the tags in the correct format, and ask you to add a fallback.

However you can also add the tags manually. Your text will look something like this:

Hi {{ name | fallback: 'there' }}

Because you bought {{ last_product_purchased | fallback: 'something you love' }}, I think you'll like these products.

Some tags will only be available in certain emails or fields. Here is a list of all the merge tags available to you:

For use anywhere

First Name

{{name}} or {{first_name}} 

Inserts your subscriber's first name if available in your list data.

ex. Homer

Last Name

{{last_name}}

Inserts your subscriber's last name if available in your list data.

ex. Simpson

Full Name

{{full_name}} 

Inserts your subscriber's full name if available in your list data. 

ex. Homer Simpson

Email

{{email}} 

Inserts your subscriber's email address.

Store Name

{{store_name}}

Inserts your store's name

ex. Kwik-E-Mart

Store Address

{{store_address}}

Inserts your store's physical address

ex. 123 Jebediah Drive, Springfield, USA

Country

{{country}}

Inserts your subscribers country

ex. USA

Last Product Purchased

{{last_product_purchased}}

Inserts your subscriber's last product purchased

ex. Squishee

Last Product Abandoned

{{last_product_abandoned}}

Inserts your subscriber's last product abandoned

ex. Chippos Potato Chips

Last Collection Purchased

{{last_collection_purchased}}

Inserts your subscriber's last collection purchased from

ex. Beverages

Last Collection Abandoned

{{last_collection_abandoned}}

Inserts the collection that the last product abandoned was in

ex. Snacks

Total Order Amount

{{total_order_amount}}

The total amount of money a subscriber has spent at your store

ex. $1897.00

Total Order Count

{{total_order_count}}

The number of times a subscriber has ordered from your store

ex. 10

Last Order Amount

{{last_order_amount}}

The value of a subscriber's last order from your store

ex. $19.00

Unsubscribe link

{{unsubscribe}}

A unique link allowing your subscriber to unsubscribe (similar to the one in your footer)

Note: To use this link, highlight part of your text block and use the "Hyperlink" option in the medium editor to paste {{unsubscribe}} (without any "https://" before it)


For use in Product Recommendation and Abandoned Cart emails only

First Product

{{first_product}}

Displays the first product shown in your email.

Last Product

{{last_product}}

Displays the first product shown in your email.

For use only in the product button field on all emails

Price

{price} 

Inserts the listed price of your product. For use in the button field only

Price + Tax

{price_vat} 

If you have the wholesale price set to default you can use this tag to apply the after-tax price on the product (use {price} to ignore this rate and show the default price). For use in the button field only.  Learn more about tax rates in SmartrMail here.

Adding Fallbacks

If a merge field you include has no value for the subscriber you sent to it will be left blank. For example if you don't have the subscriber name:

Hey {{name}}! = Hey !.

However you can add a fallback to any tag. So if the value is blank and you use the tag:

Hey {{ name | fallback: 'there' }} = Hey there!

Using Merge Tags in Custom HTML Blocks and the Custom HTML Editor

The tags above are all for use within our default editor. If you're coding your own HTML emails. You'll need to use a different set of tags.


Notes: 

  • When you use the {{first_product}} tag in a test email, the recommended product included in the title may not be in the email itself - this does not happen during the real campaign.

Did this answer your question?