Personalise emails with merge fields and fallbacks
A merge field puts a detail about the person into the email when it is sent: {{ first_name }} becomes “Maya”. Add a fallback for people whose detail is missing: {{ first_name | "friend" }} becomes “friend” when there is no first name. Merge fields work in the subject, in text and in links.
Insert one
- Click a text block, or open Email settings for the subject.
- Put the cursor where the detail should go.
- Choose a field from Insert a field… under the text box, or type it yourself between double braces.
In the editor, a merge field shows as a label, such as “First name, or “friend””. The real value appears in a test send and in the sent email.
Fields you can use
| Merge field | Becomes |
|---|---|
{{ first_name }} | The contact’s first name |
{{ last_name }} | The contact’s last name |
{{ email }} | The contact’s email address |
{{ workspace.name }} | Your brand name |
{{ workspace.postal_address }} | Your postal address from Settings, Sending |
{{ event.order_number }} | The order number, in an email a flow sends after an order |
{{ event.discount_code }} | The person’s own discount code, in a flow email that hands one out |
{{ country }} | Any custom field, by its name |
event. fields come from what started a flow, such as the order or the cart, so they are empty in a campaign. Use a fallback with them.
Fallbacks
Write the fallback after a bar: {{ first_name | "friend" }}. Single quotes and no quotes also work: {{ first_name | there }}. Without a fallback, a missing detail becomes nothing, so “Hi {{ first_name }},” would read “Hi ,”.
A campaign is refused when its subject would come out empty for someone whose details are missing, which happens when the subject is only a merge field with no fallback.