Variables
In campaigns and automations
In the confirmation and welcome e-mails
The same subscriber and list variables, plus{{ confirm_url }}, the confirmation link.
In transactional e-mails
The variables are the ones your application sends. With:{{ customer.name }} and {{ order.number }}. See Transactional e-mails through the API.
A variable that is unknown or empty is replaced with an empty string. Values are escaped in the HTML: a first name holding
<script> is shown as it is, and does not run.Conditions
The language is Liquid, the one Shopify and many others use: what you know from there works here.attributes: {{ subscriber.attributes.plan }}. A field of type number compares as a number, a date can be written with date.
Filters
A filter changes a value on its way out. They chain, left to right.Loops
["Sourdough bread", "Brioche"]) or over a list of objects ([{"name": "Bread", "quantity": 2}]), whose fields are read with a dot. forloop.first, forloop.last and forloop.index say where the loop is; {% for item in items limit: 3 %} stops early.
What an event brings
In an automation started by something the person did, the e-mails read that event:{{ event.name }}, {{ event.value }}, {{ event.currency }}, and every property it was sent with, directly under event — {{ event.url }}, {{ event.total }}, {% for item in event.items %}. See Events.
Two variables you cannot leave out
A campaign does not go out without:{{ unsubscribe_url }}: a visible unsubscribe link;{{ organisation.address }}(or the address written out in full): the sender’s postal address.