> ## Documentation Index
> Fetch the complete documentation index at: https://docs.notifly.tech/llms.txt
> Use this file to discover all available pages before exploring further.

# Personalize messages with Liquid

> Use Liquid syntax, choose a data category, and check what each channel supports.

Notifly uses the [Liquid template language](https://liquidjs.com/tutorials/intro-to-liquid.html) to personalize messages.

Liquid replaces placeholders in a template with actual values. For example, in a greeting that reads "Hello, \[customer name]!", use a placeholder so each customer sees their own name.

> [!NOTE]
>
> Store reusable reference data such as products, stores, or content in a [catalog](https://docs.notifly.tech/en/user-guide/catalogs/guide.md). Retrieve the data using `catalog_items` or `catalog_selection_items`.

## Basic syntax

* The basic format is `{{ category["variable_name"] | default: "fallback value" }}`.
  * In the expression, specify the category and the field to insert.
  * Use the `default` filter to supply a fallback when the field is missing.
* If the property is missing and you provide no fallback, Notifly sends the message with that part left blank.
* See [Data categories](#data-categories) for the categories you can use. Availability depends on the campaign's audience type and delivery timing.
* In the campaign editor, use **Personalization Variable** to insert a Liquid expression without typing it.

## Data categories

The categories available for personalization depend on the target audience and delivery timing. See [Set the target audience](https://docs.notifly.tech/en/user-guide/campaigns/campaign-segments/segment.md) and [Delivery timing](https://docs.notifly.tech/en/user-guide/campaigns/basic.md#2-delivery-timing).

1. Properties of users in the Notifly database
   * Category name: `user`.
   * Use with **User Group Settings**, AI segments, or CSV uploads that identify users by user ID. For an API-triggered campaign, the recipient must match a registered user.
   * For example, enter `{{ user["age"] }}` where the user's age should appear. The user's age must be stored under `age` in Notifly for the value to render.
   * Use these expressions to access built-in properties:
     * User ID: `user["$user_id"]`
     * Email: `user["$email"]`
     * Phone number: `user["$phone_number"]`
     * If a custom property has the same name as one of these properties, the built-in value takes precedence.
2. Registered device information
   * Category name: `device`.
   * Use registered device data with **User Group Settings**, a CSV upload that identifies users by user ID, or an AI segment. For an API-triggered send, the recipient must match a registered device.
   * Unavailable for the webhook channel.
   * Supported device properties:
     * `external_user_id`: User ID in your service.
     * `platform`: Device platform (`ios` or `android`).
     * `os_version`: Device operating system version.
     * `app_version`: App version.
3. Event parameters
   * Category name: `event`.
   * Use `event` with event-based or API-triggered campaigns.
     * For an event-based send, you can use the parameters from the event that triggered the send. See [Event-based sending](https://docs.notifly.tech/en/user-guide/campaigns/basic.md#2-2-event-based-sending) for ways to send events with parameters.
     * For an API-triggered send, put the parameters in `recipients[].eventParams` in the request body. See [API-based sending](https://docs.notifly.tech/en/user-guide/campaigns/basic.md#2-3-api-based-sending).
   * For example, use `event["name"]` if the event includes a `name` parameter. Without that field, the value cannot be inserted.
4. CSV data for a CSV-based audience
   * Category name: `csv`.
   * Available only for scheduled campaigns that use a CSV upload. CSV-based audiences do not support event-based sends.
   * You can access only fields present in the uploaded file.
   * If the file has a `budget` field, access it with `csv["budget"]`. You cannot create the campaign if it references a field that is missing from the file.
5. Entry event for a user journey
   * Category name: `entry_event`.
   * In a user journey, use it to access parameters from the entry event or from `users[].eventParams` in an API-triggered entry request.
   * For example, use `entry_event["product_name"]` if the entry event includes a `product_name` parameter.
6. CSV fields used to start a user journey
   * Category name: `entry_csv`.
   * If a journey uses CSV-based entry conditions, use it to access fields in the uploaded CSV file.
   * For example, use `entry_csv["coupon_code"]` if the file contains a `coupon_code` field.

## Channel support

> [!WARNING]
>
> LINE currently does not support message personalization.

| Channel | Fields that can be personalized | Output expressions `{{ ... }}` | Tags such as `{% if %}` | Filters other than `default` | Connected Content and `abort_message` |
| - | - | - | - | - | - |
| App push | Title, body, action URL, and custom data | Supported | Supported | Supported | Supported |
| Web push | Title and body | Supported | Supported | Supported | Unsupported |
| In-app popups | Text content, Button labels and links, and HTML blocks | Supported | Supported | Supported | Supported |
| Web popups | Text content, Button labels and links, and HTML blocks | Supported | Supported | Supported | Supported |
| SMS | Title and body | Supported | Unsupported | Limited | Unsupported |
| Kakao Alimtalk | Areas defined as template variables | Supported | Limited | Limited | Unsupported |
| Kakao Brand Message | Areas defined as template variables | Supported | Limited | Limited | Unsupported |
| Email | Title, body, and hyperlinks | Supported | Unsupported | Unsupported | Unsupported |
| Webhook | JSON body | Supported | Supported | Supported | Unsupported |

Popup personalization requires a template made in the new popup editor and a supported SDK version. For editor instructions and minimum SDK versions, see [Create an in-app popup template](https://docs.notifly.tech/en/user-guide/channel/in-app-message/file.md) and [Create a web popup template](https://docs.notifly.tech/en/user-guide/channel/web-message/file.md).

Popups support `user`, `device`, and `event`. Use `entry_event` or `entry_csv` for data from the start of a journey. Notifly inserts a value when the data is available. Popups do not support the `csv` category for regular CSV sends.

## Insert a personalization variable in the editor

1. Select **Personalization Variable** at the bottom left of the message field. The button may be hidden for channels that do not support personalization.
2. Choose a category from the list. The available categories depend on the channel, audience, and delivery timing.

![Personalization variable editor](https://mintcdn.com/notifly/dcFO7QF5JScPffiH/images/i18n/en/campaigns/ui-personalization.png?fit=max\&auto=format\&n=dcFO7QF5JScPffiH\&q=85\&s=060f6c25b3643b133d6d6764ce0890c7)

3. Choose the field to insert or enter its name. This field is required.
4. In **Default Value (Optional)**, enter the text to use when the field is missing.

The Liquid expression appears in the message field.

![A Liquid expression inserted into a message](https://mintcdn.com/notifly/dcFO7QF5JScPffiH/images/i18n/en/campaigns/ui-personalization-example.png?fit=max\&auto=format\&n=dcFO7QF5JScPffiH\&q=85\&s=6f17216ca1e28cce860c1a4ae63c0b64)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.