Liquid templating lets you create personalized messages with advanced logic, such as showing different content based on customer location, using fallback text when data is missing, or formatting dates and prices dynamically. Use Liquid in Email Campaigns, SMS, and Push Notifications.
Before You Begin
Liquid templating works in Campaigns and Automation – Email, SMS, and Push Notifications all support Liquid objects and filters.
Test personalization before sending – Test emails show raw Liquid tags (
[[ contact.first_name ]]). Use Test & Preview in the editor and select a real contact to see personalization populate.Always add fallback values – Use
| default: 'text'to avoid blank spaces when contact data is missing.Omnisend uses modified Liquid syntax – Replace Shopify's curly braces
{{ }}with square brackets[[ ]].
💡 New to personalization? Start with standard personalization before using Liquid. Liquid is for advanced use-cases.
Overview: What is Liquid
Liquid is an open-source templating language created by Shopify. It lets you insert dynamic content into messages using three elements:
Objects – Variables that output contact or order data (
[[ contact.first_name ]])Tags – Logic and control flow (
[% if contact.country == 'France' %])Filters – Modify output (
[[ contact.first_name | capitalize ]])
Omnisend uses a modified version of Liquid:
Objects: Use
[[ ]]instead of{{ }}- Example:[[ contact.first_name ]]Tags: Use
[% %]instead of{% %}- Example:[% if contact.country == 'France' %]
💬 Learn more about Liquid in Shopify's documentation and remember to replace curly braces with square brackets in Omnisend.
Objects
Objects are variables that output dynamic content from contact profiles, orders, or your account settings. Objects are always enclosed in double square brackets.
[[ contact.first_name ]]
Available object groups:
Contact properties:
[[ contact.variable ]](name, email, location, custom properties)Account properties:
[[ account.variable ]](store name, website, currency)Order properties:
[[ order.variable ]](order ID, total, items) – Automation Workflows onlyCart properties:
[[ cart.variable ]](abandoned cart URL) – Automation Workflows onlyDate properties:
[[ current_date ]](current day, month, year)
View the full Objects Reference Table below.
Filters
Filters change the output of a Liquid object. Filters are separated by a pipe | symbol.
Example:
[[ 'mywebsite.com/orders/' | append: order.order_id ]]
Common filters:
default– Add fallback text when data is missing:[[ contact.first_name | default: 'there' ]]capitalize– Capitalize the first letter:[[ contact.city | capitalize ]]upcase– Convert to uppercase:[[ contact.country | upcase ]]append– Add text to the end:[[ account.website | append: '/sale' ]]date– Format dates:[[ current_date | date:'%B %d, %Y' ]]→ "May 13, 2026"vocative– Adjust names to vocative form in supported languages:[[ contact.first_name | vocative ]]
Learn more about Liquid filters in Shopify's documentation – remember to use Omnisend's [[ ]] syntax.
Tags (Automation Only)
Tags create logic and control flow in messages. Tags are enclosed in [% %] braces and produce no visible text.
Example:
[% if contact.first_name %] Hi [[ contact.first_name ]] [% endif %]
⚠️ Tags work only in Automation – not in Campaigns. Learn more about Liquid tags in Shopify's documentation.
Common Use Cases
Here are several helpful common use cases for Liquid syntax:
Personalization
Hi [[ contact.first_name ]], welcome to Omnisend!
Output: "Hi Sarah, welcome to Omnisend!"
💡 Tip: This filter automatically adjusts the name to its vocative form in supported languages, making your messages sound more natural and personal. This can be achieved by using vocative personalization: [[ contact.first_name | vocative ]]
Personalization with Fallback
Hi [[ contact.first_name | default: 'there' ]], welcome to Omnisend!
Output (if first name is missing): "Hi there, welcome to Omnisend!"
💡 Why use fallbacks?
If a contact's profile is missing data (e.g., no first name), personalization tags will display blank spaces. Fallbacks prevent this:
With fallback:
Hi [[ contact.first_name | default: 'there' ]]→ "Hi there"Without fallback:
Hi [[ contact.first_name ]]→ "Hi "
Always add fallbacks to avoid awkward blank spaces.
Variable Insertion in Messages
Insert Liquid variables in:
Email subject lines:
Don't forget your cart, [[ contact.first_name ]]!Email body text:
Your order total: [[ order.total_price ]] [[ order.currency ]]SMS messages:
Hi [[ contact.first_name ]], your order #[[ order.order_number ]] shipped!Push notifications:
[[ contact.first_name ]], 20% off ends todayButton links:
[[ account.website ]]/orders/[[ order.order_id ]]
Conditional Logic (Automations Only)
Use conditional statements to show different content based on contact data.
Language Localization
[% if contact.custom_properties.language == 'Spanish' %] Hola [[ contact.first_name ]]! [% elsif contact.custom_properties.language == 'French' %] Bonjour [[ contact.first_name ]]! [% else %] Hi [[ contact.first_name ]]! [% endif %]
Location-Based Content
[% if contact.country == 'UK' or contact.country == 'Ireland' %] Have you visited our newest flagship store in London? [% endif %]
Formatting
Capitalize First Letter
Hi [[ contact.first_name | capitalize ]]
Output: "Hi sarah" → "Hi Sarah"
Append Custom Text
[% assign campaign_destination = '/landing_page.html' %] [[ account.website | append: campaign_destination ]]
Output: "www.yourstore.com/landing_page.html"
Format Dates
Omnisend © [[ current_date | date:'%Y' ]]
Output: "Omnisend © 2026"
Date format options:
%d– Day (13)%A– Day name (Wednesday)%m– Month number (05)%B– Month name (May)%Y– Year (2026
Objects Reference Table
Contact Properties
Dropdown Title | Tag | Value Type | Description |
| string | Contact email | |
Name |
| string | Contact's first name |
Surname |
| string | Contact's last name |
City |
| string | Contact's city |
Country |
| string | Contact's country |
State | [[ contact.state ]] | string | Contact's state |
Postal code | [[ contact.postal_code ]] | string | Contact's postal code |
Unsubscribe link | [[ unsubscribe_link ]] | – | Contact's link to unsubscribe |
Preference center link |
| – | Contact preference link |
Custom properties |
| object | Contact's custom properties |
Phone number |
| string | Contact's phone number |
Account Properties
Dropdown Title | Tag | Value Type | Description |
| string | Contact email | |
Name |
| string | Contact's first name |
Surname |
| string | Contact's last name |
City |
| string | Contact's city |
Country |
| string | Contact's country |
State | [[ contact.state ]] | string | Contact's state |
Postal code | [[ contact.postal_code ]] | string | Contact's postal code |
Unsubscribe link | [[ unsubscribe_link ]] | – | Contact's link to unsubscribe |
Preference center link |
| – | Contact preference link |
Custom properties |
| object | Contact's custom properties |
Phone number |
| string | Contact's phone number |
Account Properties
Dropdown Title | Tag | Value Type | Description |
Name |
| string | Account's name |
Address |
| string | Account's address |
City |
| string | Account's city |
ZIP / Postal code |
| string | Account's ZIP / Postal code |
Country |
| string | Account's country |
Website URL |
| string | Account's website URL |
Time zone |
| string | Account's timezone |
Currency |
| string | Account's currency |
Date Properties
Dropdown Title | Tag | Value Type | Description |
Current day |
| - | The day on which the action is performed |
Current day name |
| - | The day on which the action is performed |
Current month |
| - | The month when the action is performed |
Current month name |
| - | The month name when the action is performed |
Current year |
| - | The current year when the action is performed |
Order Properties (Automation Only)
Dropdown Title | Tag | Value Type | Description |
Order ID |
| string | Order's ID |
Order number |
| int64 | Order's number |
Order name |
| string | Order's name |
Order date |
| Date | Date when order is created |
Currency |
| string | Order's currency |
Total price |
| int64 | Order's sum in total |
Subtotal price |
| int64 | Subtotal order's sum |
Discount |
| int64 | Order's discount |
Shipping price |
| int64 | Order's shipping price |
Order status page URL |
| string | URL to reach exact order information |
Order note |
| string | Additional order notes |
Billing Address (Automation Only)
Dropdown Title | Tag | Value Type | Description |
First name |
| string | Contact's first name provided in billing address |
Last name |
| string | Contact's last name provided in billing address |
Country |
| string | Contact's country provided in billing address |
Country code |
| string | Contact's country code provided in billing address |
State |
| string | Contact's state provided in billing address |
State code |
| string | Contact's state code provided in billing address |
City |
| string | Contact's city provided in billing address |
Address 1 |
| string | Contact's address (1st line) provided in billing address |
Address 2 |
| string | Contact's address (2nd line) provided in billing address |
ZIP / Postal code |
| string | Contact's ZIP / Postal code provided in billing address |
Company |
| string | Contact's company title provided in billing address |
Phone |
| string | Contact's phone number provided in billing address |
Shipping Address (Automation Only)
Dropdown Title | Tag | Value Type | Description |
First name |
| string | Contact's first name provided in shipping address |
Last name |
| string | Contact's last name provided in shipping address |
Country |
| string | Contact's country provided in shipping address |
Country code |
| string | Contact's country code provided in shipping address |
State |
| string | Contact's state provided in shipping address |
State code |
| string | Contact's state code provided in shipping address |
City |
| string | Contact's city provided in shipping address |
Address 1 |
| string | Contact's address (1st line) provided in shipping address |
Address 2 |
| string | Contact's address (2nd line) provided in shipping address |
ZIP / Postal code |
| string | Contact's ZIP / Postal code provided in shipping address |
Company |
| string | Contact's company title provided in shipping address |
Phone |
| string | Contact's phone number provided in shipping address |
Cart Properties (Automation Only)
Dropdown Title | Tag | Value Type | Description |
Abandoned cart URL |
| string | URL to reach/recover abandoned cart |
Troubleshooting
Personalization shows raw code in emails
Cause: You're viewing a test email instead of a live email.
Solution: Test emails always show raw Liquid tags ([[ contact.first_name ]]). To test personalization:
Use Test & Preview in the editor and select a real contact.
Or send the campaign/automation live to your own email (ensure your contact profile has data).
Personalization doesn't transform in live emails
Cause: The Liquid tag may have lost integrity if edited partially.
Solution: Delete the entire personalization tag and reinsert it using the Personalization tag menu in the editor.
Fallback text doesn't work
Cause: Incorrect syntax or missing quotes.
Solution: Ensure fallback values are wrapped in quotes:
✅
[[ contact.first_name | default: 'there' ]]❌
[[ contact.first_name | default: there ]]
Conditional logic doesn't work in Campaigns
Cause: Tags and conditional statements work only in Automation Workflows.
Solution: Use conditional logic in automations – not Campaigns.
FAQ
Can I use Liquid in SMS and Push Notifications?
Yes. Liquid objects and filters work in Email, SMS, and Push Notifications. Conditional logic works only in Automation.
What's the difference between {{ }} and [[ ]]?
Shopify uses {{ }} for Liquid objects. Omnisend uses [[ ]]. If you're copying Liquid code from Shopify documentation, replace curly braces with square brackets.
Do I need to add fallback values?
Yes. Always add fallbacks to avoid blank spaces when contact data is missing:
[[ contact.first_name | default: 'there' ]]
Can I combine multiple filters?
Yes. Chain filters with | symbols:
[[ contact.first_name | capitalize | default: 'there' ]]
Where can I find more Liquid examples?
Learn more in Shopify's Liquid documentation – remember to replace {{ }} with [[ ]] and {% %} with [% %] in Omnisend.
You are welcome to contact our award-winning Support Team for any additional assistance through the in-app chat or at [email protected].
