Help Center
English
Contents

Use values in customer notification templates

Use the available message values and preview examples when editing customer emails and messages.

Open an email's design editor and expand Message values. The list follows the selected email type. Copy a value such as {{ order.number }} into text or a subject where you want the actual value to appear. The preview and Send test use example data; editing and previewing do not send customer notifications.

The example data follows your store: amounts are in your store currency, addresses and phone numbers are in your store's country, and the tax details show the taxes you set up for that country, one line per tax. If you have no tax set up there, they show one line, Tax (10%).

Email values

Email values are paths inside double braces, such as {{ customer.first_name }} and {{ refund.total_refunded | money }}. Use the list shown for your selected email; an access code, refund value or review link is not available for every event. Reusable templates can serve different email types, so check the values against each assignment.

Order totals say which lines apply to the order: order.totals.has_discount, has_shipping, shipping_free, has_cod_fee, has_checkout_fees, has_duties, has_tax, has_refunded, has_store_credit, has_gift_card, has_paid and has_due are yes or no. What the customer paid and still owes follows the total: order.totals.store_credit and gift_card are the parts paid with those, paid is everything received, and due is the rest; order.totals.due_on_delivery is yes when the rest is collected in cash on delivery, and order.totals.due_at_pickup when it is collected in cash as a pickup order is picked up. An amount the order doesn’t have, such as the discount of an order without one, is empty rather than zero. In code, print a total line only under its value, for example {% if order.totals.has_cod_fee %}, and write Free for shipping when order.totals.shipping_free is yes.

Shipment notifications also have shipment values, such as {{ fulfillment.number }}, {{ fulfillment.tracking_url }}, {{ fulfillment.carrier }} and {{ fulfillment.pickup.name }}. Their Order items block lists only the items in that shipment; you can switch it to the whole order.

Gift Card notifications have {{ gift_card.last4 }}, the last four characters of the code, and {{ gift_card.amount }}, the card's balance (a cancelled card's is the balance it held). Store Credit notifications have {{ store_credit.amount }}, the amount added or removed, and {{ store_credit.balance }}, the customer's balance after it.

You can give an optional email value a fallback with the default filter, for example {{ customer.first_name | default: "Customer" }}. Without a value or fallback, that part is left blank. Customer amounts follow the order currency and store language, rather than your management-screen display preferences.

SMS and WhatsApp values

SMS and WhatsApp templates use the same values as the email of the same type, written the same way, such as {{ order.number }}, {{ shop.name }} or {{ refund.amount | money }}; the editor lists them for the selected type. Edit each channel separately. A value the type does not have is refused when you save. A value with no data for a particular message is left blank, as in email, and a text that cannot be written when it is due is not sent and is recorded as failed. Login, contact confirmation and order tracking code templates must include {{ access.code }}. Promotional templates (cart recovery, checkout recovery, browse recovery, win-back and review requests) must include {{ message.opt_out_url }}, the link that lets a customer stop marketing texts; other templates don't have this value. Review the displayed content limit and message length before saving; a reset restores only the selected channel's default.

SMS and WhatsApp in other languages

Each SMS and WhatsApp template is written in your store's default language and can be translated into each of your other store languages. To read every template in one of your other languages, choose it in Show another language at the top of Message Templates: each card shows that language's text and its length, Outdated after the original changes, or Not translated with the original shown faded and a button to translate it. Edit then opens the template in that language. To translate one template, open it and choose a language: the original is shown above the message. A translation keeps the original's values and tags exactly, such as {{ order.number }}: only the words around them change, and a translation that changes, adds or drops one is refused. You can also translate templates in Translations > Message Templates, with CSV export and import and AI translation. A customer gets the message in the language of their order, checkout, sign-in or Gift Card when that language is translated, and the default-language message otherwise. A translation shows as outdated after the original changes. In an app that opens the template editor, other languages are available only when the app has permission to read and change translations.

Check a test and a real delivery

Send a test email only to an address you control. Examples are illustrative: sample links, tracking numbers and gift-card codes do not represent a real order or grant access. A test checks your draft design and subject; the actual notification uses the data present when its event occurs. Review real communication in the order and delivery histories.

Was this page helpful?