Skip to main content

Using merge fields

Add a person's name, their last purchase and other details to your emails.

Overview

Merge fields (also called personalized fields) put details about each person into your emails, like their first name or the last product they bought. SmartrMail fills them in from your profiles and your store data when the email sends.

You add them with the Personalisation button in the text toolbar, or by typing the tag yourself.
​

This video was recorded in an earlier version of the email editor, so the toolbar looks different.

How to add a merge field

  1. In the email editor, click into a text block where the field should go.

  2. In the text toolbar, click the Personalisation button.
    ​

  3. In the Personalize window, choose a field under Attribute.

  4. Optional: enter Fallback text. It shows when a profile has no value for that field.
    ​

  5. Click Insert. The tag appears in your text.

To change or remove a field you’ve added, click it in the text. The same window opens with Update and Remove.

Type a merge field yourself

You can also type tags straight into your text. A fallback goes after a vertical bar, in quotes:

Hi {{ name | fallback: 'there' }}, because you bought {{ last_product_purchased | fallback: 'something you love' }}, we think you’ll like these.

Good to know: fallbacks
​

No value, no fallback: the field is left blank. “Hey {{ name }},” becomes “Hey ,” for someone with no name on their profile.

With a fallback: “Hey {{ name | fallback: 'there' }},” becomes “Hey there,”.

Fields you can use in any email

The name in bold is what you see under Attribute. Store and order fields are listed only when your account is connected to a store platform.

About the person

  • Subscriber Name: {{ name }} or {{ first_name }}. Their first name, for example Jane.

  • Subscriber Last Name: {{ last_name }}. For example Doe.

  • Subscriber Full Name: {{ full_name }}. For example Jane Doe.

  • Subscriber Email: {{ email }}. For example [email protected].

  • Subscriber Country: {{ country }}.

  • Subscriber Company Name: {{ subscriber_company_name }}.

About your store

  • Store Name: {{ store_name }}. For example Northfold Coffee.

  • Store Address: {{ store_address }}. Your store’s physical address.

  • Store Email Address: {{ store_email }}.

About their orders

  • Last Product Purchased: {{ last_product_purchased }}. For example House Blend 250g.

  • Last Collection Purchased: {{ last_collection_purchased }}. The collection of their last purchase, for example Coffee beans.

  • Subscriber Total Order Amount: {{ total_order_amount }}. What they’ve spent at your store in total.

  • Subscriber Total Order Count: {{ total_order_count }}. How many orders they’ve placed, for example 10.

  • Subscriber Last Order Amount: {{ last_order_amount }}. The value of their last order.

Links

  • Unsubscribe link: {{ unsubscribe }}. A personal unsubscribe link, like the one in your footer. Select some text, click the link button in the text toolbar and paste {{ unsubscribe }} as the address, with no https:// in front.

Fields for certain emails only

  • Last Product Abandoned {{ last_product_abandoned }} and Last Collection Abandoned {{ last_collection_abandoned }}: in abandoned cart emails.

  • First Product {{ first_product }} and Last Product {{ last_product }}: the first and the last product shown in the email. In recommendation and abandoned cart emails.

  • Back in stock product {{ back_in_stock_product }}: in back in stock emails.

  • Order ID: in emails of automations started by an order.

  • Last Booking Start Date, Last Booking Start Time, Last Booking End Date and Last Booking End Time: in booking automations, for stores connected to BookThatApp.

  • Custom Trigger fields: in automations started by a custom trigger. See Use custom event fields in your emails.

Price tags in product buttons

In the button text of a product, {price} shows the product’s price, for example “Buy for {price}”. If you’ve set a tax rate for wholesale prices, {price_vat} shows the price with tax. See How do I add a tax to my wholesale prices?

Merge fields in custom HTML

The tags above work in SmartrMail’s email editor. If you code your own HTML emails, see Dynamic tagging for custom HTML for the tags to use there.


FAQs

Click a question to open it.

Why is a merge field blank in my email?

That person has no value for the field, for example no first name on their profile. Add a fallback so the sentence still reads well.

Why don’t I see the product or booking fields?

They only appear in the kinds of emails listed above, and only when your account is connected to a store platform.

Why does First Product show a different product in my test email?

In a test email, the product named by {{ first_product }} may not match the products shown. This doesn’t happen in the real send.


Need a hand with merge fields?

Our team is happy to help. Book a 1:1 call with the SmartrMail team and we’ll set it up with you.

Did this answer your question?