Conditionals
Cyber Mail 9000 uses Liquid templating for personalized email content. That means you can insert merge tags, add fallback values, and show or hide blocks with {% if %} logic.
If you have used Shopify or Jekyll before, the syntax will feel familiar. If not, this page covers the practical parts you need for broadcasts and templates.
Merge Tag Basics
Merge tags insert dynamic values into your email:
{{ subscriber.email }}
The most common values available in the editor are:
| Tag | What it renders |
|---|---|
{{ unsubscribe_url }} | The subscriber’s unique unsubscribe link |
{{ subscriber.email }} | The subscriber’s email address |
{{ subscriber.fields.first_name }} | A subscriber custom field |
{{ variables.promo_code }} | An account-level variable |
{{ url }} | Your brand website URL |
{{ address }} | Your brand mailing address |
Example:
<a href="{{ unsubscribe_url }}">Unsubscribe</a>
Subscriber Fields
Custom fields are available under subscriber.fields:
{{ subscriber.fields.first_name }}
{{ subscriber.fields.plan }}
{{ subscriber.fields.city }}
The field key must match the key defined in Settings → Fields.
Account Variables
Variables are reusable account-wide values defined in Settings → Variables:
{{ variables.promo_code }}
{{ variables.sale_end_date }}
They are useful for values you want to update once and reuse across multiple broadcasts.
Fallback Values
If a field or variable is empty, Liquid renders nothing by default:
Hey , thanks for subscribing.
Use the default filter to provide a fallback:
{{ subscriber.fields.first_name | default: "there" }}
That renders:
Hey there, thanks for subscribing.
More examples:
{{ subscriber.fields.city | default: "your area" }}
{{ variables.promo_code | default: "SAVE10" }}
{{ subscriber.fields.plan | default: "free" }}
This works in subject lines too:
Hey {{ subscriber.fields.first_name | default: "there" }} - your weekly update is here
Conditional Syntax
Conditionals use {% if %} tags:
{% if CONDITION %}
Content shown when true
{% endif %}
With an else branch:
{% if CONDITION %}
Content for one group
{% else %}
Content for everyone else
{% endif %}
Check Whether a Subscriber Has a Tag
{% if subscriber.tags contains "customer" %}
<p>Thanks for being a customer. Here's your exclusive offer.</p>
{% else %}
<p>Ready to join? Here's what you get.</p>
{% endif %}
Check a Subscriber Field
{% if subscriber.fields.plan == "pro" %}
<p>Your Pro dashboard is ready: <a href="{{ url }}/dashboard">Log in</a></p>
{% endif %}
{% if subscriber.fields.country == "US" %}
<p>Free shipping on all US orders this week.</p>
{% endif %}
Check an Account Variable
{% if variables.promo_active == "true" %}
<p>Use code <strong>{{ variables.promo_code | default: "SAVE10" }}</strong> for 20% off.</p>
{% endif %}
Multiple Branches
Use elsif when you need more than two outcomes:
{% if subscriber.fields.plan == "pro" %}
<p>Pro tip: You can export your data from the dashboard.</p>
{% elsif subscriber.fields.plan == "starter" %}
<p>Upgrade to Pro to unlock data exports.</p>
{% else %}
<p>Start your free trial today.</p>
{% endif %}
Insert Tags and Conditionals in the Editor
You do not need to type everything manually. In the broadcast and template editor, click Insert Tags & Conditionals below the email body.
The panel includes:
- Brand for unsubscribe, URL, and address shortcuts
- Subscriber for email and custom field tags
- Variables for account-level variables
- Conditionals for starter
ifblocks based on tags, fields, or variables
For conditionals, choose the type, fill in the values, and click Insert. The Liquid snippet is inserted at your cursor and you can edit the content inside the block.
Quick Reference
{{ subscriber.email }}
{{ subscriber.fields.first_name | default: "there" }}
{{ subscriber.fields.plan }}
{{ variables.promo_code }}
{{ url }}
{{ address }}
{{ unsubscribe_url }}
{% if subscriber.tags contains "customer" %}...{% endif %}
{% if subscriber.fields.plan == "pro" %}...{% endif %}
{% if variables.sale_active == "true" %}...{% endif %}
{% if subscriber.tags contains "vip" %}
VIP content here
{% else %}
General content here
{% endif %}
Common Mistakes
A tag renders blank
The field key usually does not match exactly. Keys are case-sensitive, so first_name and First_Name are different.
Check Settings → Fields for the exact key.
A conditional is not matching
Values are commonly stored and compared as strings. Use "true" instead of true, and "1" instead of 1.
The unsubscribe link looks wrong
Use {{ unsubscribe_url }} inside an href, not as plain visible text:
<!-- Correct -->
<a href="{{ unsubscribe_url }}">Unsubscribe</a>
<!-- Wrong -->
{{ unsubscribe_url }}
Test output does not look right
Preview and test sends are only meaningful if you use real subscriber data. Pick an actual subscriber when testing if you want to verify field values and conditional branches.