Overview
Clix supports template-based personalization so you can insert variables and light business logic in message content, deep links, and audience targeting rules. Reference user traits, event properties, and app context to tailor each message to a recipient. You can apply the syntax in:- Message content – title, body, subtitle
- Links – dynamic URL or deep link parameters
- Audience targeting – conditional logic that includes or excludes users
Data You Can Use
| Object | Description | Example |
|---|---|---|
user.* | Properties captured about the user | user.username, user.tier |
event.* | Properties from the triggering event | event.distance, event.elapsedTime |
trigger.* | Custom properties passed via API trigger | trigger.promotion, trigger.discount |
Device and System Variables
In addition touser.*, event.*, and trigger.*, Clix templates also support device and environment variables you can use for targeting or message personalization.
| Object | Description | Example |
|---|---|---|
device.id | Unique device identifier | {{ device.id }} → a8c9e1... |
device.platform | Platform name (IOS or ANDROID) | {{ device.platform }} → IOS |
device.locale | Device locale code | {{ device.locale }} → US |
device.language | Device language | {{ device.language }} → en |
device.timezone | Device timezone | {{ device.timezone }} → Asia/Seoul |
user.id | Project user ID | {{ user.id }} → clix_user |
event.name | Event name | {{ event.name }} → run_completed |
Output Variables
Use double curly braces{{ ... }} to print a value.
Example (message content)
Example (URL)
Conditional Logic
Wrap conditional blocks in{% if %}, {% else %}, and {% endif %}.
Supported operators:
==,!=,>,<,>=,<=and,or,not
Loops
Iterate over arrays with{% for %}.
Filters
Filters transform values inside{{ ... }} blocks and can be chained with the pipe (|) operator.
| Filter | Description | Example |
|---|---|---|
upcase / downcase | Converts all characters to upper or lower case. | {{ “Clix” | upcase }} → CLIX |
capitalize | Makes the first character of a string capitalized and converts the remaining characters to lowercase. | {{ “hello world” | capitalize }} → Hello world |
default | Provides a fallback when the value is empty or missing. | {{ user.username | default: “Guest” }} → Guest (if username is undefined) |
join | Combines array elements into a single string with a separator. | If user.tags = ["active", "runner", "beta"], then {{ user.tags | join: ”, ” }} → active, runner, beta |
split | Splits a string into an array using a delimiter. | {{ “a,b,c” | split: ”,” }} → ["a", "b", "c"] |
escape | Escapes special HTML characters. | {{ “<div>” | escape }} → <div> |
strip | Removes leading and trailing whitespace. | {{ ” Clix ” | strip }} → Clix |
replace | Replaces all occurrences of a substring. | {{ “hello world” | replace: “world”, “Clix” }} → hello Clix |
Chaining Filters
Filters can be applied in sequence:default filter runs first, then the result is converted to uppercase.
Full Example
Event Payload
API Trigger Example with Custom Properties
Message Title (Event Example)
Message Body (Event Example)
Deep Link (Event Example)
Message Body (API Trigger Example)
With the API trigger properties above (promotion and discount), personalize your message using the trigger namespace:
🎉 Holiday Sale is here! Get 30% off now!
Best Practices
- Use simple, serializable data types (numbers, strings, booleans).
- Pre-format data (e.g.,
"7.4 miles","38m 40s") before sending, then reference it directly. - Add guards for missing data.
- Keep logic minimal. Complex branching belongs in your app or segmentation setup, not inside message templates.
Error Handling
- Unknown variables render as an empty string.
- Invalid conditions evaluate to
false. - Template rendering errors appear in Message Logs with error details.