This article is a quick-reference for all Liquid tags, date and time formatting tokens, and supported operators available in Optimove. Bookmark this page for easy access while building your templates.
Personalization Tags
| Family | Description | Liquid Syntax |
|---|---|---|
| Customer Attributes |
All customer attributes using the customer.
prefix
|
{{ customer.LANGUAGE }}
|
| General |
All campaign metadata using the general.
prefix
|
{{ general.TEMPLATE_ID }}
|
| Unsubscribe Tag | Generate a personalized unsubscribe link |
{{ compliance.UNSUB }}
|
| Date & Time | Today's date |
{{ "now" | date: "%Y-%m-%d" }}
|
| Date & Time | Adding X days to today's date |
{{ "now" | date_add: X | date: "%d %B %Y" }}
|
| Date & Time | Current time |
{{ "now" | date: "%H:%M" }}
|
| Text Transformations | Capitalize the first letter of each word |
{{ customer.FIRST_NAME | capitalize }}
|
| Text Transformations | Upper case the entire string |
{{ customer.FIRST_NAME | upcase }}
|
| Text Transformations | Lower case the entire string |
{{ customer.FIRST_NAME | downcase }}
|
Date Formatting Tokens
Use the date_format() filter with any date attribute or current_date() to control how dates are displayed.
| Token | Description | Liquid Syntax | Example Output* |
|---|---|---|---|
dd
|
Day with leading zero |
{{ current_date() | date_format("dd") }}
|
03 |
ddd
|
Short day of week |
{{ current_date() | date_format("ddd") }}
|
Tue |
dddd
|
Full day of week |
{{ current_date() | date_format("dddd") }}
|
Tuesday |
d
|
Month/day/year with leading zeros |
{{ current_date() | date_format("d") }}
|
02/03/2026 |
D
|
Long date (Day of Week, day month year) |
{{ current_date() | date_format("D") }}
|
Tuesday, 03 February 2026 |
M
|
Full month name and day with leading zero |
{{ current_date() | date_format("M") }}
|
February 03 |
%M
|
Month number (no leading zero) |
{{ current_date() | date_format("%M") }}
|
2 |
MM
|
Month number (with leading zero) |
{{ current_date() | date_format("MM") }}
|
02 |
*Based on date: February 3, 2026
Time Formatting Tokens
Use the time_format() filter with current_time() to control how times are displayed.
| Token | Description | Liquid Syntax | Example Output* |
|---|---|---|---|
hh / HH
|
Hour with leading zero |
{{ current_time() | time_format("hh") }}
|
08 |
mm
|
Minutes |
{{ current_time() | time_format("mm") }}
|
19 |
ss
|
Seconds with leading zero |
{{ current_time() | time_format("ss") }}
|
22 |
a
|
AM/PM |
{{ current_time() | time_format("a") }}
|
AM |
zz
|
Time zone |
{{ current_time() | time_format("zz") }}
|
+00 |
s
|
Full date with time including seconds |
{{ current_time() | time_format("s") }}
|
2026-02-03T08:19:22 |
r
|
Long form date and time with time zone |
{{ current_time() | time_format("r") }}
|
Tue, 03 Feb 2026 08:19:22 GMT |
*Based on timestamp: 2026-02-03T08:19:22 +00:00
Chaining Multiple Filters
Liquid supports chaining multiple filters together by separating them with the pipe character. For example, combining add_days and date_format allows you to modify the date and control its display format in a single expression.
{{ current_date() | add_days:5 | date_format("yyyy/mm/dd") }}
Result (if today is 2026-02-03): 2026/02/08
Supported Operators
These operators are used inside logic tags {% %} to compare values in conditional statements.
| Operator | Description | Liquid Syntax |
|---|---|---|
==
|
Equal to (two values are the same) |
{% if X == Y %}
|
!=
|
Not equal to (two values are not the same) |
{% if X != Y %}
|
>
|
Greater than |
{% if X > Y %}
|
<
|
Less than |
{% if X < Y %}
|
>=
|
Greater than or equal to |
{% if X >= Y %}
|
<=
|
Less than or equal to |
{% if X <= Y %}
|
Operator Examples
{% if customer.AGE == 18 %}
You are eligible for this promotion.
{% endif %}
{% if customer.COUNTRY != "US" %}
International shipping rates apply.
{% endif %}
{% if event.amount 100 %}
You've qualified for free shipping on this order!
{% endif %}