Skip to content
Docs

Reference

Personalize campaign subjects and content with merge tags for names, email, custom fields, the unsubscribe link and the manage subscriptions link, with Temple fallbacks and conditionals.

Updated Oct 20, 2026

Merge tags insert each recipient’s own data into a campaign: their name in the subject, a custom field in the body, and their personal unsubscribe and manage subscriptions links. Campaigns render them with Temple, Emailit’s template language, so you can also add fallbacks and conditional blocks. This page lists every tag, the syntax rules and how to preview the result.

Available tags

Tag Replaced with
{{first_name}} The contact’s first name.
{{last_name}} The contact’s last name.
{{email}} The contact’s email address.
{{unsubscribe_url}} The recipient’s personal unsubscribe link. See Unsubscribes.
{{manage_subscriptions_url}} The recipient’s link to the manage subscriptions page, where they choose their audiences. Empty in test sends.
{{cf.<key>}} The value of a custom field, by its key. For example, {{cf.company}} for a field with the key company.
{{global.<key>}} A workspace global value, such as {{global.offer_url}}. The same for every recipient.
{{tags}} The contact’s tags, such as vip, customer. {{#if tags}}…{{/if}} checks that the contact has any.
{{score}} The contact’s lead score.
{{webview_url}} A link to the web version of the email, rendered for that recipient.

With Commerce, an alpha for the Emailit team, campaigns also have tags for products, coupon codes, the cart and purchase data. See Products, coupons and the cart.

Custom fields also work as {{custom_fields.<key>}}, the form automations use, and every tag is available under contact too, for example {{contact.first_name}}.

Merge tags work in the campaign Subject, the HTML content and the plain-text version. They aren’t replaced in the From name, From email or Reply to.

HTML
<p>Hi {{first_name}},</p>
<p>Your {{cf.plan}} plan now includes scheduled sending.</p>
<p><a href="{{unsubscribe_url}}">Unsubscribe</a> from Acme emails sent to {{email}}.</p>

Insert tags in the editors

  • Rich-text editor: type @ and choose a variable, or a custom field by its name.
  • Dragit editor: use the merge fields menu, which lists First name, Last name, Email and your custom fields. The unsubscribe and manage subscriptions links are under the special links.
  • HTML editor and the Subject field: type the tag.

Syntax rules

  • Spaces around a tag name are ignored, so {{ first_name }} works like {{first_name}}. Conditional blocks are stricter: write {{else}} and {{/if}} exactly as shown, and start a condition with {{#if, with no space after the braces.
  • Tag names are not case-sensitive, so {{First_Name}} works too. This covers the six tags in the table and the cf. prefix. Custom field keys must match the stored key exactly, and keys are always lowercase, so write {{cf.company}}, not {{cf.Company}}. Paths under contact and custom_fields are case-sensitive.
  • Custom fields need a prefix. Write {{cf.company}}: {{company}} isn’t a merge tag, so it renders as empty.
  • Anything else in double braces is removed. Temple treats every {{…}} as a placeholder, and one without a value renders as empty. There’s no escape syntax: to show literal double braces in HTML, write them as &#123;&#123;.

Missing values

When a contact has no value for a tag, the tag is replaced with nothing. Add a fallback after a pipe to use instead. An empty field counts as missing, so it gets the fallback too.

Content Contact with a first name Contact without one
Hi {{first_name}}, Hi Ada, Hi ,
Hi {{first_name|"there"}}, Hi Ada, Hi there,

Double quotes, single quotes or no quotes all work around the fallback. On the Contacts list, filter by First name with is empty to find contacts with a missing name.

Conditional content

Show a block only to contacts who have a value, with an optional {{else}} for everyone else:

HTML
{{#if cf.plan}}
<p>Your {{cf.plan}} plan now includes scheduled sending.</p>
{{else}}
<p>Upgrade to get scheduled sending.</p>
{{/if}}

A condition is false when the field is missing or empty, false or 0, and true otherwise. There are no comparisons such as cf.plan == "Pro": to target one value, store it in its own field, for example a Boolean is_pro. Blocks can be nested. See Conditionals for the full rules.

How values are rendered

Field type Rendered as
Text, Number The stored value, for example Acme or 42.
Date YYYY-MM-DD, for example 1990-04-12.
Boolean true or false.
Select The selected option.
Multi select The options separated by commas, without spaces, for example news,offers.

Values are inserted exactly as stored, without HTML escaping. If people can enter their own names, for example through a public sign-up form, check those values before you use them in HTML.

Preview merge tags

  • Preview as contact, in the Preview and test step, renders the subject and content with a real contact’s data. Use it to check names, custom fields and empty values.
  • Test sends to an address that belongs to a contact in this workspace use that contact’s data. For other addresses, {{email}} becomes the test address and names and custom fields are empty, so fallbacks and {{else}} blocks show. The unsubscribe link in a test doesn’t unsubscribe anyone.

See Test and schedule.

Merge tags and Temple

Campaign merge tags are Temple placeholders filled from the recipient’s contact. Templates sent through the Email API and emails sent by automations use Temple too, with different data:

Campaigns API sends Automation emails
Data The recipient contact The variables you pass The run’s contact, event data and metadata
Custom fields {{cf.<key>}} or {{custom_fields.<key>}} Whatever you pass, for example a cf object {{cf.<key>}} or {{custom_fields.<key>}}
Unsubscribe and manage links {{unsubscribe_url}}, {{manage_subscriptions_url}} Not provided {{unsubscribe_url}}, {{manage_subscriptions_url}} in Contact automations
Letter case of tag names Any, for the six tags above Exact Exact

So a template that uses {{cf.<key>}}, fallbacks and conditionals renders the same in a campaign and in a contact automation. If you save a campaign as a template and send it with the API, Temple fills its tags from the variables you pass. Pass first_name for {{first_name}}, a cf object for {{cf.company}} and your own unsubscribe_url if the content links to one.

Define the fields you use in merge tags.
The full template language: variables, fallbacks and conditionals.

Was this page helpful?

Thanks for the feedback.

Thanks, we read every message.