Merge tags and personalization
How a variable resolves at send time, and in what order.
Pombo uses real Liquid: {{ variable }} for values, and {% if %} for
conditional content (see below). In the editor, a {{ variable }} shows as a
pill; underneath it's just a variable reference filled in per recipient.
Where values come from
Highest priority wins:
- Per-send override. The "Send test" modal in the app, or the
variablesargument topreview_template,send_test_emailandsend_transactional_email. - Event property.
{{ event.* }}only, from the payload of the event that triggered the send. A separate namespace:{{ event.amount }}never falls through to a contact field calledamount. - Contact field. The recipient's own row, including custom fields.
- Template baked value. A
variablesmap saved on the template, for things that are the same for everyone on a given send (an issue number, a campaign code). - Inline default.
{{ first_name | default: "there" }}renders "there" when nothing better is available.
Contact fields
{{ first_name }}, {{ last_name }}, {{ email }}, {{ phone }}, and any
custom field resolve from the contact. An unfilled tag
renders as a visible marker in template preview links so you notice it. The
marker also hides any inline default.
Event data
A send triggered by POST /api/v1/events carries that event's properties.
Read them as {{ event.amount }}, {{ event.receipt_url }}, and so on, plus
{{ event.name }} for the event's own name. This works in
event-triggered sequences and
event-triggered transactional email.
Conditionals: only show something when a value is there
An optional property, a coupon code or a referrer's name, is either there or
it isn't, and copy that's only correct one of those ways reads broken the
other. Wrap the optional part in {% if %}, and compare against blank:
Thanks for your gift{% if event.amount != blank %} of {{ event.amount }}{% endif %}!
This reads "Thanks for your gift of $50!" when the amount is set, and "Thanks for your gift!", not "Thanks for your gift of !", when it isn't.
Write != blank, not a bare {% if event.amount %}. In Liquid an empty
string is true, so a bare {% if %} only catches a property that is missing
altogether. One that arrives present but empty, which is what an event
property usually is, takes the branch anyway and you get "Thanks for your gift
of !". != blank covers empty, missing and null alike.
{% unless %} works the same way. Type the tag text straight into the block
editor like any other text; there's no separate toolbar button for it yet.
Quoted values and comparisons work in the block editor too:
{% case event.tier %}{% when "gold" %}...{% endcase %},
{% if event.count > 5 %} and {{ first_name | default: "friend" }} are read
the way you typed them.
Before you rely on a conditional in production, use "Send test" with the
value left blank to see the no-value case. If a value is blank rather than
missing entirely, it renders as nothing rather than a [tag] marker, so it's
easy to miss a broken sentence by eye, so send_test flags likely leftover
punctuation (a stray , ! or similar) so you catch it there.
Check each version with an agent
An AI agent can check this without sending
anything, using preview_template:
- Pass
variablesto see a particular version, such as{ "premium": true }and then{ "premium": false }. Use true and false, not text: the text"false"counts as true. - Pass
missing: "blank"to leave out every value you don't supply. This shows inline defaults and what happens when a value is missing.
To check a campaign or a sequence email, use preview_email. It can fill in a
real contact's details, plus sample event data for a sequence email. With a
contact, missing values are left blank, as they are in a real send.
Both tools return the finished subject and text, list unfilled and blank tags, and
flag likely leftover punctuation. A variable used only inside {% if %} is not
listed as unfilled, so supply a value to see its other version. These previews
don't include a shareable link, because the link only shows markers.
System tags
You can't use merge tags in your email footer.
{{ unsubscribe_url }} is injected per contact; you don't set it. The footer
references it automatically on marketing mail.