Merge Tags
Merge tags inject dynamic contact data into your email subject lines and body content. Use them to personalize greetings, reference custom fields, show conditional content, and insert required links — all with a simple double-brace syntax.
Overview
Merge tags use a double-brace syntax: {{tag_name}}. When EmailSendX sends a campaign, it replaces each tag with the corresponding value for the recipient contact.
Merge tags can be used in:
- Email subject lines — e.g.,
Hey {{first_name}}, your April update is here - Email body (any editor mode — Visual, HTML, MJML)
- Preview text
- From name — e.g.,
Alex from {{workspace_name}}
Always include {{unsubscribe_link}}
{{unsubscribe_link}} in every campaign email is required by CAN-SPAM law. EmailSendX will auto-insert a standard unsubscribe footer if this tag is missing from your template — but it's best practice to include and style it yourself so it fits your design. Removing the auto-inserted footer requires explicit inclusion of the tag.Conditional Blocks
Use Liquid-style conditional blocks to show or hide content based on contact data. This is especially useful for personalized greetings, tier-specific offers, or language variations.
# Basic if/else
{% if first_name %}Hi {{first_name}},{% else %}Hi there,{% endif %}
# Checking a custom field value
{% if custom.plan == "pro" %}
<p>As a Pro user, you get access to priority support.</p>
{% elsif custom.plan == "business" %}
<p>Your Business plan includes a dedicated account manager.</p>
{% else %}
<p>Upgrade to Pro or Business for priority support.</p>
{% endif %}
# Checking if a field is set at all
{% if custom.company %}
<p>We're excited to work with the team at {{custom.company}}!</p>
{% endif %}
# Checking a tag
{% if contact.has_tag("vip") %}
<p>Your exclusive VIP offer is inside.</p>
{% endif %}Conditional blocks work in all editors
Supported operators in conditions:
==— equals!=— not equals>,<,>=,<=— numeric comparisonscontains— string contains check- Bare variable:
{% if first_name %}is truthy when the field is non-empty
Fallback Values
When a merge tag references a field that's empty or missing for a given contact, EmailSendX outputs nothing by default — which can result in awkward copy like "Hi ," with no name. Use the | default: filter to specify a fallback:
# Fallback for empty fields
{{first_name | default:"there"}}
# → "Hi there," when first_name is empty
{{custom.company | default:"your company"}}
# → "Excited to work with your company!" when company is missing
{{custom.plan | default:"free"}}
# → Shows "free" when no plan is set
# Nested: combine with conditional
Hi {{first_name | default:"there"}},
We're glad you joined {{custom.company | default:"us"}}!Fallback vs conditional — which to use?
| default: for simple substitutions (a word or phrase). Use {% if %} blocks when the alternative content is a full sentence or paragraph that differs significantly from the main content.Testing merge tags before sending
The template and campaign editors both include a Preview with data mode. Enter sample values for each field (or select an existing contact as a preview subject) to see exactly how the email will render for that person. Always preview with at least two contacts — one with complete data and one with missing fields — to verify your fallbacks are working.
Personalize every email
Merge tags let you greet contacts by name, reference their plan, show conditional offers, and more — at scale.