Output tags are the core of personalization in Liquid. They allow you to insert dynamic data, like a customer's name or a product price, directly into your message content.
How Output Tags Work
An output tag is simply a variable wrapped in
double curly braces {{ }}. When the campaign
runs, Optimove replaces the tag with the actual value for that specific
recipient.
Hello {{ user.first_name }}!
If the customer's name is "Alex", the final message will render as: Hello Alex!
The 4 Attribute Categories
In Optimove, all data is organized into four specific "buckets" (or objects). You must always use the correct prefix so Liquid knows where to look for the data.
| Prefix | Description | Example |
|---|---|---|
| user. | Customer Attributes: Data from the Customer Model (Profile data). |
{{ user.first_name }}
|
| event. | Activity Attributes: Data from the trigger event (e.g., Cart Amount). |
{{ event.product_id }}
|
| general. | System Attributes: Metadata like Campaign ID or Template Name. |
{{ general.CAMPAIGN_ID }}
|
| compliance. | Compliance Links: Unsubscribe links and tracking pixels (Email). |
{{ compliance.unsub }}
|
Deep Dive: Customer Attributes (user.)
Customer Attributes describe the individual receiving the message. These values come directly from your Optimove Customer Model and include demographic info, lifecycle status, and preferences.
You access these by typing user. followed by the column
name
from your model.
Important: Syntax & Case Sensitivity
Liquid is strict about naming. The attribute name in your tag must match the name in your Customer Model exactly, including capitalization.
{{ user.FirstName }}. If you write
{{ user.firstname }}, it will fail to render.
Common Examples
-
Greeting:
Hi {{ user.First_Name }} -
Loyalty Status:
Thanks for being a {{ user.VIP_Tier }} member! -
Dates:
Your renewal is on {{ user.Renewal_Date }}
Handling Missing Data
If a customer does not have a value for an attribute (e.g., their "First Name" is empty), Liquid will simply render nothing. To prevent awkward gaps in your text, you should use the default filter.
Hi {{ user.first_name | default: 'there' }}!
We will cover this in detail in the Filters & Formatting article.