Liquid template bindings deep-dive
Write valid Liquid for OmniLab notifications and understand which bindings each notification type supports.
This guide builds on the Notifications documentation and focuses on the authoring rules that matter when you want templates to survive validation and render cleanly in production.
Where Liquid can be used
Liquid can be used in these notification fields:
Email Subject LineEmail PreheaderEmail ContentEmail CTA LabelEmail CTA Link- The Email Banner's link
How Liquid behaves in OmniLab
- If a documented variable has no value, it renders as an empty string.
- Undefined variables are blocked by validation before launch.
- Invalid Liquid syntax is blocked by validation before launch.
- Render-time errors are also surfaced by validation.
- The selected language variant is resolved first, then Liquid is rendered into that final text.
Binding families
| Binding family | What it contains | Example variables |
|---|---|---|
| Common | Organisation, sender, reply-to, header, footer, and social links | enterprise_name, sender_from_email, reply_from_email |
| Contact | The current participant and contact custom fields | contact_fullname, contact_email, contact_external_id |
| Touchpoint | The current touchpoint or activity context | collectible_title, collectible_location |
| Reward | Reward information | reward_display_name, reward_eligible_title |
| Coupon | Coupon or voucher details | coupon_code, coupon_name |
| Event | Activity and booking experience details | event_title, event_location |
| Booking | Booking-specific fields | booking_id, booking_event_id |
Organisation-level custom variables are also available directly by their own key names. That means a variable such as country can be referenced as {{ country }} if it exists in your OmniLab setup.
Use contact_fullname to greet a participant
A contact's name is stored in one of two shapes, depending on how the campaign's acquisition form collects it: as contact_firstname + contact_lastname, or as a single full name. All three bindings exist, but only one is safe to greet with:
| Binding | Resolves to |
|---|---|
contact_fullname | The contact's name whichever shape they carry — the single full name, or the two parts joined, or their email address as a last resort |
contact_firstname | The given name, empty for a contact acquired through a Full Name campaign |
contact_lastname | The family name, empty for a contact acquired through a Full Name campaign |
Prefer contact_fullname in new templates. A greeting written as Hello {{ contact_firstname }} {{ contact_lastname }}, renders as Hello , for those contacts, and one organisation can hold both shapes at once — so the parts are only safe when you know every contact a template can reach was collected with them.
Existing templates are not rewritten for you
Switching a campaign to a single Full Name field does not update templates already written against contact_firstname. Re-author those templates against contact_fullname at the same time, or the first send after the switch greets nobody.
Availability matrix by notification type
| Notification type | Common | Contact | Touchpoint | Reward | Coupon | Event | Booking | Example variables |
|---|---|---|---|---|---|---|---|---|
Participate | Yes | Yes | No | No | No | No | No | contact_fullname, enterprise_name |
Touchpoint Unlocked | Yes | Yes | Yes | No | No | No | No | collectible_title, collectible_location |
Winner | Yes | Yes | No | Yes | Yes | No | No | reward_display_name, coupon_code |
Loser | Yes | Yes | No | Yes | No | No | No | reward_title, reward_display_name |
Eligible | Yes | Yes | No | Yes | No | No | No | reward_eligible_title, reward_display_name |
Reward Redeemed | Yes | Yes | No | Yes | Yes | No | No | reward_display_name, coupon_code |
Booking Confirmation | Yes | Yes | Yes | No | No | Yes | Yes | event_title, booking_id |
Booking Cancellation | Yes | Yes | Yes | No | No | Yes | Yes | event_title, booking_id |
Booking Confirmation Reminder | Yes | Yes | Yes | No | No | Yes | Yes | event_title, booking_slot_start_date |
Worked examples
Congratulations {{ contact_fullname }}. You won {{ reward_display_name }}Hi {{ contact_fullname }},
Congratulations. You won {{ reward_display_name }}.
Your code: {{ coupon_code }}Hi {{ contact_fullname }},
Your booking for {{ event_title }} is confirmed.
Start time: {{ booking_slot_start_date }}
Location: {{ event_location }}
Booking ID: {{ booking_id }}https://example.com/rewards/{{ reward_id }}?contact={{ contact_external_id }}Rules that prevent validation errors
- Keep HTML outside the
{{ }}delimiters. - Use only letters, numbers, underscores, and dots in variable names.
- Do not reuse a binding family on a notification type that does not support it.
- Keep the message readable even if one variable resolves to an empty value.
- Re-test copied templates when you move them from one notification type to another.
<span>{{ contact_fullname }}</span>{{ <span>contact_fullname</span> }}Common Liquid validation messages
| Problem | Validation message | What to change |
|---|---|---|
| HTML inside Liquid | {{notification_type}} {{field}} contains HTML tags inside liquid template: {{example}} | Move the HTML outside the Liquid delimiters |
| Invalid syntax | {{notification_type}} {{field}} has invalid liquid template syntax: {{error}} | Balance the delimiters and fix malformed expressions |
| Render failure | {{notification_type}} {{field}} liquid template failed to render: {{error}} | Simplify the template logic and keep to supported bindings |
| Undefined variable | Undefined liquid variable '{{variable}}' used in {{notification_type}} {{field}} | Replace it with a documented binding |
| Binding not allowed for this type | Liquid variable '{{variable}}' ({{category}} binding) cannot be used in {{notification_type}} notification {{field}} | Use a binding family that the current notification type supports |
Booking notification dependency that often matters
If you enable Booking Confirmation Reminder, keep Booking Cancellation active as well. OmniLab validation explicitly checks this so participants are not reminded about a booking that can later be cancelled without a matching cancellation email.