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
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_firstname, 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.
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_firstname, 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_firstname }}. You won {{ reward_display_name }}Hi {{ contact_firstname }},
Congratulations. You won {{ reward_display_name }}.
Your code: {{ coupon_code }}Hi {{ contact_firstname }},
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_firstname }}</span>{{ <span>contact_firstname</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.