> This page is part of the [Customer.io documentation](https://docs.customer.io). For the complete index, see [llms.txt](https://docs.customer.io/llms.txt).
> Last updated: July 10, 2026

# Liquid syntax list

This page contains a list of the liquid tags, keys, and filters available to you in Customer.io. If you’re new to liquid, you can learn more in our guide about [personalizing messages](/messaging/liquid/using-liquid/).

 You're looking at the latest Liquid documentation

**If your account was created on or after Nov 28, 2023,** you are using our latest liquid version for all messages. If your account was created before this date, go to [How to upgrade your liquid version](/messaging/liquid/upgrade/#how-to-upgrade) for more info.

The two versions are largely similar, but you'll find a list of differences on our [Liquid Upgrade page](/messaging/liquid/upgrade/#differences-in-liquid-versions).

 You're looking at legacy Liquid documentation

**If your account was created on or after Nov 28, 2023,** you are using our latest liquid version for all messages. If your account was created before this date, go to [How to upgrade your liquid version](/messaging/liquid/upgrade/#how-to-upgrade) for more info.

The two versions are largely similar, but you'll find a list of differences on our [Liquid Upgrade page](/messaging/liquid/upgrade/#differences-in-liquid-versions).

Looking for something specific?  

*   ## Customer.io Keys
    
    These keys output data related to customers and campaign triggers.
    
*   ### cio\_link
    
    Use this tag to track links in outside of push or in-app messages. This includes `mailto` links. If you use our SDKs, you do not need to use this tag to track links in in-app messages. To track links in *emails*, go to `cio_link_id` below.
    
    The filters `track` and `url_params` are optional. If you exclude these filters, url parameters will be present and tracking will be on. To turn either off, set them to false. For more info on this tag, go to [Link tracking](/journeys/channels/links/tracking/#other-message-types).
    
    Do not use this tag to track [deep links](/journeys/channels/links/universal-links/#deep-links-vs-universal-links).
    
    ##### Example
    
    ```text
    {% cio_link url:https://example.com %}
    {% cio_link url:https://example.com track:true url_params:true %}
    {% cio_link url:https://example.com track:true url_params:false %}
    {% cio_link url:https://example.com track:false url_params:true %}
    {% cio_link url:https://example.com track:false url_params:false %}
    ```
    
    ##### Output
    
    ```text
    https://e.customeriomail.com/e/c/{string}
    https://e.customeriomail.com/e/c/{string}
    https://e.customeriomail.com/e/c/{string}
    https://example.com?utm_campaign={string}&utm_content={string}&utm_medium={string}&utm_source=customer.io
    https://example.com
    ```
    
*   ### cio\_link\_id
    
    Use this to track [deep links](/journeys/channels/links/universal-links/#deep-links-vs-universal-links) in **emails**. Visit [Track universal and app links in email](/journeys/channels/links/universal-links/#track-universal-and-app-links-in-email) for instructions.
    
    For links in non-email messages, go to `cio_link` above.
    
    ##### Example
    
    ```text
    <a href="https://yourwebsite.com/confirm?link_id={% cio_link_id %}" class="untracked">Text</a>
    ```
    
*   ### customer attributes
    
    You reference customer attributes—data associated directly with a person in Customer.io—in the `customer` scope. You may want to use customer attributes with an `if` conditional so you have text to fallback to if a customer doesn’t have the attribute in question. You can use `default` rather than checking for empty strings using `== blank` or `!= blank`.
    
    ##### Syntax
    
    ```text
    {{customer.<attribute_name>}}
    ```
    
    ##### Example
    
    ```text
    Hi {{ customer.first_name | default: "there" }}
    
    {% if customer.first_name != blank %}
      Hello {{ customer.first_name }}!
    {% else %}
      Hello there!
    {% endif %}
    ```
    
*   ### event properties
    
    If you trigger a campaign using an event, you can reference properties from the event that triggers your campaign in the `event` scope. You may want to use event properties with an `if` conditional, so that you have text to fallback to if an event doesn’t have the property in question or your property doesn’t contain the value you expect. You can use the `default` filter rather than checking for empty strings using `== blank` or `!= blank` too.
    
    ##### Syntax
    
    ```text
    {{event.<property>}}
    ```
    
    ##### Example
    
    ```text
    {% if event.type == "purchase" %}
      Thanks for your purchase!
    {% else %}
      Thanks for using our service!
    {%endif%}
    ```
    
*   ### event\_id
    
    The id of the event being previewed for the selected sample profile. It throws an error if the event has not been sent recently (within the last ~30 days).
    
    ##### Syntax
    
    ```text
    {{event_id}}
    ```
    
*   ### event\_name
    
    The name of the event that triggers a campaign. If you send an event with different casings - for instance, MyEvent and myevent - Customer.io will output the event name that corresponds with the profile. This throws an error if the event has not been sent recently (within the last ~30 days).
    
    ##### Syntax
    
    ```text
    {{event_name}}
    ```
    
*   ### event\_timestamp
    
    The UNIX timestamp when a particular event was performed. This throws an error if the event has not been sent recently (within the last ~30 days).
    
    ##### Syntax
    
    ```text
    {{event_timestamp}}
    ```
    
*   ### journey attributes
    
    Journey attributes are unique to workflows. You can temporarily store data during a campaign instead of on a customer’s profile. Learn more about [setting journey attributes](/journeys/send/workflows/attribute-updates/set-journey-attributes/). To reference journey attributes in messages or webhooks, you’ll use the `journey` object.
    
    ##### Syntax
    
    ```text
    {{journey.<attribute_name>}}
    ```
    
    ##### Example
    
    ```text
    {% if journey.weather != blank %}
      Here's the forecast for the day: {{journey.weather}}!
    {% else %}
      Check out your forecast online at...
    {%endif%}
    ```
    
*   ### object & relationship attributes
    
    This syntax lets you reference object or relationship data associated with people, not campaign triggers. For trigger liquid, see [trigger properties](#trigger-properties-latest). The keys you’ll need depend on your use case. See [Objects in liquid](/journeys/objects-data/objects/in-liquid/#reference-non-trigger-data) for more information, and make sure you [understand the limitations before using this liquid](/journeys/objects-data/objects/in-liquid/#before-you-begin).
    
    ##### Syntax
    
    ```text
    {{objects.<object-type-name>[#].<object-attribute-name>}} // reference an object attribute
    {{objects.<object-type-name>[#].relationship.<relationship-attribute-name>}} // reference a relationship attribute
    {{customer._relationship.<relationship-attribute-name>}} // reference a relationship attribute for the audience member of object or relationship-triggered campaigns
    ```
    
    ##### Example
    
    ```text
    // list all online classes that a person has not started
    {% for class in objects.online_classes %}
    {% if class.relationship.status == "not_started" %}
      - {{class.name}}
    {% endif %}
    {% endfor %}
    ```
    
*   ### render\_liquid
    
    Renders nested liquid syntax within an attribute value. Use this tag on any attribute whose value contains liquid—like content generated by [LLM actions](/journeys/send/workflows/llm-actions/), webhooks, or other sources. Without `render_liquid`, liquid syntax in the attribute value displays as static text instead of rendering dynamically.
    
    For example, if an LLM action stores `Hello {{customer.first_name}}` in a [journey attribute](#journey-attributes-latest) called `body`, referencing it with `{{journey.body}}` outputs the literal text `Hello {{customer.first_name}}`. Use `{% render_liquid journey.body %}` to render the customer’s actual name.
    
    ##### Syntax
    
    ```text
    {% render_liquid <liquid-key-name>.<attribute_name> %}
    ```
    
    ##### Example
    
    ```text
    {% render_liquid journey.body %}
    ```
    
*   ### snippets
    
    [Create snippets](/journeys/liquid/snippets/) to reuse content across your messages. For instance, you could make a footer with a snippet.
    
    ##### Example
    
    ```text
    {{snippets.footer}}
    ```
    
*   ### trigger properties
    
    The `trigger` object can pull in data that triggers a transactional message, API-triggered broadcast, and campaigns triggered by webhooks, objects, or relationships. Remember to add fallbacks with conditionals or the `default` filter; otherwise, your messages could fail to send if the value and a fallback don’t exist. [Learn more about using `trigger` objects](/journeys/liquid/using-liquid/#trigger-properties).
    
    ##### Syntax
    
    ```text
    // For transactional messages, webhook-triggered campaigns, or API-triggered broadcasts
    {{trigger.<data.property>}}
    
    // For object-triggered campaigns
    {{trigger.<object_type>.<attribute_name>}}
    
    // For object or relationship-triggered campaigns
    {{trigger.relationship.<attribute_name>}}
    ```
    
    ##### Example
    
    ```text
    {% if trigger.first_name %}
      Hi {{trigger.first_name | capitalize}}!
    {% else %}
      Hi friend!
    {%endif%}
    ```
    
*   ### view\_in\_browser\_url
    
    Our default link that generates a web version of your email, [personalized for each recipient](/journeys/channels/email/layouts/view-in-browser). This tag only works in **emails**—it is not supported in other message types like push notifications, in-app messages, SMS, or WhatsApp. If you set up [custom link tracking](/journeys/channels/email/deliverability/link-tracking-custom-domain/), your view in browser links use your branded domain. In general, these URLs look something like: `https://e.customeriomail.com/deliveries/....`
    
    ##### Syntax
    
    ```text
    {% view_in_browser_url %}
    ```
    
*   ## Customer.io Unsubscribe Keys
    
    These keys output unsubscribe links unique to each customer.
    
*   ### manage\_subscription\_preferences\_url
    
    Renders a unique unsubscribe link for [a customer and their email-address](/journeys/channels/subscriptions/overview/#unsubscribe-links). This link takes a user to your subscription center where they can manage all of their preferences.
    
    ##### Syntax
    
    ```text
    {% manage_subscription_preferences_url %}
    ```
    
*   ### unsubscribe
    
    Renders the word unsubscribe and links to the customer’s unique unsubscribe URL.
    
    ##### Syntax
    
    ```text
    {% unsubscribe %}
    ```
    
*   ### unsubscribe\_url
    
    Renders a unique unsubscribe link for [a customer and their email-address](/journeys/channels/subscriptions/unsubscribes/#how-do-i-add-an-unsubscribe-link-into-a-custom-layout).
    
    ##### Syntax
    
    ```text
    {% unsubscribe_url %}
    ```
    
*   ## Customer.io Meta Keys
    
    These keys output high-level data around your messages, campaigns, and more. Many of the `.id` values are useful as UTM parameters in links so you can log where your traffic is coming from or attribute customer actions to messages.
    
*   ### campaign.id
    
    “Campaign” in this context represents any workflow. This is the workflow’s ID, which can be found after the workflow type in the URL.
    
    For example, the campaign ID here is 2000: `https://fly.customer.io/env/12345/v2/campaigns/2000/overview.`
    
    And here it’s 1: `https://fly.customer.io/env/109950/composer/newsletters/1/templates/21`."
    
    ##### Syntax
    
    ```text
    {{campaign.id}}
    ```
    
*   ### campaign.name
    
    “Campaign” in this context represents any workflow. The name that you assigned your workflow.
    
    ##### Syntax
    
    ```text
    {{campaign.name}}
    ```
    
*   ### campaign.subscription\_topic\_ids
    
    To use this, you must enable our [subscription center](/journeys/channels/subscriptions/center/). This returns the topic assigned in subscription preferences settings for Campaigns, API Triggered Broadcasts and Newsletters.
    
    ##### Syntax
    
    ```text
    {{campaign.subscription_topic_ids}}
    ```
    
*   ### campaign.type
    
    “Campaign” in this context represents any workflow.
    
    This returns the type of trigger for a campaign: `behavioral` ([legacy segment-triggered](/journeys/send/campaigns/triggers/#condition-trigger)), `seg_attr` ([attribute or segment-triggered](/journeys/send/campaigns/triggers/#conditions-trigger)), `transactional` (event-triggered), `form`, `date`, `object`, or `relationship`.
    
    For messages sent through our Transactional API, this returns `transactional_message`.
    
    It also returns `triggered_broadcast` for an API-triggered broadcast or `newsletter` accordingly."
    
    ##### Syntax
    
    ```text
    {{campaign.type}}
    ```
    
*   ### content
    
    Use in layouts to indicate where code added via the email editor will be included. You might use this in a template for a transactional message or API-triggered broadcast where you will provide content from the API directly.
    
    ##### Example
    
    ```text
    {{content}}
    ```
    
*   ### delivery\_id
    
    A URL-compatible base64 string that identifies an instance of a message created for a person. When previewing a message, you’ll see `unsent`. This is generated when the message is drafted or sent.
    
    ##### Syntax
    
    ```text
    {{delivery_id}}
    ```
    
*   ### editor
    
    Describes the type of editor used to create an action. One of `bee` (drag-and-drop email editor), `html` (code email editor), `wysiwyg` (rich text email editor), or `rich` (rich push editor). For *Create or update person* actions, in-app messages, Design Studio emails, SMS, and custom push, this value is blank.
    
    ##### Syntax
    
    ```text
    {{editor}}
    ```
    
*   ### layout.id
    
    The numerical ID associated with the email layout you’ve used. Only available for emails made with the code or rich text editors.
    
    ##### Syntax
    
    ```text
    {{layout.id}}
    ```
    
*   ### layout.name
    
    The name assigned to the email layout you’re using. Only available for emails made with the code or rich text editors.
    
    ##### Syntax
    
    ```text
    {{layout.name}}
    ```
    
*   ### message.id
    
    The numerical ID for a message action in the workflow. For example, an SMS action might have a `{{message.id}}` of 200. Note that this identifies the action in your workflow, not the individual delivery instances. Every SMS delivery generated from the action would have a different `{{delivery_id}}`.
    
    For newsletters, the `message.id` is the value after templates in your URL. For example, the `message.id` here is `21` `https://fly.customer.io/env/109950/composer/newsletters/1/templates/21`.
    
    ##### Syntax
    
    ```text
    {{message.id}}
    ```
    
*   ### message.journey\_id
    
    The ID for the path a person went through in a Campaign or API-triggered Broadcast. You can use this value to trace message metrics back to a person’s path through a journey using the `journey.id` value sent in our [Reporting Webhooks](/webhooks).
    
    ##### Syntax
    
    ```text
    {{message.journey_id}}
    ```
    
*   ### message.name
    
    The name you give your message in the workflow, like “Welcome to ACME!”
    
    ##### Syntax
    
    ```text
    {{message.name}}
    ```
    
*   ### message.preheader
    
    For email messages only, if your message has a preheader value set, this tag echos it.
    
    ##### Syntax
    
    ```text
    {{message.preheader}}
    ```
    
*   ### message.send\_to\_unsubs
    
    If the message is set to send to unsubscribed users, this returns true. Otherwise, it returns false.
    
    ##### Syntax
    
    ```text
    {{message.send_to_unsubs}}
    ```
    
*   ### message.subject
    
    If your message has a subject, or the message subject is different from the message name, this tag echos it.
    
    ##### Syntax
    
    ```text
    {{message.subject}}
    ```
    
*   ### message.subscription\_topic\_ids
    
    To use this, you must enable our [subscription center](/journeys/channels/subscriptions/center/). This returns the topic ID of the subscription preference assigned to Campaigns, API-triggered Broadcasts and Newsletters. If there is a message-level override of the topic (Campaigns and API-triggered Broadcasts only), it will return the message-level topic ID.
    
    ##### Syntax
    
    ```text
    {{message.subscription_topic_ids}}
    ```
    
*   ### message.subscription\_topic.name
    
    To use this, you must enable our [subscription center](/journeys/channels/subscriptions/center/). Renders the name of the subscription topic assigned to a broadcast or campaign. If the topic is overriden for a message, this will render the message-level topic name.
    
    ##### Syntax
    
    ```text
    {{message.subscription_topic.name}}
    {{message.subscription_topic.name | default: "Unsubscribe"}}
    ```
    
*   ### message.type
    
    This refers to the type of a particular workflow action. Possible values are: `email_action`, `delay_seconds_action`, `delay_time_window_action`, `split_randomized_action`, `webhook_action`, `twilio_action`, `slack_action`, `attribute_update_action`, `filter_match_delay_action`, `grace_period_action`, `push_action`, `conditional_wait_action`, `conditional_branch_action`, `multi_split_branch_action`, `random_cohort_branch_action,` `exit_action`, `static_seg_update_action`, `collection_query_action`, `create_event_action`, `multi_lang_branch_action`, `batch_update_action`, `in_app_action`.
    
    ##### Syntax
    
    ```text
    {{message.type}}
    ```
    
*   ### subscription\_topic\_name
    
    To use this, you must enable our [subscription center](/journeys/channels/subscriptions/center/). Renders the name of the subscription topic assigned to a broadcast or campaign. If the topic is overriden for a message, this will render the message-level topic name. Add a [language parameter](/journeys/channels/subscriptions/unsubscribe-faqs/#currently-supported-languages) to translate the name, like `lang='pt'`. If the language doesn’t match a translation in your subscription center, customers will see the default language.
    
    ##### Syntax
    
    ```text
    {% subscription_topic_name %}
    {% subscription_topic_name lang='pt' %}
    ```
    
*   ## Variable Tags
    
    Tags define the logic of your liquid. Variable tags help you define and alter variables.
    
*   ### assign
    
    Assign a value to a variable.
    
    ##### Syntax
    
    ```text
    {% assign var_name = 'value' %}
    ```
    
    ##### Input
    
    ```text
    {% assign favorite_food = 'apples' %}
    ```
    
    ##### Output
    
    ```text
    {{ favorite_food }}
    ```
    
*   ### capture
    
    Captures contents and assigns them to a variable.
    
    ##### Input
    
    ```text
    {% capture about_me %}I am 28 and my favorite food is pasta.{% endcapture %}
    ```
    
    ##### Output
    
    ```text
    {{ about_me }}
    ```
    
*   ## Iterative Tags
    
    Loop or iterate over data.
    
*   ### cycle
    
    In a ‘for’ loop, this tag loops through and outputs strings in the order they were passed.
    
    ##### Input
    
    ```text
    <ul>{% assign characters = "coyote,bugs,tweety" | split: "," %}
      {% for character in characters %}
      <li class="{% cycle 'odd', 'even' %}">{{ character }}</li>
      {% endfor %}
    </ul> 
    ```
    
    ##### Output
    
    ```text
    <ul>
      <li class='odd'>coyote</li>
      <li class='even'>bugs</li>
      <li class='odd'>tweety</li>
    </ul>
    ```
    
*   ### for loop
    
    Repeatedly executes a block of code, most commonly to perform an operation for each item in an array. You might use a for loop in a message to provide a receipt of purchases (assuming an array of items in a purchase). [Find more information about for loops and iteration here.](https://liquidjs.com/tags/for.html#break) For instance, you can use a break tag - {% break %} - to exit a loop.
    
    ##### Syntax
    
    ```text
    {% for item in array %}
      {{ item }}
    {% endfor %}
    
    {% comment %} You can use a break tag so the loop stops iterating. {% endcomment %}
    {% for i in (1..5) %}
      {% if i == 4 %}
        {% break %}
      {% else %}
        {{ i }}
      {% endif %}
    {% endfor %}
    ```
    
    ##### Example
    
    ```text
    {% comment %} You can output each item of the array. {% endcomment %}
    {% for member in members_of_band %}
      {{member}}
    {% endfor %}
    
    {% comment %} If the items are objects, you can output properties from each object. {% endcomment %}
    {% for product in event.products %}
      - {{ product.title }} x {{ product.price }}
    {% endfor %}
    ```
    
*   ## Conditional Tags
    
    Set conditions to determine the output.
    
*   ### case
    
    Creates a set of conditions depending on a variable’s specific value—like a set of if, if-else, else conditions.
    
    For example, you might use this to display different text depending on if a customer lives in a specific country.
    
    ##### Syntax
    
    ```text
    {% case condition %}
      {% when "value1" %}
        text when condition is value1.
      {% when "value2" or "value3" %}
        text when condition is value2 or value3
      {% else %}
        text when condition does not match other conditions
    {% endcase %}
    ```
    
*   ### if
    
    Executes a block of code if a condition is met. We execute the first true condition. Use `elsif` to add multiple ‘if’ conditions and `else` for the block of code you want to execute if all conditions are false. Use the [`default` filter](/journeys/liquid/tag-list/?version=latest#default-latest) to specify a fallback for when a variable does not exist instead of an if statement. [Find more information about conditional liquid here](https://github.com/customerio/liquid/wiki/Liquid-for-Designers#if--else).
    
    ##### Example
    
    ```text
    {% if customer.lastEventType == "sports" %}
      You last attended a sports event, so we thought you might like to try out our leagues! Fill out our interest form below.
    {% elsif customer.lastEventType == "theater" %}
      You attended a theater event, so we thought you might like to try out our after show parties! Fill out our interest form below.
    {% elsif customer.lastEventType %}
      {% comment %} If the attribute exists and does not equal sports or theater, then this will render.{% endcomment %}
      You last attended {{customer.lastEventType}}; we'd love to hear what other offerings you'd like from us in the form below.
    {% else %}
      {% comment %} If the attribute does not exist, this will render. {% endcomment %}
      Let us know your interests in the form below so we can better serve you!
    {% endif %}
    ```
    
*   ### unless
    
    Like an if conditional, but reversed: this tag executes a block of code if your condition is *not* met.
    
    ##### Example
    
    ```text
    {% unless product.name == "cool beans" %}
      The beans are not cool.
    {% endunless %}
    ```
    
*   ## Logical Operators
    
    Logical operators determine the basic rules for evaluating true or false statements. You can also use `and` and `or` operators to combine logic statements to evaluate multiple conditions.
    
*   ### and
    
    Evaluate a statement as true when both conditions are true.
    
    ##### Syntax
    
    ```text
    {% if condition1 and condition2 %}
      // do something if both condition1 and condition 2 are true
    {% endif %}
    ```
    
    ##### Example
    
    ```text
    {% if customer.name == "bugs bunny" and event.episode_start == true %}
      What's up doc?
    {% else %}
      That's all folks!
    {% endif %}
    ```
    
*   ### does not equal (!=)
    
    Use `!=` to check that two values are *not* equal to each other.
    
    ##### Example
    
    ```text
    {% if customer.name != "daffy duck" %}
      Duck season!
    {% else %}
      Wabbit season!
    {%endif%}
    ```
    
*   ### equals (==)
    
    Use `==` to check if two values are equal to each other.
    
    ##### Example
    
    ```text
    {% if customer.name == "daffy duck" %}
      Wabbit season!
    {% else %}
      Duck season!
    {% endif %}
    ```
    
*   ### greater than and greater than or equal to (>, >=)
    
    Use `>` to match when one value is greater than another. Use `>=` to match when one value is greater than *or* equal to another.
    
    ##### Syntax
    
    ```text
    {% if val1 > val2 %}
      {% comment %}do something if val1 is greater than val2{% endcomment %}
    {% endif %}
    ```
    
    ##### Example
    
    ```text
    {% if customer.acct_age_years > 1 %}
      Thanks for being with us these past years
    {% else %}
      Thanks for spending the last year with us!
    {% endif %}
    ```
    
*   ### less than and less than or equal to (<, <=)
    
    Use `<` to match when one value is less than another. Use `<=` to match when one value is less than *or* equal to another.
    
    ##### Syntax
    
    ```text
    {% if val1 < val2 %}
      {% comment %}do something if val1 is less than val2{% endcomment %}
    {% endif %}
    ```
    
    ##### Example
    
    ```text
    {% if customer.purchases < 5 %}
      Thanks for your support
    {% else %}
      Thanks for spending the last year with us!
    {% endif %}
    ```
    
*   ### or
    
    Evaluate a statement as true when either of two conditions are true.
    
    ##### Syntax
    
    ```text
    {% if condition1 or condition2 %}
      {% comment %}do something if either condition1 and condition 2 are true{% endcomment %}
    {% endif %}
    ```
    
    ##### Example
    
    ```text
    {% if customer.name == "bugs bunny" or customer.group == "looney toons" %}
      That's all folks!
    {% else %}
      See you later!
    {% endif %}
    ```
    
*   ## Timestamps and Dates
    
    Use these tags to get and manipulate dates and times.
    
*   ### add\_day
    
    Adds a day, or multiple days, to a given timestamp.
    
    ##### Syntax
    
    ```text
    {{ <unix_timestamp> | add_day: <int_days> }}
    ```
    
    ##### Example
    
    ```text
    {{ 1477430251 | add_day: 7 }}
    ```
    
*   ### add\_month
    
    Adds a month, or multiple months, to a given timestamp.
    
    ##### Syntax
    
    ```text
    {{ <unix_timestamp> | add_month: <int_months> }}
    ```
    
    ##### Example
    
    ```text
    {{ 1477430251 | add_month: 7 }}
    ```
    
*   ### add\_year
    
    Adds a year, or multiple years, to a given timestamp.
    
    ##### Syntax
    
    ```text
    {{ <unix_timestamp> | add_year: <int_years> }}
    ```
    
    ##### Example
    
    ```text
    {{ 1477430251 | add_year: 4 }}
    ```
    
*   ### countdown
    
    Creates a countdown timer in your message, helping you alert your audience to how soon an event they’re interested in is set to happen. Countdown timers take several parameters. At the minimum, a countdown must include the font size, the foreground (font) color, the background color, and the time you want to count down to. **You can only set this to count down from a *static timestamp*; you cannot set the time to count down based on a customer’s attribute, for instance.**
    
    The countdown timer cannot contain more than 60 frames. This limits the size of the animated GIF in your messages. So, if the resolution is set to seconds, the counter will stop after 60 seconds from when the person opens their message. The countdown image reloads when a person opens the message again, so the counter will always be relevant to the user’s current time, but it cannot count indefinitely.
    
    Parameter
    
    required
    
    format
    
    default
    
    description
    
    point
    
    ✓
    
    integer
    
    The font size for the timer
    
    time
    
    ✓
    
    ISO 8601 timestamp
    
    The date and time you want to countdown to in the format `YYYY-MM-DD hh:mm:ss (GMT)`. Remember to close the time in quotes, as the value includes a space. This field does not accept liquid variables.
    
    fg
    
    ✓
    
    hex color
    
    The foreground (font) hexidecimal color
    
    bg
    
    ✓
    
    hex color
    
    The background hexidecimal color
    
    apng
    
    boolean
    
    false
    
    Determines whether to show your countdown as a gif (default) or animated PNG. Note that some browsers/email clients don’t support apng images.
    
    font
    
    string
    
    inter, roboto
    
    The font family for your timer
    
    weight
    
    string
    
    normal
    
    The font weight, takes normal CSS `font-weight` values.
    
    locale
    
    language code
    
    en
    
    The language you want to display: `en` (English), `ru` (Russian), `jp` (Japanese), `zh` (Chinese), `pt` (Portugese), `es` (Spanish), and `fr` (French)
    
    looping
    
    boolean
    
    false
    
    Determines whether the countdown timer should restart after it finishes
    
    resolution
    
    one of S, M, H, D
    
    S
    
    Determines how often the timer counts down—by the second, minute, hour, or day.
    
    frames
    
    integer
    
    1
    
    Number of seconds you want to show, based on the resolution, where seconds: 60, minutes: 2, hours: 1, days: 1
    
    ##### Example
    
    ```text
    {% countdown point:64 font:roboto weight:light fg:000000 bg:f2f6f9 time:"2022-07-04 12:00:00 (GMT)" locale:en looping:true resolution:S frames:2 %}
    ```
    
    [![countdown-timer.png
    ](https://docs.customer.io/images/countdown-timer.png)](#8aca4f25c6b61d7d00851acc7cbf0828-lightbox)
    
*   ### date
    
    Format a date. Use the [LiquidJS reference](https://liquidjs.com/filters/date.html) for more information about date filters including overriding the time zone. For a full list of regions, see our [Supported time zone formats](/journeys/send/timezones/example-timezones/#region). You can also offset the time zone in minutes (360 = -6:00 hrs and -360 = +6:00 hrs).
    
    ##### Input
    
    ```text
    {{ 1483272000 | date: '%H:%M, %a, %b %d, %Y' }}
    {{ 1483272000 | date: '%a., %-m/%d at %I:%M %P %Z' }}
    {{ "1990-12-31T23:00:00Z" | date: "%Y-%m-%dT%H:%M:%S", "Asia/Colombo" }}
    {{ "1990-12-31T23:00:00Z" | date: "%Y-%m-%dT%H:%M:%S", 360 }}
    ```
    
    ##### Output
    
    ```text
    12:00, Sun, Jan 01, 2017
    Sun., 1/01 at 12:00 pm UTC
    1991-01-01T04:30:00
    1990-12-31T17:00:00
    ```
    
*   ### date\_to\_long\_string
    
    Converts a date-time to include the full name of the month. You can convert this to ordinal time by adding ‘ordinal’, and you can follow that with ‘US’ if you’d like to lead with the month. By default, this displays the date in DD, M full name, YYYY.
    
    ##### Input
    
    ```text
    {{ site.time | date_to_long_string }}
    {{ site.time | date_to_long_string: "ordinal" }}
    {{ site.time | date_to_long_string: "ordinal", "US" }}
    ```
    
    ##### Output
    
    ```text
    07 November 2008
    7th November 2008
    November 7th, 2008
    ```
    
*   ### date\_to\_rfc822
    
    Converts a date-time into the RFC-822 format used for RSS feeds.
    
    ##### Input
    
    ```text
    {{ site.time | date_to_rfc822 }}
    ```
    
    ##### Output
    
    ```text
    Mon, 07 Nov 2008 13:07:54 -0800
    ```
    
*   ### date\_to\_string
    
    Converts a date-time to ordinal time. Add ‘US’ to lead with the month. By default, this displays the date in DD, M abbreviated, YYYY.
    
    ##### Input
    
    ```text
    {{ site.time | date_to_string }}
    {{ site.time | date_to_string: "ordinal" }}
    {{ site.time | date_to_string: "ordinal", "US" }}
    ```
    
    ##### Output
    
    ```text
    07 Nov 2008
    07th Nov 2008
    Nov 7th, 2008
    ```
    
*   ### date\_to\_xmlschema
    
    Converts a date-time into ISO 8601, a format expected by XML schema.
    
    ##### Input
    
    ```text
    {{ site.time | date_to_xmlschema }}
    ```
    
    ##### Output
    
    ```text
    2008-11-07T13:07:54-08:00
    ```
    
*   ### event\_timestamp
    
    The UNIX timestamp when a particular event was performed. This time is different from the `now` tag! This throws an error if the event has not been sent recently (within the last ~30 days).
    
    ##### Syntax
    
    ```text
    {{event_timestamp}}
    ```
    
*   ### now
    
    The current time in UTC. You must [format time](https://liquidjs.com/filters/date.html) with `date`.
    
    To modify date or time with `add` or `subtract` filters you must convert `now` into a unix timestamp first using `date: '%s'`. If you use our built in `add_day`, `add_month`, or `add_year` filters, you must convert the timestamp to an integer first. You can do this by using the `plus` filter to add `0` as shown in the second example below.
    
    ##### Example
    
    ```text
    {{ 'now' | date: '%I:%M %p %B %d, %Y' }}
    {{ 'now' | date: '%s' | plus: 0 | add_day: 1 | date: '%I:%M %p %B %d, %Y'}}
    ```
    
    ##### Output
    
    ```text
    08:28 AM May 11, 2021
    08:28 AM May 12, 2021
    ```
    
*   ### subtract\_day
    
    Subtracts a day, or multiple days, to a given timestamp.
    
    ##### Syntax
    
    ```text
    {{ <unix_timestamp> | subtract_day: <int_days> }}
    ```
    
    ##### Example
    
    ```text
    {{ 1477430251 | subtract_day: 7 }}
    ```
    
*   ### subtract\_month
    
    Subtracts a month, or multiple months, to a given timestamp.
    
    ##### Syntax
    
    ```text
    {{ <unix_timestamp> | subtract_month: <int_months> }}
    ```
    
    ##### Example
    
    ```text
    {{ 1477430251 | subtract_month: 2 }}
    ```
    
*   ### subtract\_year
    
    Subtracts a year, or multiple years, to a given timestamp.
    
    ##### Syntax
    
    ```text
    {{ <unix_timestamp> | subtract_year: <int_years> }}
    ```
    
    ##### Example
    
    ```text
    {{ 1477430251 | subtract_year: 4 }}
    ```
    
*   ## Array Filters
    
    Liquid used to filter and manipulate arrays (lists of values). If your event or another incoming value is an array, you may iterate over the array with a `for` loop or grab items at a particular index of the array, to display information for your audience.
    
*   ### compact
    
    Removes `nil` (empty) values from an array.
    
    ##### Input
    
    ```text
    {{ "mick, keith, nil, Charlie" | compact }}
    ```
    
    ##### Output
    
    ```text
    mick, keith, Charlie
    ```
    
*   ### concat
    
    Concatenates arrays, joining them end to end. Accepts a single object or an array of objects. The resulting array contains all of the elements of both original arrays. `concat` does not remove duplicate entries unless you also use the `uniq` filter.
    
    ##### Input
    
    ```text
    {% assign stones = "mick, keith, ronnie, charlie" | split: ", " %}
    {% assign beatles = "john, paul, george, ringo" | split: ", " %}
    {% assign rolling_beatles = stones | concat: beatles %}
    {{ rolling_beatles | join: ", " }}
    ```
    
    ##### Output
    
    ```text
    mick, keith, ronnie, charlie, john, paul, george, ringo
    ```
    
*   ### find
    
    Returns the first object in an array for which the queried attribute has the given value or returns nil if no item in the array satisfies the given criteria.
    
    ##### Input
    
    ```text
    {{ customer.purchases | find: "type", "kitchen" | json }}
    ```
    
    ##### Output
    
    ```text
    {"date":"1726589206","title":"utensils","type":"kitchen"}
    ```
    
*   ### find\_exp
    
    Returns the first object in an array for which the given expression evaluates to true or returns nil if no item in the array satisfies the evaluated expression.
    
    ##### Input
    
    ```text
    {{ members | find_exp: "item", "item.graduation_year == 2014" | json }}
    ```
    
    ##### Output
    
    ```text
    {"graduation_year":2014,"name":"John"}
    ```
    
*   ### first
    
    Returns the first element of the array.
    
    ##### Input
    
    ```text
    acme.characters = ["Wile E Coyote", "Road Runner"]
    {{ acme.characters | first }}
    ```
    
    ##### Output
    
    ```text
    Wile E Coyote
    ```
    
*   ### group\_by
    
    Groups an array’s items by a given property.
    
    ##### Input
    
    ```text
    {% assign groups = customer.purchases | group_by: "type" %}
    
    {% for group in groups %}
    
      {{group.name | capitalize}}
    
      {% for item in group.items %}
    
        - {{ item.title }}
    
      {% endfor %}
    
    {% endfor %}
    ```
    
    ##### Output
    
    ```text
    Bathroom
    - shower curtain
    - body soap
    Kitchen
    - forks
    - spoons
    - knives
    ```
    
*   ### group\_by\_exp
    
    Groups an array’s items using a Liquid expression.
    
    ##### Input
    
    ```text
    {% assign groups = customer.purchases | group_by_exp: "item", "item.type contains 'kitchen'" %} 
    
    {% for group in groups %}
    
      {% if group.name == true %}
    
        You bought some kitchen supplies from us in the past year:
    
          {% for item in group.items %}
    
          - {{item.title}}
    
          {% endfor %}
    
      {% endif %}
    
    {% endfor %}
    ```
    
    ##### Output
    
    ```text
    You bought some kitchen supplies from us in the past year:
    - forks
    - spoons
    - knives
    ```
    
*   ### join
    
    Joins the elements of an array with the character passed as the parameter.
    
    ##### Input
    
    ```text
    acme.characters = ["Wile E Coyote", "Road Runner"]
    {{ acme.characters | join: ', ' }}
    ```
    
    ##### Output
    
    ```text
    Wile E Coyote, Road Runner
    ```
    
*   ### json\_array\_uniq
    
    Evaluates an array of JSON objects and outputs an array containing all the unique objects based only on the value of the passed-in property name. Use the filter `to_json` if a string is the desired output.
    
    ##### Input
    
    ```text
    {{ customer.arrayOfColorObjects | concat: customer.arrayOfColorObjectsWithDuplicationsAndNew | json_array_uniq: 'name' | to_json }}
    ```
    
    ##### Output
    
    ```text
    [{"color":"brown","name":"coyote"},{"color":"black","name":"bugs"},{"color":"yellow","name":"tweety"},{"color":"black","name":"daffy"}]
    ```
    
*   ### last
    
    Returns the last element of the array.
    
    ##### Input
    
    ```text
    acme.characters = ["Wile E Coyote", "Road Runner"]
    {{ acme.characters | last }}
    ```
    
    ##### Output
    
    ```text
    Road Runner
    ```
    
*   ### limit
    
    Return a set number of values from an array or string.
    
    ##### Input
    
    ```text
    {% assign beatles = "john, paul, george, ringo" | split: ", " %}
    {{ beatles | limit: 2 | join: ", " }}
    ```
    
    ##### Output
    
    ```text
    john, paul
    ```
    
*   ### map
    
    Creates an array of values by extracting the values of a property in an object. You can output your new characters in a [‘for’ loop](#for-loop).
    
    ##### Input
    
    ```text
    Array of objects: [{"name":"coyote"},{"name":"bugs"},{"name":"tweety"}]"
    {% assign names = customer.characters | map: 'name' %}
    ```
    
    ##### Output
    
    ```text
    coyote, bugs, tweety
    ```
    
*   ### pop
    
    Removes the last element from the array.
    
    ##### Input
    
    ```text
    {% assign fruits = "apples, oranges, peaches" | split: ", " %}
    
    {% assign everything = fruits | pop %}
    
    {% for item in everything %}
    - {{ item }}
    {% endfor %}
    ```
    
    ##### Output
    
    ```text
    - apples
    - oranges
    ```
    
*   ### push
    
    Adds an element to an array.
    
    ##### Input
    
    ```text
    {% assign fruits = "apples, oranges" | split: ", " %}
    
    {% assign everything = fruits | push: "peaches" %}
    
    {% for item in everything %}
    - {{ item }}
    {% endfor %}
    ```
    
    ##### Output
    
    ```text
    - apples
    - oranges
    - peaches
    ```
    
*   ### remove
    
    Remove an element from an array. The array can contain objects of any type.
    
    ##### Input
    
    ```text
    {% assign pl = customer.products | remove: customer.products[0] %}
    - {{ customer.products.size }}
    - {{ pl.size }}
    ```
    
    ##### Output
    
    ```text
    - 2
    - 1
    ```
    
*   ### reverse
    
    Reverses the order of the items in an array.
    
    ##### Input
    
    ```text
    {% assign my_array = "apples, oranges, peaches, plums" | split: ", " %}
    
    {{ my_array | reverse | join: ", " }}
    ```
    
    ##### Output
    
    ```text
    plums, peaches, oranges, apples
    ```
    
*   ### shift
    
    Removes the first element from the array.
    
    ##### Input
    
    ```text
    {% assign fruits = "apples, oranges, peaches" | split: ", " %}
    
    {% assign everything = fruits | shift %}
    
    {% for item in everything %}
    - {{ item }}
    {% endfor %}
    ```
    
    ##### Output
    
    ```text
    - oranges
    - peaches
    ```
    
*   ### size
    
    Returns the number of characters (the size) of a string (in characters) or the number of elements in an array.
    
    ##### Input
    
    ```text
    {{ "That's all, folks!" | size }}
    {{ customer.latest_purchase | size }}
    {{ objects.online_classes | size }}
    {{ objects.online_classes.size }}
    ```
    
    ##### Output
    
    ```text
    18 // The number of characters
    4 // If `latest_purchase` is an array, this returns the number of items in the array. Otherwise, it returns a count of characters.
    2 // The number of objects (onlines classes) that a person is related to.
    2 // Using the size filter with dot notation
    ```
    
*   ### sort
    
    Sorts the elements of an array by an attribute of an element in that array. Usually used with a ‘for’ loop. The order of the sorted array is case-sensitive! This filter will not reorder any list/array that contains null values. See [Sorting looped data](/journeys/liquid/using-liquid/#sorting-looped-data) for an advanced example.
    
    ##### Input
    
    ```text
    {% assign beatles = "paul, john, ringo, george" | split: ", " %}
    
    {{ beatles | sort | join: ", " }}
    ```
    
    ##### Output
    
    ```text
    george, john, paul, ringo
    ```
    
*   ### sort\_natural
    
    Sort the items in an array in case-insensitive order.
    
    ##### Input
    
    ```text
    {{ "mick, keith, Charlie, Ronnie" | sort_natural }}
    ```
    
    ##### Output
    
    ```text
    Charlie, keith, mick, Ronnie
    ```
    
*   ### sum
    
    The `sum` filter aggregates numbers. Every value is cast to a number. Unlike with legacy liquid, `sum` does not concatenate numbers, strings, or booleans. You can specify an object property to sum, as shown in the third example below.
    
    ##### Input
    
    ```text
    {% assign nums = '1,2,3' | split: ',' %}
    {{ nums | sum }}
    
    {% assign letters = 'a,b,c' | split: ',' %}
    {{ letters | sum }}
    
    {{ cart.products | sum: 'total_number' }} {% comment %} where `total_number` includes milk,cheese,eggs {% endcomment %}
    
    {{ purchase.products | sum }} {% comment %} where `products` includes true,false {% endcomment %}
    ```
    
    ##### Output
    
    ```text
    6
    0
    3
    1 {% comment %} counts the number of trues, would also aggregate numbers alongside booleans {% endcomment %}
    ```
    
*   ### uniq
    
    Removes duplicate elements in an array.
    
    ##### Input
    
    ```text
    {% assign my_array = '"lions", "tigers", "bears", "bears", "lions"' %}
    {{ my_array | uniq | join: ", " }}
    ```
    
    ##### Output
    
    ```text
    lions, tigers, bears
    ```
    
*   ### unshift
    
    Adds an element to the beginning of the array.
    
    ##### Input
    
    ```text
    {% assign fruits = "oranges, peaches" | split: ", " %}
    
    {% assign everything = fruits | unshift: "apples" %}
    
    {% for item in everything %}
    - {{ item }}
    {% endfor %}
    ```
    
    ##### Output
    
    ```text
    - apples
    - oranges
    - peaches
    ```
    
*   ### where
    
    Creates an array including only the objects with a given property value, or any “truthy” value by default.
    
    ##### Input
    
    ```text
    All Players:
    {% for player in customer.players %}
      - {{ player.last_name }}
    {% endfor %}
    
    Baseball Players:
    {% assign baseball_players = customer.players | where: "sport", "baseball" %}
    {% for player in baseball_players %}
      - {{ player.last_name }}
    {% endfor %}
    
    ----------------------------
    
    All products:
    {% for product in customer.products %}
    - {{ product.title }}
    {% endfor %}
    
    {% assign available_products = customer.products | where: "available" %}
    
    Available products:
    {% for product in available_products %}
    - {{ product.title }}
    {% endfor %}
    ```
    
*   ### where\_exp
    
    Selects all the objects in an array where the expression is true. You provide two items separated by a comma: the property you want to match on and the value you want to match.
    
    ##### Input
    
    ```text
    All products:
    {% for product in customer.products %}
    - {{ product.title }}
    {% endfor %}
    
    {% assign kitchen_products = customer.products | where_exp: "item", "item.size > 30 and item.type == 'kitchen'" %}
    
    Kitchen products:
    {% for product in kitchen_products %}
    - {{ product.title }}
    {% endfor %}
    ```
    
*   ### where\_not
    
    Creates an array of items that **do not match** a given property value, or any “falsey” value by default. When using `where_not`, you provide two items separated by a comma: the property you want to match on and the value you want to match.
    
    ##### Input
    
    ```text
    All players:
    {% for player in customer.players %}
      - {{ player.last_name }}
    {% endfor %}
    
    Not baseball players:
    {% assign not_baseball_players = customer.players | where_not: "sport", "baseball" %}
    {% for player in not_baseball_players %}
      - {{ player.last_name }}
    {% endfor %}
    ```
    
    ##### Output
    
    ```text
    All players:
      - Posey
      - Maradona
      - Montana
      - Gretzky
      - Jordan
    
    Not baseball players:
      - Maradona
      - Montana
      - Gretzky
      - Jordan
    ```
    
*   ## Number and Currency Filters
    
    These are tags and filters that manipulate incoming number, integer, and timestamp values.
    
    Some tags, like the `currency` and `format_number`, take an optional localization parameter, formatting the output for a specific locale. These tags use the format `{{ 10 | currency: "en-us" }}`, which would output `$10.00`.
    
*   ### A list of locales and currency codes
    
    We support the following localization values:
    
    ```fallback
    af, ar, az, be, bg, bn, bs, ca, cs, cy, da, de-AT, de-CH, de-DE, de, dz, el-CY, el, en-AU, en-CA, en-CY,
    en-GB, en-IE, en-IN, en-NZ, en-TT, en-US, en-ZA, en, eo, es-419, es-AR, es-CL, es-CO, es-CR, es-EC, es-ES,
    es-MX, es-NI, es-PA, es-PE, es-US, es-VE, es, et, eu, fa, fi, fr-CA, fr-CH, fr-FR, fr, gl, gsw-CH, he,
    hi-IN, hi, hr, hu, id, is, it-CH, it, ja-JP, ja, ka, kk, km, kn, ko, lb, lo, lt, lv, mg, mk, ml, mn, mr-IN,
    ms, na, nb, ne, ng, nl, nn, oc, or, pa, pl, pt-BR, pt-MZ, pt, rm, ro, ru, sc, sd, sk, sl, sn, sq, sr, st, sv-FI,
    sv-SE, sv, sw, ta, te, th, tl, tn, tr, tt, ug, uk, ur, uz, vi, wo, za, zh-CN, zh-HK, zh-Hant-MO, zh-MO,
    zh-TW, ao, cd, ci, cm, eg, gh, ke, ls, ly, ma, mu, mw, mz, sz, tz, zm
    ```
    
    We support the following currency codes:
    
    ```fallback
    'AED','AFN','ALL','AMD','ANG','AOA','ARS','AUD','AWG','AZN','BAM','BBD','BDT','BGN','BHD','BIF','BMD',
    'BND','BOB','BRL','BSD','BTN','BWP','BYN','BZD','CAD','CDF','CHF','CLP','CNY','COP','CRC','CUC','CUP',
    'CVE','CZK','DJF','DKK','DOP','DZD','EGP','ERN','ETB','EUR','FJD','FKP','GBP','GEL','GHS','GIP','GMD',
    'GNF','GTQ','GYD','HKD','HNL','HRK','HTG','HUF','IDR','ILS','INR','IQD','IRR','ISK','JMD','JOD','JPY',
    'KES','KGS','KHR','KMF','KPW','KRW','KWD','KYD','KZT','LAK','LBP','LKR','LRD','LSL','LYD','MAD','MDL',
    'MGA','MKD','MMK','MNT','MOP','MRU','MUR','MVR','MWK','MXN','MYR','MZN','NAD','NGN','NIO','NOK','NPR',
    'NZD','OMR','PAB','PEN','PGK','PHP','PKR','PLN','PYG','QAR','RON','RSD','RUB','RWF','SAR','SBD','SCR',
    'SDG','SEK','SGD','SHP','SLE','SLL','SOS','SRD','SSP','STN','SVC','SYP','SZL','THB','TJS','TMT','TND',
    'TOP','TRY','TTD','TWD','TZS','UAH','UGX','USD','UYU','UZS','VES','VND','VUV','WST','XAF','XCD','XDR',
    'XOF','XPF','XSU','YER','ZAR','ZMW','ZWL'
    ```
    
*   ### abs
    
    Returns the absolute value of a number.
    
    ##### Input
    
    ```text
    {{ 3.14 | abs }}
    ```
    
    ##### Output
    
    ```text
    3.14
    ```
    
*   ### ceil
    
    Rounds a number up to the nearest integer.
    
    ##### Input
    
    ```text
    {{ 3.14 | ceil }}
    ```
    
    ##### Output
    
    ```text
    4
    ```
    
*   ### currency
    
    Converts an integer to currency. This filter accepts two arguments for currency and locale. When no arguments are passed to the filter, the currency code defaults to USD. When only a locale is passed, we base the currency on the closest match to the locale. See above for a list of [specific locales and currencies](#number-and-currency-filters). We only accept a currency code after a locale is specified.
    
    ##### Input
    
    ```text
    {% comment %} no arguments: {% endcomment %}
      {{ 1234567.896 | currency }}
    {% comment %} only locale: {% endcomment %}
      {{ 1234567.896 | currency: 'en-GB' }}
    {% comment %} locale and currency code: {% endcomment %}
      {{ 1234567.896 | currency: 'en', 'EUR' }}
    ```
    
    ##### Output
    
    ```text
    $1,234,567.90
    £1,234,567.90
    €1,234,567.90
    ```
    
*   ### floor
    
    Rounds a number down to the nearest integer.
    
    ##### Input
    
    ```text
    {{ 3.14 | floor }}
    ```
    
    ##### Output
    
    ```text
    3
    ```
    
*   ### format\_number
    
    Format a number with a delimiter. This filter also takes an optional localization parameter to format a number for a [specific locale](#a-list-of-locales-and-currency-codes-latest).
    
    **NOTE**: This replaces the former `number_with_delimeter` filter.
    
    ##### Input
    
    ```text
    {{ 10000 | format_number }}
    {{ 123456.78 | format_number: "fr" }}
    ```
    
    ##### Output
    
    ```text
    10,000
    123 456,78
    ```
    
*   ### random
    
    Generates a random number between 0 and an integer you specify.
    
    ##### Example
    
    ```text
    {% random 100 %}
    ```
    
*   ### round
    
    Rounds a number up or down to the nearest integer, or to a decimal place you specify.
    
    ##### Input
    
    ```text
    {{ 4.32 | round }}
    {{ 4.32 | round: 1 }}
    ```
    
    ##### Output
    
    ```text
    4
    4.3
    ```
    
*   ### rounded\_currency
    
    Rounds a number to the nearest whole integer and formats it to a currency. Accepts both a locale and currency code. We only accept a currency code after a locale is specified. See above for a list of [specific locales and currencies](#number-and-currency-filters).
    
    ##### Input
    
    ```text
    {% comment %} no arguments: {% endcomment %}
      {{ 1234567.896 | rounded_currency }}
    {% comment %} only locale: {% endcomment %}
      {{ 1234567.896 | rounded_currency: 'en-GB' }}
    {% comment %} locale and currency code: {% endcomment %}
      {{ 1234567.896 | rounded_currency: 'en', 'EUR' }}
    ```
    
    ##### Output
    
    ```text
    $1,234,568
    £1,234,568
    €1,234,568
    ```
    
*   ## Math Filters
    
    Filters that perform math operations on incoming number or integer values. With the legacy liquid version, if you encounter an error with negatives while using math filters, wrap the negative numbers in quotes.
    
*   ### at\_least
    
    Limits a number to a minimum value.
    
    ##### Input
    
    ```text
    {{ 41 | at_least: 42 }}
    ```
    
    ##### Output
    
    ```text
    42
    ```
    
*   ### at\_most
    
    Limits a number to a maximum value.
    
    ##### Input
    
    ```text
    {{ 100 | at_most: 99 }}
    ```
    
    ##### Output
    
    ```text
    99
    ```
    
*   ### divided\_by
    
    Divides a number by another number.
    
    ##### Input
    
    ```text
    {{ 10 | divided_by: 2.5 }}
    {{ 10 | divided_by: 4 }}
    {{ 10 | divided_by: 4.0 }}
    ```
    
    ##### Output
    
    ```text
    4
    2.5
    2.5
    ```
    
*   ### minus
    
    Subtracts a number from another number.
    
    ##### Input
    
    ```text
    {{ 10 | minus: 1 }}
    ```
    
    ##### Output
    
    ```text
    9
    ```
    
*   ### modulo
    
    Returns the remainder of division. The output will always be a positive number, even when there’s a negative number as input.
    
    ##### Input
    
    ```text
    {{ 3 | modulo: 2 }}
    ```
    
    ##### Output
    
    ```text
    1
    ```
    
*   ### plus
    
    Adds a number to another.
    
    ##### Input
    
    ```text
    {{ 10 | plus: 1 }}
    ```
    
    ##### Output
    
    ```text
    11
    ```
    
*   ### times
    
    Multiplies a number by another number.
    
    ##### Input
    
    ```text
    {{ 5 | times: 2 }}
    {{ 10 | times: 2.5 }}
    ```
    
    ##### Output
    
    ```text
    10
    25
    ```
    
*   ## String Filters
    
    The following filters manipulate strings in templates. You might use these to truncate or set the case of strings you reference from other places, to humanize your messages for recipients.
    
*   ### append
    
    Adds a string to the end of another string.
    
    ##### Input
    
    ```text
    {{ "What's all the hubbub, " | append: "bub?" }}
    ```
    
    ##### Output
    
    ```text
    What's all the hubbub, bub?
    ```
    
*   ### array\_to\_sentence\_string
    
    Converts a list of data into a commma-delineated list. Use in tandem with the [`split` filter](/journeys/liquid/tag-list/?version=latest#split-latest).
    
    ##### Input
    
    ```text
    {{ customer.groceries | split:"," | array_to_sentence_string }}
    {{ customer.groceries | split:"," | array_to_sentence_string: "or" }}
    ```
    
    ##### Output
    
    ```text
    cherry, kiwi, and passion fruit
    cherry, kiwi, or passion fruit
    ```
    
*   ### base64
    
    Base64-encodes a string.
    
    ##### Input
    
    ```text
    {{ 'Hello, world!' | base64 }}
    ```
    
    ##### Output
    
    ```text
    SGVsbG8sIHdvcmxkIQ==
    ```
    
*   ### base64\_decode
    
    Decode a base64-encoded string.
    
    ##### Input
    
    ```text
    {{ "Zm9vLmJhcg==" | base64_decode }}
    ```
    
    ##### Output
    
    ```text
    foo.bar
    ```
    
*   ### base64\_encode
    
    Base64-encode a value.
    
    ##### Input
    
    ```text
    {{ "foo.bar" | base64_encode }}
    ```
    
    ##### Output
    
    ```text
    Zm9vLmJhcg==
    ```
    
*   ### base64\_url\_safe\_decode
    
    Decode a string from URL-safe Base64.
    
    ##### Input
    
    ```text
    {{ "Zm9vLmJhcg" | base64_url_safe_decode }}
    ```
    
    ##### Output
    
    ```text
    foo
    ```
    
*   ### base64\_url\_safe\_encode
    
    Encode a string into URL-safe Base64. To produce URL-safe Base64, this filter uses `-` and `_` in place of `+` and `/`.
    
    ##### Input
    
    ```text
    {{ "foo" | base64_url_safe_encode }}
    ```
    
    ##### Output
    
    ```text
    Zm9vLmJhcg
    ```
    
*   ### capitalize
    
    Capitalize the first character in a string.
    
    ##### Input
    
    ```text
    {{ "hello world" | capitalize }}
    ```
    
    ##### Output
    
    ```text
    Hello world
    ```
    
*   ### cgi\_escape
    
    CGI escapes a string for use in a URL.
    
    ##### Input
    
    ```text
    {{ "overview: account" | cgi_escape }}
    ```
    
    ##### Output
    
    ```text
    overview%3A+account
    ```
    
*   ### contains
    
    Finds a substring inside a string, or the presence of a string in an array of strings. This filter only works with strings; you cannot use it to search for an object in an array of object.
    
    ##### Syntax
    
    ```text
    {% if product.description contains 'lorem ipsum' %}
      You might also be interested in Fillerama or Office Ipsum.
    {% endif %}
    ```
    
*   ### downcase
    
    Converts a string to lower case.
    
    ##### Syntax
    
    ```text
    {{ 'STRING' | downcase }}
    ```
    
    ##### Input
    
    ```text
    {{ "ACME" | downcase }}
    ```
    
    ##### Output
    
    ```text
    acme
    ```
    
*   ### escape
    
    Escaping a string removes special characters. To encode a URL, use [`url_encode`](/journeys/liquid/tag-list/?version=latest#url_encode-latest) instead.
    
    ##### Input
    
    ```text
    {{ "win+help@customer.io" | escape }}
    ```
    
    ##### Output
    
    ```text
    win%2Bhelp%40customer.io
    ```
    
*   ### escape\_once
    
    Escapes or encodes a string, but doesn’t include already-escaped characters.
    
    ##### Input
    
    ```text
    {{ "1 < 2 & 3" | escape_once }}
    ```
    
    ##### Output
    
    ```text
    1 < 2 & 3
    ```
    
*   ### hex\_base64
    
    Returns a base64 encoding of a hex digest, like ones returned by the `hmac_sha256` filter.
    
    ##### Input
    
    ```text
    {{ "Customer.io" | hmac_sha256: "some_key" | hex_base64 }}
    ```
    
    ##### Output
    
    ```text
    bd23cyOCFrzicxM7w/ahKoJPQd0YTQlFLwXHZZ2ufVc=
    ```
    
*   ### hmac\_sha1
    
    Converts a string into an hmac\_sha1 hash.
    
    ##### Input
    
    ```text
    {{ "Customer.io" | hmac_sha1: "some_key" }}
    ```
    
    ##### Output
    
    ```text
    2bdf556c9a75766f258d1e2824f6d0e31d1beedc
    ```
    
*   ### hmac\_sha256
    
    Converts a string into an hmac\_sha256 hash.
    
    ##### Input
    
    ```text
    {{ "Customer.io" | hmac_sha256: "some_key" }}
    ```
    
    ##### Output
    
    ```text
    6dddb773238216bce273133bc3f6a12a824f41dd184d09452f05c7659dae7d57
    ```
    
*   ### lstrip
    
    Strips all whitespace, including tabs, spaces, and newlines, from the left side of a string.
    
    ##### Input
    
    ```text
    text{{ " Customer.io " | lstrip }}text
    ```
    
    ##### Output
    
    ```text
    textCustomer.io text
    ```
    
*   ### md5
    
    Converts a string into an md5 hash.
    
    ##### Input
    
    ```text
    {{ "Customer.io" | md5 }}
    ```
    
    ##### Output
    
    ```text
    d52b6a207bf5255c05b1d0056230617e
    ```
    
*   ### newline\_to\_br
    
    Replaces newline with an HTML line break. input: See [this](https://shopify.github.io/liquid/filters/newline_to_br/) example for output.
    
    ##### Input
    
    ```text
    <br />
    Customer.io<br />
    liquid<br />
    ```
    
*   ### normalize\_whitespace
    
    Replaces any occurrence of whitespace with a single space.
    
    ##### Input
    
    ```text
    {{ "a \n b" | normalize_whitespace }}
    ```
    
    ##### Output
    
    ```text
    a b
    ```
    
*   ### number\_of\_words
    
    Counts the number of words in text. [Learn about counting Chinese-Japanese-Korean characters](https://liquidjs.com/filters/number_of_words.html).
    
    ##### Input
    
    ```text
    {{ "Welcome to Customer.io!" | number_of_words }}
    ```
    
    ##### Output
    
    ```text
    3
    ```
    
*   ### pluralize
    
    Outputs the singular or plural version of a string based on the value of a number. The first parameter is the singular string and the second parameter is the plural string.
    
    ##### Syntax
    
    ```text
    {{ int-val | pluralize: 'singular', 'plural'}}
    ```
    
    ##### Input
    
    ```text
    {{ event.item_count | pluralize: 'item', 'items' }}
    ```
    
    ##### Output
    
    ```text
    3 items
    ```
    
*   ### prepend
    
    Adds a string to the beginning of another string.
    
    ##### Input
    
    ```text
    {{ "Sufferin' succotash!" | prepend: "Sylvester: " }}
    ```
    
    ##### Output
    
    ```text
    Sylvester: Sufferin' succotash!
    ```
    
*   ### remove\_first
    
    Removes the first occurrence of a value from a string.
    
    ##### Input
    
    ```text
    {{ "folks that's all, folks!" | remove_first: "folks" }}
    ```
    
    ##### Output
    
    ```text
    that's all folks!
    ```
    
*   ### remove\_last
    
    Remove the last occurence of a string within a substring.
    
    ##### Input
    
    ```text
    {{ "foobarbar" | remove_last: "bar" }}
    ```
    
    ##### Output
    
    ```text
    foobar
    ```
    
*   ### remove
    
    Removes a value from a string.
    
    ##### Input
    
    ```text
    {{ "And that's all, folks!" | remove: ", folks" }}
    ```
    
    ##### Output
    
    ```text
    And that's all!
    ```
    
*   ### replace
    
    Find and replace values within a string. The first argument represents the value you want to replace, and the second argument is the replacement.
    
    ##### Syntax
    
    ```text
    {{ "String you want to replace values in" | replace: "find-str", "replace-str" }}
    ```
    
    ##### Input
    
    ```text
    {{ "Coyotes never catch roadrunners!" | replace: "never", "always" }}
    ```
    
    ##### Output
    
    ```text
    Coyotes always catch roadrunners!
    ```
    
*   ### replace\_first
    
    Find and replace the first match in a string. The first argument represents the value you want to replace, and the second argument is the replacement.
    
    ##### Syntax
    
    ```text
    {{ "String you want to replace values in" | replace_first: "find-str", "replace-str" }}
    ```
    
    ##### Input
    
    ```text
    {{ "roller rocket roller skates" | replace_first: "roller", "awesome" }}
    ```
    
    ##### Output
    
    ```text
    awesome rocket roller skates
    ```
    
*   ### replace\_last
    
    Replace the last occurence of a string within a substring.
    
    ##### Input
    
    ```text
    {{ "foobarbar" | replace_last: "bar", "foo" }}
    ```
    
    ##### Output
    
    ```text
    foobarfoo
    ```
    
*   ### rstrip
    
    Strips all whitespace, including tabs, spaces, and newlines, from the right side of a string.
    
    ##### Input
    
    ```text
    text{{ " Customer.io " | rstrip }}text
    ```
    
    ##### Output
    
    ```text
    text Customer.iotext
    ```
    
*   ### sha1
    
    Converts a string into a sha1 hash.
    
    ##### Input
    
    ```text
    {{ "Customer.io" | sha1 }}
    ```
    
    ##### Output
    
    ```text
    c197ff0ae0a41983362f35ca972c544061c54d4c
    ```
    
*   ### sha256
    
    Converts a string into a sha256 hash.
    
    ##### Input
    
    ```text
    {{ "Customer.io" | sha256 }}
    ```
    
    ##### Output
    
    ```text
    6dddb773238216bce273133bc3f6a12a824f41dd184d09452f05c7659dae7d57
    ```
    
*   ### slice
    
    Returns the character located at the index specified in the first argument. You can also provide a second argument indicating the length of the string you want to return (if you want to return multiple characters).
    
    If the first argument is a negative number, the index is begins from the end of the string.
    
    ##### Syntax
    
    ```text
    {{ "string" | slice: <req, index of char>, <optional, length of result> }}
    ```
    
    ##### Input
    
    ```text
    {{ "Customer.io" | slice: 3 }}
    {{ "Customer.io" | slice: 3, 3 }}
    {{ "Customer.io" | slice: '-4', 3 }}
    ```
    
    ##### Output
    
    ```text
    t
    tom
    r.i
    ```
    
*   ### slugify
    
    Converts a string into a lowercase URL slug. Set the mode to specify how characters and spaces should be converted. Then set a boolean value of `true` if you want to retain the original casing of the string. By default, the `slugify` filter replaces spaces and non-alphanumeric characters with dashes and lowercases all letters.
    
    mode
    
    replaces
    
    “none”
    
    no characters
    
    “raw”
    
    spaces
    
    “default”
    
    spaces and non-alphanumeric characters
    
    “pretty”
    
    spaces and non-alphanumeric characters except for .\_~!$&’()+,;=@
    
    “ascii”
    
    spaces, non-alphanumeric, and non-ASCII characters
    
    “latin”
    
    like default, except Latin characters are first transliterated (e.g. àèïòü to aeiou)
    
    ##### Input
    
    ```text
    {{ "The _config.yml file" | slugify }}
    
    {{ "The _config.yml file" | slugify: "pretty" }}
    
    {{ "The _cönfig.yml file" | slugify: "ascii" }}
    
    {{ "The cönfig.yml file" | slugify: "latin" }}
    
    {{ "The cönfig.yml file" | slugify: "latin", true }}
    ```
    
    ##### Output
    
    ```text
    the-config-yml-file
    
    the-_config.yml-file
    
    the-c-nfig-yml-file
    
    the-config-yml-file
    
    The-config-yml-file
    ```
    
*   ### split
    
    Divides an input string into an array using a separator you define. This filter is often used with a for loop.
    
    ##### Input
    
    ```text
    {% assign rolling_stones = "Mick, Keith, Ronnie, Charlie" | split: ", " %}
    
    {% for member in rolling_stones %}
      {{ member }}
    {% endfor %}
    ```
    
*   ### strip
    
    Strips all whitespace, including tabs, spaces, and newlines, from the left and right side of a string.
    
    ##### Input
    
    ```text
    text{{ " Customer.io " | strip }}text
    ```
    
    ##### Output
    
    ```text
    Customer.io
    ```
    
*   ### strip\_html
    
    Removes HTML characters from a string.
    
    ##### Input
    
    ```text
    {{ "Eh, what's <i>up</i>, <b>Doc</b>?" | strip_html }}
    ```
    
    ##### Output
    
    ```text
    Eh, what's up, Doc?
    ```
    
*   ### strip\_newlines
    
    Removes line breaks (\\n) from a string.
    
    ##### Example
    
    ```text
    {{ product.description | strip_newlines }}
    ```
    
*   ### titlecase
    
    Converts a string to title case.
    
    ##### Syntax
    
    ```text
    {{ 'string' | titlecase }}
    ```
    
    ##### Input
    
    ```text
    {{ "rocket roller skates" | titlecase }}
    ```
    
    ##### Output
    
    ```text
    Rocket Roller Skates
    ```
    
*   ### truncate
    
    Shortens a string to the specified number of characters, adding an ellipsis if the string is longer than the value provided.
    
    ##### Input
    
    ```text
    {{ "I knew I shoulda taken that left turn at Albuquerque." | truncate: 20 }}
    ```
    
    ##### Output
    
    ```text
    I knew I shoulda ...
    ```
    
*   ### truncatewords
    
    Shortens a string to a specified number of words, rather than characters, and adds an ellipsis if the string contains more words than the value provided.
    
    ##### Input
    
    ```text
    {{ "I knew I shoulda taken that left turn at Albuquerque." | truncatewords: 8 }}
    ```
    
    ##### Output
    
    ```text
    I knew I shoulda taken that left turn...
    ```
    
*   ### upcase
    
    Converts a string to upper case.
    
    ##### Syntax
    
    ```text
    {{ 'string' | upcase }}
    ```
    
    ##### Input
    
    ```text
    {{ 'acme' | upcase }}
    ```
    
    ##### Output
    
    ```text
    ACME
    ```
    
*   ### uri\_escape
    
    This filter percent encodes special characters in a URI that are not [reserved](https://en.wikipedia.org/wiki/Percent-encoding#Types_of_URI_characters).
    
    ##### Input
    
    ```text
    {{ "https://example.com/?q=foo, \bar?" | uri_escape }}
    ```
    
    ##### Output
    
    ```text
    https://example.com/?q=foo,%20%08ar?
    ```
    
*   ### url\_decode
    
    Decodes a string that has been encoded as a URL or has been modified by `url_encode`.
    
    ##### Input
    
    ```text
    {{ "%27Customer.io+is+great%27" | url_decode }}
    ```
    
    ##### Output
    
    ```text
    Customer.io is great
    ```
    
*   ### url\_encode
    
    Escapes/encodes URL-unsafe characters in a string.
    
    ##### Input
    
    ```text
    {{ "cool.person@example.com" | url_encode }}
    ```
    
    ##### Output
    
    ```text
    cool.person%40example.com
    ```
    
*   ### xml\_escape
    
    Escapes text for use in XML. If you use this filter in HTML messages (i.e. not webhooks), the final output may differ due to HTML processing.
    
    ##### Input
    
    ```text
    {{ "Have you seen \'Learn the basics: video guide\'?" | xml_escape }}
    ```
    
    ##### Output
    
    ```text
    Have you read &#39;James &amp; the Giant Peach&#39;?
    ```
    
*   ## Miscellaneous
    
    These are tags that you can use to escape liquid rendering or escape rendering all together.
    
*   ### comment
    
    This tag doesn’t show its contents, providing a way for you to leave notes inside templates for other members of your organization.
    
    ##### Syntax
    
    ```text
    {% comment %} Don't display me! {% endcomment %}
    ```
    
*   ### default
    
    Set a [default](https://liquidjs.com/filters/default.html) value when one does not exist. You can use the `default` filter rather than checking for empty strings using `== blank` or `!= blank`.
    
    ##### Example
    
    ```text
    {{ product_color | default: "red" }}
    {{ product_price | default: 2.99 }}
    ```
    
*   ### from\_json
    
    This filter lets you create values from JSON. `from_json` parses string-encoded (or ‘stringified’) JSON so you can reference its values with liquid. Note that you don’t need this filter for the JSON-encoded values of people, events, or objects; they are already automatically parsed.
    
    ##### Example
    
    ```text
    {% assign var = '{"key": "value", "number": 123, "boolean": true}' | from_json %}
    {{ var.key }}
    {{ var.number }}
    {{ var.boolean }}
    ```
    
    ##### Input
    
    ```text
    {% assign fruit = '{"type": "kiwi", "quantity": 2, "sweet": true}' | from_json %}
    {{ fruit.type }}
    {{ fruit.quantity }}
    {{ fruit.sweet }}
    
    {% assign greeting = '[{"greeting": "hello" }, {"greeting": "hey" }, {"greeting": "hi" }, {"greeting": "howdy" }]' | from_json %}
    {{ intro[0].greeting }}
    {{ intro[1].greeting }}
    {{ intro[2].greeting }}
    {{ intro[3].greeting }}
    ```
    
    ##### Output
    
    ```text
    kiwi
    2
    true
    
    hello
    hey
    hi
    howdy
    ```
    
*   ### generate\_uuid
    
    Generate a UUID.
    
    ##### Example
    
    ```text
    {% generate_uuid %}
    ```
    
*   ### json
    
    Converts values to a JSON-encoded string (same as using `jsonify`). An additional `space` parameter can be specified to format/prettify the JSON.
    
    ##### Input
    
    ```text
    {% assign arr = "foo bar coo" | split: " " %}
    {{ arr | json: 4 }}
    ```
    
    ##### Output
    
    ```text
    [
      "foo",
      "bar",
      "coo"
    ]
    ```
    
*   ### raw
    
    Temporarily disables Liquid processing. You might use this to escape tag processing if you use a conflicting syntax or you want to show raw liquid syntax in your message."
    
    ##### Example
    
    ```text
    {% raw %}
      {{This}} is displayed exactly as typed.
    {% endraw %}
    ```
    
*   ### to\_json
    
    Outputs the json representation of the input. For example, `{{ customer | to_json }}` sends all your customer data into a JSON variable.
    
    ##### Example
    
    ```text
    {{ customer | to_json }}
    ```
    
*   ### whitespace control
    
    You can remove whitespace before and/or after a tag using hyphens.
    
    ##### Input
    
    ```text
    {% assign username = "Charlie" %}
    Hello, {{ username -}} !
    ```
    
    ##### Output
    
    ```text
    Hello, Charlie!
    ```
    
*   ## Customer.io Keys
    
    These keys output data related to customers and campaign triggers.
    
*   ### cio\_link
    
    Use this tag to track links in outside of push or in-app messages. This includes `mailto` links. If you use our SDKs, you do not need to use this tag to track links in in-app messages. To track links in *emails*, go to `cio_link_id` below.
    
    The filters `track` and `url_params` are optional. If you exclude these filters, url parameters will be present and tracking will be on. To turn either off, set them to false. For more info on this tag, go to [Link tracking](/journeys/channels/links/tracking/#other-message-types).
    
    Do not use this tag to track [deep links](/journeys/channels/links/universal-links/#deep-links-vs-universal-links).
    
    ##### Example
    
    ```text
    {% cio_link url:https://example.com %}
    {% cio_link url:https://example.com track:true url_params:true %}
    {% cio_link url:https://example.com track:true url_params:false %}
    {% cio_link url:https://example.com track:false url_params:true %}
    {% cio_link url:https://example.com track:false url_params:false %}
    ```
    
    ##### Output
    
    ```text
    https://e.customeriomail.com/e/c/{string}
    https://e.customeriomail.com/e/c/{string}
    https://e.customeriomail.com/e/c/{string}
    https://example.com?utm_campaign={string}&utm_content={string}&utm_medium={string}&utm_source=customer.io
    https://example.com
    ```
    
*   ### cio\_link\_id
    
    Use this to track [deep links](/journeys/channels/links/universal-links/#deep-links-vs-universal-links) in **emails**. Visit [Track universal and app links in email](/journeys/channels/links/universal-links/#track-universal-and-app-links-in-email) for instructions.
    
    For links in non-email messages, go to `cio_link` above.
    
    ##### Example
    
    ```text
    <a href="https://yourwebsite.com/confirm?link_id={% cio_link_id %}" class="untracked">Text</a>
    ```
    
*   ### customer attributes
    
    You reference customer attributes—data associated directly with a person in Customer.io—in the `customer` scope. You may want to use customer attributes with an `if` conditional, so that you have text to fallback to if a customer doesn’t have the attribute in question.
    
    ##### Syntax
    
    ```text
    {{customer.<attribute_name>}}
    ```
    
    ##### Example
    
    ```text
    {% if customer.name != blank %}
      Hi {{customer.name | capitalize}}
    {% else %}
      Hi Buddy
    {%endif%}
    ```
    
*   ### event properties
    
    If you trigger a campaign using an event, you can reference properties from the event that triggers your campaign in the `event` scope. You may want to use event properties with an `if` conditional, so that you have text to fallback to if an event doesn’t have the property in question or your property doesn’t contain the value you expect.
    
    ##### Syntax
    
    ```text
    {{event.<property>}}
    ```
    
    ##### Example
    
    ```text
    {% if event.type == "purchase" %}
      Thanks for your purchase!
    {% else %}
      Thanks for using our service!
    {%endif%}
    ```
    
*   ### event\_id
    
    The id of the event being previewed for the selected sample profile. It throws an error if the event has not been sent recently (within the last ~30 days).
    
    ##### Syntax
    
    ```text
    {{event_id}}
    ```
    
*   ### event\_name
    
    The name of the event that triggers a campaign. If you send an event with different casings - for instance, MyEvent and myevent - Customer.io will output the event name that corresponds with the profile. This throws an error if the event has not been sent recently (within the last ~30 days).
    
    ##### Syntax
    
    ```text
    {{event_name}}
    ```
    
*   ### event\_timestamp
    
    The UNIX timestamp when a particular event was performed. This throws an error if the event has not been sent recently (within the last ~30 days).
    
    ##### Syntax
    
    ```text
    {{event_timestamp}}
    ```
    
*   ### journey attributes
    
    Journey attributes are unique to workflows. You can temporarily store data during a campaign instead of on a customer’s profile. Learn more about [setting journey attributes](/journeys/send/workflows/attribute-updates/set-journey-attributes/). To reference journey attributes in messages or webhooks, you’ll use the `journey` object.
    
    ##### Syntax
    
    ```text
    {{journey.<attribute_name>}}
    ```
    
    ##### Example
    
    ```text
    {% if journey.weather != blank %}
      Here's the forecast for the day: {{journey.weather}}!
    {% else %}
      Check out your forecast online at...
    {%endif%}
    ```
    
*   ### object & relationship attributes
    
    This syntax lets you reference object or relationship data associated with people, not campaign triggers. For trigger liquid, see [trigger properties](#trigger-properties-latest). The keys you’ll need depend on your use case. See [Objects in liquid](/journeys/objects-data/objects/in-liquid/#reference-non-trigger-data) for more information, and make sure you [understand the limitations before using this liquid](/journeys/objects-data/objects/in-liquid/#before-you-begin).
    
    ##### Syntax
    
    ```text
    {{objects.<object-type-name>[#].<object-attribute-name>}} // reference an object attribute
    {{objects.<object-type-name>[#].relationship.<relationship-attribute-name>}} // reference a relationship attribute
    {{customer._relationship.<relationship-attribute-name>}} // reference a relationship attribute for the audience member of object or relationship-triggered campaigns
    ```
    
    ##### Example
    
    ```text
    // list all online classes that a person has not started
    {% for class in objects.online_classes %}
    {% if class.relationship.status == "not_started" %}
      - {{class.name}}
    {% endif %}
    {% endfor %}
    ```
    
*   ### snippets
    
    [Create snippets](/journeys/liquid/snippets/) to reuse content across your messages. For instance, you could make a footer with a snippet.
    
    ##### Example
    
    ```text
    {{snippets.footer}}
    ```
    
*   ### trigger properties
    
    The `trigger` object pulls in data that triggers a transactional message, API-triggered broadcast, and campaigns triggered by webhooks, objects, or relationships. Remember to add fallbacks with conditionals; otherwise, your messages could fail to send if the value and a fallback don’t exist. [Learn more about using `trigger` objects](/journeys/liquid/using-liquid/#trigger-properties).
    
    ##### Syntax
    
    ```text
    // For transactional messages, webhook-triggered campaigns, or API-triggered broadcasts
    {{trigger.<data.property>}}
    
    // For object-triggered campaigns
    {{trigger.<object_type>.<attribute_name>}}
    
    // For object or relationship-triggered campaigns
    {{trigger.relationship.<attribute_name>}}
    ```
    
    ##### Example
    
    ```text
    {% if trigger.first_name %}
      Hi {{trigger.first_name | capitalize}}!
    {% else %}
      Hi friend!
    {%endif%}
    ```
    
*   ### view\_in\_browser\_url
    
    Our default link that generates a web version of your email, [personalized for each recipient](/journeys/channels/email/layouts/view-in-browser). This tag only works in **emails**—it is not supported in other message types like push notifications, in-app messages, SMS, or WhatsApp. If you set up [custom link tracking](/journeys/channels/email/deliverability/link-tracking-custom-domain/), your view in browser links use your branded domain. In general, these URLs look something like: `https://e.customeriomail.com/deliveries/....`
    
    ##### Syntax
    
    ```text
    {% view_in_browser_url %}
    ```
    
*   ## Customer.io Unsubscribe Keys
    
    These keys output unsubscribe links unique to each customer.
    
*   ### manage\_subscription\_preferences\_url
    
    Renders a unique unsubscribe link for [a customer and their email-address](/journeys/channels/subscriptions/overview/#unsubscribe-links). This link takes a user to your subscription center where they can manage all of their preferences.
    
    ##### Syntax
    
    ```text
    {% manage_subscription_preferences_url %}
    ```
    
*   ### unsubscribe
    
    Renders the word unsubscribe and links to the customer’s unique unsubscribe URL.
    
    ##### Syntax
    
    ```text
    {% unsubscribe %}
    ```
    
*   ### unsubscribe\_url
    
    Renders a unique unsubscribe link for [a customer and their email-address](/journeys/channels/subscriptions/unsubscribes/#how-do-i-add-an-unsubscribe-link-into-a-custom-layout).
    
    ##### Syntax
    
    ```text
    {% unsubscribe_url %}
    ```
    
*   ## Customer.io Meta Keys
    
    These keys output high-level data around your messages, campaigns, and more. Many of the `.id` values are useful as UTM parameters in links so you can log where your traffic is coming from or attribute customer actions to messages.
    
*   ### campaign.id
    
    “Campaign” in this context represents any workflow. This is the workflow’s ID, which can be found after the workflow type in the URL.
    
    For example, the campaign ID here is 2000: `https://fly.customer.io/env/12345/v2/campaigns/2000/overview.`
    
    And here it’s 1: `https://fly.customer.io/env/109950/composer/newsletters/1/templates/21`."
    
    ##### Syntax
    
    ```text
    {{campaign.id}}
    ```
    
*   ### campaign.name
    
    “Campaign” in this context represents any workflow. The name that you assigned your workflow.
    
    ##### Syntax
    
    ```text
    {{campaign.name}}
    ```
    
*   ### campaign.subscription\_topic\_ids
    
    To use this, you must enable our [subscription center](/journeys/channels/subscriptions/center/). This returns the topic assigned in subscription preferences settings for Campaigns, API Triggered Broadcasts and Newsletters.
    
    ##### Syntax
    
    ```text
    {{campaign.subscription_topic_ids}}
    ```
    
*   ### campaign.type
    
    “Campaign” in this context represents any workflow.
    
    This returns the type of trigger for a campaign: `behavioral` ([legacy segment-triggered](/journeys/send/campaigns/triggers/#condition-trigger)), `seg_attr` ([attribute or segment-triggered](/journeys/send/campaigns/triggers/#conditions-trigger)), `transactional` (event-triggered), `form`, `date`, `object`, or `relationship`.
    
    For messages sent through our Transactional API, this returns `transactional_message`.
    
    It also returns `triggered_broadcast` for an API-triggered broadcast or `newsletter` accordingly."
    
    ##### Syntax
    
    ```text
    {{campaign.type}}
    ```
    
*   ### content
    
    Use in layouts to indicate where code added via the email editor will be included. You might use this in a template for a transactional message or API-triggered broadcast where you will provide content from the API directly.
    
    ##### Example
    
    ```text
    {{content}}
    ```
    
*   ### delivery\_id
    
    A URL-compatible base64 string that identifies an instance of a message created for a person. When previewing a message, you’ll see `unsent`. This is generated when the message is drafted or sent.
    
    ##### Syntax
    
    ```text
    {{delivery_id}}
    ```
    
*   ### editor
    
    Describes the type of editor used to create an action. One of `bee` (drag-and-drop email editor), `html` (code email editor), `wysiwyg` (rich text email editor), or `rich` (rich push editor). For *Create or update person* actions, in-app messages, Design Studio emails, SMS, and custom push, this value is blank.
    
    ##### Syntax
    
    ```text
    {{editor}}
    ```
    
*   ### layout.id
    
    The numerical ID associated with the email layout you’ve used. Only available for emails made with the code or rich text editors.
    
    ##### Syntax
    
    ```text
    {{layout.id}}
    ```
    
*   ### layout.name
    
    The name assigned to the email layout you’re using. Only available for emails made with the code or rich text editors.
    
    ##### Syntax
    
    ```text
    {{layout.name}}
    ```
    
*   ### message.id
    
    The numerical ID for a message action in the workflow. For example, an SMS action might have a `{{message.id}}` of 200. Note that this identifies the action in your workflow, not the individual delivery instances. Every SMS delivery generated from the action would have a different `{{delivery_id}}`.
    
    For newsletters, the `message.id` is the value after templates in your URL. For example, the `message.id` here is `21` `https://fly.customer.io/env/109950/composer/newsletters/1/templates/21`.
    
    ##### Syntax
    
    ```text
    {{message.id}}
    ```
    
*   ### message.journey\_id
    
    The ID for the path a person went through in a Campaign or API-triggered Broadcast. You can use this value to trace message metrics back to a person’s path through a journey using the `journey.id` value sent in our [Reporting Webhooks](/webhooks).
    
    ##### Syntax
    
    ```text
    {{message.journey_id}}
    ```
    
*   ### message.name
    
    The name you give your message in the workflow, like “Welcome to ACME!”
    
    ##### Syntax
    
    ```text
    {{message.name}}
    ```
    
*   ### message.preheader
    
    For email messages only, if your message has a preheader value set, this tag echos it.
    
    ##### Syntax
    
    ```text
    {{message.preheader}}
    ```
    
*   ### message.send\_to\_unsubs
    
    If the message is set to send to unsubscribed users, this returns true. Otherwise, it returns false.
    
    ##### Syntax
    
    ```text
    {{message.send_to_unsubs}}
    ```
    
*   ### message.subject
    
    If your message has a subject, or the message subject is different from the message name, this tag echos it.
    
    ##### Syntax
    
    ```text
    {{message.subject}}
    ```
    
*   ### message.subscription\_topic\_ids
    
    To use this, you must enable our [subscription center](/journeys/channels/subscriptions/center/). This returns the topic ID of the subscription preference assigned to Campaigns, API-triggered Broadcasts and Newsletters. If there is a message-level override of the topic (Campaigns and API-triggered Broadcasts only), it will return the message-level topic ID.
    
    ##### Syntax
    
    ```text
    {{message.subscription_topic_ids}}
    ```
    
*   ### message.type
    
    This refers to the type of a particular workflow action. Possible values are: `email_action`, `delay_seconds_action`, `delay_time_window_action`, `split_randomized_action`, `webhook_action`, `twilio_action`, `slack_action`, `attribute_update_action`, `filter_match_delay_action`, `grace_period_action`, `push_action`, `conditional_wait_action`, `conditional_branch_action`, `multi_split_branch_action`, `random_cohort_branch_action,` `exit_action`, `static_seg_update_action`, `collection_query_action`, `create_event_action`, `multi_lang_branch_action`, `batch_update_action`, `in_app_action`.
    
    ##### Syntax
    
    ```text
    {{message.type}}
    ```
    
*   ### subscription\_topic\_name
    
    To use this, you must enable our [subscription center](/journeys/channels/subscriptions/center/). Renders the name of the subscription topic assigned to a broadcast or campaign. If the topic is overriden for a message, this will render the message-level topic name. Add a [language parameter](/journeys/channels/subscriptions/unsubscribe-faqs/#currently-supported-languages) to translate the name, like `lang='pt'`. If the language doesn’t match a translation in your subscription center, customers will see the default language.
    
    ##### Syntax
    
    ```text
    {% subscription_topic_name %}
    {% subscription_topic_name lang='pt' %}
    ```
    
*   ## Variable Tags
    
    Tags define the logic of your liquid. Variable tags help you define and alter variables.
    
*   ### assign
    
    Assign a value to a variable.
    
    ##### Syntax
    
    ```text
    {% assign var_name = 'value' %}
    ```
    
    ##### Input
    
    ```text
    {% assign favorite_food = 'apples' %}
    ```
    
    ##### Output
    
    ```text
    {{ favorite_food }}
    ```
    
*   ### capture
    
    Captures contents and assigns them to a variable.
    
    ##### Input
    
    ```text
    {% capture about_me %}I am 28 and my favorite food is pasta.{% endcapture %}
    ```
    
    ##### Output
    
    ```text
    {{ about_me }}
    ```
    
*   ## Iterative Tags
    
    Loop or iterate over data.
    
*   ### cycle
    
    In a ‘for’ loop, this tag loops through and outputs strings in the order they were passed.
    
    ##### Input
    
    ```text
    <ul>{% assign characters = "coyote,bugs,tweety" | split: "," %}
      {% for character in characters %}
      <li class="{% cycle 'odd', 'even' %}">{{ character }}</li>
      {% endfor %}
    </ul> 
    ```
    
    ##### Output
    
    ```text
    <ul>
      <li class='odd'>coyote</li>
      <li class='even'>bugs</li>
      <li class='odd'>tweety</li>
    </ul>
    ```
    
*   ### for loop
    
    Repeatedly executes a block of code, most commonly to perform an operation for each item in an array. You might use a for loop in a message to provide a receipt of purchases (assuming an array of items in a purchase). [Find more information about for loops and iteration here.](https://shopify.github.io/liquid/tags/iteration/)
    
    ##### Syntax
    
    ```text
    {% for item in array %}
      {{ item }}
    {% endfor %}
    ```
    
    ##### Example
    
    ```text
    {% comment %} You can output each item of the array {% endcomment %}
    {% for member in members_of_band %}
      {{member}}
    {% endfor %}
    
    {% comment %} If the items are objects, you can output properties from each object {% endcomment %}
    {% for product in event.products %}
      - {{ product.title }} x {{ product.price }}
    {% endfor %}
    ```
    
*   ## Conditional Tags
    
    Set conditions to determine the output.
    
*   ### case
    
    Creates a set of conditions depending on a variable’s specific value—like a set of if, if-else, else conditions.
    
    For example, you might use this to display different text depending on if a customer lives in a specific country.
    
    ##### Syntax
    
    ```text
    {% case condition %}
      {% when "value1" %}
        text when condition is value1.
      {% when "value2" or "value3" %}
        text when condition is value2 or value3
      {% else %}
        text when condition does not match other conditions
    {% endcase %}
    ```
    
*   ### if
    
    Executes a block of code if a condition is met. We execute the first true condition. Use `elsif` to add multiple ‘if’ conditions and `else` for the block of code you want to execute if all conditions are false. [Find more information about conditional liquid here](https://github.com/customerio/liquid/wiki/Liquid-for-Designers#if--else).
    
    ##### Example
    
    ```text
    Hey
    {% if customer.first_name %}
      {{customer.first_name}}
    {% else %}
      there
    {% endif %}
    !
    
    {% if customer.lastEventType == "sports" %}
      You last attended a sports event, so we thought you might like to try out our leagues! Fill out our interest form below.
    {% elsif customer.lastEventType == "theater" %}
      You attended a theater event, so we thought you might like to try out our after show parties! Fill out our interest form below.
    {% elsif customer.lastEventType %}
      {% comment %} If the attribute exists and does not equal sports or theater, then this will render. {% endcomment %}
      You last attended {{customer.lastEventType}}; we'd love to hear what other offerings you'd like from us in the form below.
    {% else %}
      {% comment %} If the attribute does not exist, this will render. {% endcomment %}
      Let us know your interests in the form below so we can better serve you!
    {% endif %}
    ```
    
*   ### unless
    
    Like an if conditional, but reversed: this tag executes a block of code if your condition is *not* met.
    
    ##### Example
    
    ```text
    {% unless product.name == "cool beans" %}
      The beans are not cool.
    {% endunless %}
    ```
    
*   ## Logical Operators
    
    Logical operators determine the basic rules for evaluating true or false statements. You can also use `and` and `or` operators to combine logic statements to evaluate multiple conditions.
    
*   ### and
    
    Evaluate a statement as true when both conditions are true.
    
    ##### Syntax
    
    ```text
    {% if condition1 and condition2 %}
      // do something if both condition1 and condition 2 are true
    {% endif %}
    ```
    
    ##### Example
    
    ```text
    {% if customer.name == "bugs bunny" and event.episode_start == true %}
      What's up doc?
    {% else %}
      That's all folks!
    {% endif %}
    ```
    
*   ### does not equal (!=)
    
    Use `!=` to check that two values are *not* equal to each other.
    
    ##### Example
    
    ```text
    {% if customer.name != "daffy duck" %}
      Duck season!
    {% else %}
      Wabbit season!
    {%endif%}
    ```
    
*   ### equals (==)
    
    Use `==` to check if two values are equal to each other.
    
    ##### Example
    
    ```text
    {% if customer.name == "daffy duck" %}
      Wabbit season!
    {% else %}
      Duck season!
    {% endif %}
    ```
    
*   ### greater than and greater than or equal to (>, >=)
    
    Use `>` to match when one value is greater than another. Use `>=` to match when one value is greater than *or* equal to another.
    
    ##### Syntax
    
    ```text
    {% if val1 > val2 %}
      {% comment %}do something if val1 is greater than val2{% endcomment %}
    {% endif %}
    ```
    
    ##### Example
    
    ```text
    {% if customer.acct_age_years > 1 %}
      Thanks for being with us these past years
    {% else %}
      Thanks for spending the last year with us!
    {% endif %}
    ```
    
*   ### less than and less than or equal to (<, <=)
    
    Use `<` to match when one value is less than another. Use `<=` to match when one value is less than *or* equal to another.
    
    ##### Syntax
    
    ```text
    {% if val1 < val2 %}
      {% comment %}do something if val1 is less than val2{% endcomment %}
    {% endif %}
    ```
    
    ##### Example
    
    ```text
    {% if customer.purchases < 5 %}
      Thanks for your support
    {% else %}
      Thanks for spending the last year with us!
    {% endif %}
    ```
    
*   ### or
    
    Evaluate a statement as true when either of two conditions are true.
    
    ##### Syntax
    
    ```text
    {% if condition1 or condition2 %}
      {% comment %}do something if either condition1 and condition 2 are true{% endcomment %}
    {% endif %}
    ```
    
    ##### Example
    
    ```text
    {% if customer.name == "bugs bunny" or customer.group == "looney toons" %}
      That's all folks!
    {% else %}
      See you later!
    {% endif %}
    ```
    
*   ## Timestamps and Dates
    
    Use these tags to get and manipulate dates and times.
    
*   ### add\_day
    
    Adds a day, or multiple days, to a given timestamp.
    
    ##### Syntax
    
    ```text
    {{ <unix_timestamp> | add_day: <int_days> }}
    ```
    
    ##### Example
    
    ```text
    {{ 1477430251 | add_day: 7 }}
    ```
    
*   ### add\_month
    
    Adds a month, or multiple months, to a given timestamp.
    
    ##### Syntax
    
    ```text
    {{ <unix_timestamp> | add_month: <int_months> }}
    ```
    
    ##### Example
    
    ```text
    {{ 1477430251 | add_month: 7 }}
    ```
    
*   ### add\_year
    
    Adds a year, or multiple years, to a given timestamp.
    
    ##### Syntax
    
    ```text
    {{ <unix_timestamp> | add_year: <int_years> }}
    ```
    
    ##### Example
    
    ```text
    {{ 1477430251 | add_year: 4 }}
    ```
    
*   ### countdown
    
    Creates a countdown timer in your message, helping you alert your audience to how soon an event they’re interested in is set to happen. Countdown timers take several parameters. At the minimum, a countdown must include the font size, the foreground (font) color, the background color, and the time you want to count down to. **You can only set this to count down from a *static timestamp*; you cannot set the time to count down based on a customer’s attribute, for instance.**
    
    The countdown timer cannot contain more than 60 frames. This limits the size of the animated GIF in your messages. So, if the resolution is set to seconds, the counter will stop after 60 seconds from when the person opens their message. The countdown image reloads when a person opens the message again, so the counter will always be relevant to the user’s current time, but it cannot count indefinitely.
    
    Parameter
    
    required
    
    format
    
    default
    
    description
    
    point
    
    ✓
    
    integer
    
    The font size for the timer
    
    time
    
    ✓
    
    ISO 8601 timestamp
    
    The date and time you want to countdown to in the format `YYYY-MM-DD hh:mm:ss (GMT)`. Remember to close the time in quotes, as the value includes a space. This field does not accept liquid variables.
    
    fg
    
    ✓
    
    hex color
    
    The foreground (font) hexidecimal color
    
    bg
    
    ✓
    
    hex color
    
    The background hexidecimal color
    
    apng
    
    boolean
    
    false
    
    Determines whether to show your countdown as a gif (default) or animated PNG. Note that some browsers/email clients don’t support apng images.
    
    font
    
    string
    
    inter, roboto
    
    The font family for your timer
    
    weight
    
    string
    
    normal
    
    The font weight, takes normal CSS `font-weight` values.
    
    locale
    
    language code
    
    en
    
    The language you want to display: `en` (English), `ru` (Russian), `jp` (Japanese), `zh` (Chinese), `pt` (Portugese), `es` (Spanish), and `fr` (French)
    
    looping
    
    boolean
    
    false
    
    Determines whether the countdown timer should restart after it finishes
    
    resolution
    
    one of S, M, H, D
    
    S
    
    Determines how often the timer counts down—by the second, minute, hour, or day.
    
    frames
    
    integer
    
    1
    
    Number of seconds you want to show, based on the resolution, where seconds: 60, minutes: 2, hours: 1, days: 1
    
    ##### Example
    
    ```text
    {% countdown point:64 font:roboto weight:light fg:000000 bg:f2f6f9 time:"2022-07-04 12:00:00 (GMT)" locale:en looping:true resolution:S frames:2 %}
    ```
    
    [![countdown-timer.png
    ](https://docs.customer.io/images/countdown-timer.png)](#8aca4f25c6b61d7d00851acc7cbf0828-lightbox)
    
*   ### date
    
    Format a date. Use the [Ruby syntax reference](https://ruby-doc.org/stdlib-2.5.1/libdoc/time/rdoc/Time.html#method-c-parse) for more information about date formatting syntax.
    
    ##### Input
    
    ```text
    {{ 1483272000 | date: '%H:%M, %a, %b %d, %Y' }}
    ```
    
    ##### Output
    
    ```text
    12:00, Sun, Jan 01, 2017
    ```
    
*   ### event\_timestamp
    
    The UNIX timestamp when a particular event was performed. This time is different from the `now` tag! This throws an error if the event has not been sent recently (within the last ~30 days).
    
    ##### Syntax
    
    ```text
    {{event_timestamp}}
    ```
    
*   ### now
    
    The current time in UTC. You must [format time](https://ruby-doc.org/stdlib-2.5.1/libdoc/time/rdoc/Time.html#method-c-parse) with `date`.
    
    To modify date or time with `add` or `subtract` filters you must convert `now` into a unix timestamp first using `date: '%s'`. If you use our built in `add_day`, `add_month`, or `add_year` filters, you must convert the timestamp to an integer first. You can do this by using the `plus` filter to add `0` as shown in the second example below.
    
    ##### Example
    
    ```text
    {{ 'now' | date: '%I:%M %p %B %d, %Y' }}
    {{ 'now' | date: '%s' | plus: 0 | add_day: 1 | date: '%I:%M %p %B %d, %Y'}}
    ```
    
    ##### Output
    
    ```text
    08:28 AM May 11, 2021
    08:28 AM May 12, 2021
    ```
    
*   ### subtract\_day
    
    Subtracts a day, or multiple days, to a given timestamp.
    
    ##### Syntax
    
    ```text
    {{ <unix_timestamp> | subtract_day: <int_days> }}
    ```
    
    ##### Example
    
    ```text
    {{ 1477430251 | subtract_day: 7 }}
    ```
    
*   ### subtract\_month
    
    Subtracts a month, or multiple months, to a given timestamp.
    
    ##### Syntax
    
    ```text
    {{ <unix_timestamp> | subtract_month: <int_months> }}
    ```
    
    ##### Example
    
    ```text
    {{ 1477430251 | subtract_month: 2 }}
    ```
    
*   ### subtract\_year
    
    Subtracts a year, or multiple years, to a given timestamp.
    
    ##### Syntax
    
    ```text
    {{ <unix_timestamp> | subtract_year: <int_years> }}
    ```
    
    ##### Example
    
    ```text
    {{ 1477430251 | subtract_year: 4 }}
    ```
    
*   ### timezone
    
    Converts a timestamp to a time zone you specify. You can use `now` instead of a timestamp. You can convert to any time zone using numerical format, as an offset from UTC (e.g. -5 for EST). Otherwise, unix timestamps default to UTC. You can also specify the [region using a string, like `America/Los_Angeles`](/journeys/send/timezones/example-timezones/#region). Check out our [blog](https://customer.io/blog/easy-date-formatting-with-liquid/#formatting-dates-and-times-in-liquid) for more, common examples for formatting timestamps.
    
    ##### Example
    
    ```text
    {{ 1483272000 | timezone: '-8' | date: '%H:%M, %a, %b %d, %Y' }}
    {{ 1483272000 | timezone: 'America/Los_Angeles' | date: '%H:%M, %a, %b %d, %Y' }}
    {{ 1483272000 | timezone: 'America/Los_Angeles' | date: '%a., %-m/%d at %I:%M %P %Z' }}
    ```
    
    ##### Output
    
    ```text
    04:00, Sun, Jan 01, 2017
    04:00, Sun, Jan 01, 2017
    Sun., 1/01 at 4:00 am PST
    ```
    
*   ## Array Filters
    
    Liquid used to filter and manipulate arrays (lists of values). If your event or another incoming value is an array, you may iterate over the array with a `for` loop or grab items at a particular index of the array, to display information for your audience.
    
*   ### compact
    
    Removes `nil` (empty) values from an array.
    
    ##### Input
    
    ```text
    {{ "mick, keith, nil, Charlie" | compact }}
    ```
    
    ##### Output
    
    ```text
    mick, keith, Charlie
    ```
    
*   ### concat
    
    Concatenates arrays, joining them end to end. Does not accept non-arrays passed in as an argument. The resulting array contains all of the elements of both original arrays. `concat` does not remove duplicate entries unless you also use the `uniq` filter.
    
    ##### Input
    
    ```text
    {% assign stones = "mick, keith, ronnie, charlie" | split: ", " %}
    {% assign beatles = "john, paul, george, ringo" | split: ", " %}
    {% assign rolling_beatles = stones | concat: beatles %}
    {{ rolling_beatles | join: ", " }}
    ```
    
    ##### Output
    
    ```text
    mick, keith, ronnie, charlie, john, paul, george, ringo
    ```
    
*   ### first
    
    Returns the first element of the array.
    
    ##### Input
    
    ```text
    acme.characters = ["Wile E Coyote", "Road Runner"]
    {{ acme.characters | first }}
    ```
    
    ##### Output
    
    ```text
    Wile E Coyote
    ```
    
*   ### join
    
    Joins the elements of an array with the character passed as the parameter.
    
    ##### Input
    
    ```text
    acme.characters = ["Wile E Coyote", "Road Runner"]
    {{ acme.characters | join: ', ' }}
    ```
    
    ##### Output
    
    ```text
    Wile E Coyote, Road Runner
    ```
    
*   ### last
    
    Returns the last element of the array.
    
    ##### Input
    
    ```text
    acme.characters = ["Wile E Coyote", "Road Runner"]
    {{ acme.characters | last }}
    ```
    
    ##### Output
    
    ```text
    Road Runner
    ```
    
*   ### limit
    
    Return a set number of values from an array or string.
    
    ##### Input
    
    ```text
    {% assign beatles = "john, paul, george, ringo" | split: ", " %}
    {{ beatles | limit: 2 | join: ", " }}
    ```
    
    ##### Output
    
    ```text
    john, paul
    ```
    
*   ### map
    
    Creates an array of values by extracting the values of a property in an object. You can output your new characters in a [‘for’ loop](#for-loop).
    
    ##### Input
    
    ```text
    Array of objects: [{"name":"coyote"},{"name":"bugs"},{"name":"tweety"}]"
    {% assign names = customer.characters | map: 'name' %}
    ```
    
    ##### Output
    
    ```text
    coyote, bugs, tweety
    ```
    
*   ### remove
    
    Remove an element from an array. The array can contain objects of any type.
    
    ##### Input
    
    ```text
    {% assign pl = customer.products | remove: customer.products[0] %}
    - {{ customer.products.size }}
    - {{ pl.size }}
    ```
    
    ##### Output
    
    ```text
    - 2
    - 1
    ```
    
*   ### size
    
    Returns the number of characters (the size) of a string (in characters) or the number of elements in an array.
    
    ##### Input
    
    ```text
    {{ "That's all, folks!" | size }}
    {{ customer.latest_purchase | size }}
    {{ objects.online_classes | size }}
    {{ objects.online_classes.size }}
    ```
    
    ##### Output
    
    ```text
    18 // The number of characters
    4 // If `latest_purchase` is an array, this returns the number of items in the array. Otherwise, it returns a count of characters.
    2 // The number of objects (onlines classes) that a person is related to.
    2 // Using the size filter with dot notation
    ```
    
*   ### sort
    
    Sorts the elements of an array by an attribute of an element in that array. Usually used with a ‘for’ loop. The order of the sorted array is case-sensitive! This filter will throw an error when used with any list/array that contains null values.
    
    ##### Input
    
    ```text
    {% assign beatles = "paul, john, ringo, george" | split: ", " %}
    
    {{ beatles | sort | join: ", " }}
    ```
    
    ##### Output
    
    ```text
    george, john, paul, ringo
    ```
    
*   ### sort\_natural
    
    Sort the items in an array in case-insensitive order.
    
    ##### Input
    
    ```text
    {{ "mick, keith, Charlie, Ronnie" | sort_natural }}
    ```
    
    ##### Output
    
    ```text
    Charlie, keith, mick, Ronnie
    ```
    
*   ### sum
    
    The `sum` filter concatenates values in an array, including numbers; every value is treated as a string. You can specify an object property to sum, as shown in the third example below.
    
    The `sum` filter doesn’t add number values together. But if you [upgrade](/journeys/liquid/upgrade/#changing-your-liquid-version) to our [latest liquid](/journeys/liquid/tag-list/?version=latest#sum-latest), it will!
    
    ##### Input
    
    ```text
    {% assign nums = '1,2,3' | split: ',' %}
    {{ nums | sum }}
    
    {% assign letters = 'a,b,c' | split: ',' %}
    {{ letters | sum }}
    
    {{ cart.products | sum: 'total_number' }} {% comment %} where `total_number` includes milk,cheese,eggs {% endcomment %}
    
    {{ purchase.products | sum }} {% comment %} where `products` includes true,false {% endcomment %}
    ```
    
    ##### Output
    
    ```text
    123
    abc
    milkcheeseeggs
    truefalse {% comment %} would also concatenate numbers alongside booleans {% endcomment %}
    ```
    
*   ### uniq
    
    Removes duplicate elements in an array.
    
    ##### Input
    
    ```text
    {% assign my_array = '"lions", "tigers", "bears", "bears", "lions"' %}
    {{ my_array | uniq | join: ", " }}
    ```
    
    ##### Output
    
    ```text
    lions, tigers, bears
    ```
    
*   ### where
    
    Creates an array including only the objects with a given property value, or any “truthy” value by default.
    
    ##### Input
    
    ```text
    All Players:
    {% for player in customer.players %}
      - {{ player.last_name }}
    {% endfor %}
    
    Baseball Players:
    {% assign baseball_players = customer.players | where: "sport", "baseball" %}
    {% for player in baseball_players %}
      - {{ player.last_name }}
    {% endfor %}
    
    ----------------------------
    
    All products:
    {% for product in customer.products %}
    - {{ product.title }}
    {% endfor %}
    
    {% assign available_products = customer.products | where: "available" %}
    
    Available products:
    {% for product in available_products %}
    - {{ product.title }}
    {% endfor %}
    ```
    
*   ### where\_not
    
    Creates an array of items that **do not match** a given property value, or any “falsey” value by default. When using `where_not`, you provide two items separated by a comma: the property you want to match on and the value you want to match.
    
    ##### Input
    
    ```text
    All players:
    {% for player in customer.players %}
      - {{ player.last_name }}
    {% endfor %}
    
    Not baseball players:
    {% assign not_baseball_players = customer.players | where_not: "sport", "baseball" %}
    {% for player in not_baseball_players %}
      - {{ player.last_name }}
    {% endfor %}
    ```
    
    ##### Output
    
    ```text
    All players:
      - Posey
      - Maradona
      - Montana
      - Gretzky
      - Jordan
    
    Not baseball players:
      - Maradona
      - Montana
      - Gretzky
      - Jordan
    ```
    
*   ## Number and Currency Filters
    
    These are tags and filters that manipulate incoming number, integer, and timestamp values.
    
    Some tags, like the `currency` and `format_number`, take an optional localization parameter, formatting the output for a specific locale. These tags use the format `{{ 10 | currency: "en-us" }}`, which would output `$10.00`.
    
*   ### A list of locales
    
    We support the following localization values:
    
    ```fallback
    af, ar, az, be, bg, bn, bs, ca, cs, cy, da, de-AT, de-CH, de-DE, de, dz, el-CY,
    el, en-AU, en-CA, en-CY, en-GB, en-IE, en-IN, en-NZ, en-TT, en-US, en-ZA, en, eo,
    es-419, es-AR, es-CL, es-CO, es-CR, es-EC, es-ES, es-MX, es-NI, es-PA, es-PE, es-US,
    es-VE, es, et, eu, fa, fi, fr-CA, fr-CH, fr-FR, fr, gl, he, hi-IN, hi, hr, hu, id,
    is, it-CH, it, ja, ka, km, kn, ko, lb, lo, lt, lv, mk, ml, mn, mr-IN, ms, na, nb,
    ne, ng, nl, nn, oc, or, pa, pl, pt-BR, pt, rm, ro, ru, sc, sd, sk, sl, sn, sq, sr,
    st, sw, ta, te, th, tl, tn, tr, tt, ug, ur, uz, vi, wo, za, zh-CN, zh-HK, zh-TW,
    zh-YUE, ao, cd, ci, cm, eg, gh, ke, ls, ly, ma, mu, mw, mz, sz, tz, zm
    ```
    
*   ### abs
    
    Returns the absolute value of a number.
    
    ##### Input
    
    ```text
    {{ 3.14 | abs }}
    ```
    
    ##### Output
    
    ```text
    3.14
    ```
    
*   ### ceil
    
    Rounds a number up to the nearest integer.
    
    ##### Input
    
    ```text
    {{ 3.14 | ceil }}
    ```
    
    ##### Output
    
    ```text
    4
    ```
    
*   ### currency
    
    Converts an integer to currency. This filter can also take an optional localization parameter to format currency for a [specific locale](#number-and-currency-filters).
    
    ##### Input
    
    ```text
    {{ 10 | currency }}
    {{ 123456.78 | currency: "fr" }}
    ```
    
    ##### Output
    
    ```text
    $10.00
    123 456,78€
    ```
    
*   ### floor
    
    Rounds a number down to the nearest integer.
    
    ##### Input
    
    ```text
    {{ 3.14 | floor }}
    ```
    
    ##### Output
    
    ```text
    3
    ```
    
*   ### format\_number
    
    Format a number with a delimiter. This filter also takes an optional localization parameter to format a number for a [specific locale](#number-and-currency-filters-legacy).
    
    **NOTE**: This replaces the former `number_with_delimeter` filter.
    
    ##### Input
    
    ```text
    {{ 10000 | format_number }}
    {{ 123456.78 | format_number: "fr" }}
    ```
    
    ##### Output
    
    ```text
    10,000
    123 456,78
    ```
    
*   ### random
    
    Generates a random number between 0 and an integer you specify.
    
    ##### Example
    
    ```text
    {% random 100 %}
    ```
    
*   ### round
    
    Rounds a number up or down to the nearest integer, or to a decimal place you specify.
    
    ##### Input
    
    ```text
    {{ 4.32 | round }}
    {{ 4.32 | round: 1 }}
    ```
    
    ##### Output
    
    ```text
    4
    4.3
    ```
    
*   ### rounded\_currency
    
    Rounds a number to the nearest whole integer and formats it to a currency.
    
    ##### Input
    
    ```text
    {{ 3.1415 | rounded_currency }}
    ```
    
    ##### Output
    
    ```text
    $3
    ```
    
*   ## Math Filters
    
    Filters that perform math operations on incoming number or integer values. With the legacy liquid version, if you encounter an error with negatives while using math filters, wrap the negative numbers in quotes.
    
*   ### at\_least
    
    Limits a number to a minimum value.
    
    ##### Input
    
    ```text
    {{ 41 | at_least: 42 }}
    ```
    
    ##### Output
    
    ```text
    42
    ```
    
*   ### at\_most
    
    Limits a number to a maximum value.
    
    ##### Input
    
    ```text
    {{ 100 | at_most: 99 }}
    ```
    
    ##### Output
    
    ```text
    99
    ```
    
*   ### divided\_by
    
    Divides a number by another number.
    
    ##### Input
    
    ```text
    {{ 10 | divided_by: 2.5 }}
    {{ 10 | divided_by: 4 }}
    {{ 10 | divided_by: 4.0 }}
    ```
    
    ##### Output
    
    ```text
    4.0
    2
    2.5
    ```
    
*   ### minus
    
    Subtracts a number from another number.
    
    ##### Input
    
    ```text
    {{ 10 | minus: 1 }}
    ```
    
    ##### Output
    
    ```text
    9
    ```
    
*   ### modulo
    
    Returns the remainder of division.
    
    ##### Input
    
    ```text
    {{ 3 | modulo: 2 }}
    ```
    
    ##### Output
    
    ```text
    1
    ```
    
*   ### plus
    
    Adds a number to another.
    
    ##### Input
    
    ```text
    {{ 10 | plus: 1 }}
    ```
    
    ##### Output
    
    ```text
    11
    ```
    
*   ### times
    
    Multiplies a number by another number.
    
    ##### Input
    
    ```text
    {{ 5 | times: 2 }}
    {{ 10 | times: 2.5 }}
    ```
    
    ##### Output
    
    ```text
    10
    25.0
    ```
    
*   ## String Filters
    
    The following filters manipulate strings in templates. You might use these to truncate or set the case of strings you reference from other places, to humanize your messages for recipients.
    
*   ### append
    
    Adds a string to the end of another string.
    
    ##### Input
    
    ```text
    {{ "What's all the hubbub, " | append: "bub?" }}
    ```
    
    ##### Output
    
    ```text
    What's all the hubbub, bub?
    ```
    
*   ### base64
    
    Base64-encodes a string.
    
    ##### Input
    
    ```text
    {{ 'Hello, world!' | base64 }}
    ```
    
    ##### Output
    
    ```text
    SGVsbG8sIHdvcmxkIQ==
    ```
    
*   ### base64\_decode
    
    Decode a base64-encoded string.
    
    ##### Input
    
    ```text
    {{ "Zm9vLmJhcg==" | base64_decode }}
    ```
    
    ##### Output
    
    ```text
    foo.bar
    ```
    
*   ### base64\_encode
    
    Base64-encode a value.
    
    ##### Input
    
    ```text
    {{ "foo.bar" | base64_encode }}
    ```
    
    ##### Output
    
    ```text
    Zm9vLmJhcg==
    ```
    
*   ### base64\_url\_safe\_decode
    
    Decode a string from URL-safe Base64.
    
    ##### Input
    
    ```text
    {{ "Zm9vLmJhcg" | base64_url_safe_decode }}
    ```
    
    ##### Output
    
    ```text
    foo
    ```
    
*   ### base64\_url\_safe\_encode
    
    Encode a string into URL-safe Base64. To produce URL-safe Base64, this filter uses `-` and `_` in place of `+` and `/`.
    
    ##### Input
    
    ```text
    {{ "foo" | base64_url_safe_encode }}
    ```
    
    ##### Output
    
    ```text
    Zm9vLmJhcg
    ```
    
*   ### capitalize
    
    Capitalize the first character in a string.
    
    ##### Input
    
    ```text
    {{ "hello world" | capitalize }}
    ```
    
    ##### Output
    
    ```text
    Hello world
    ```
    
*   ### contains
    
    Finds a substring inside a string, or the presence of a string in an array of strings. This filter only works with strings; you cannot use it to search for an object in an array of object.
    
    ##### Syntax
    
    ```text
    {% if product.description contains 'lorem ipsum' %}
      You might also be interested in Fillerama or Office Ipsum.
    {% endif %}
    ```
    
*   ### downcase
    
    Converts a string to lower case.
    
    ##### Syntax
    
    ```text
    {{ 'STRING' | downcase }}
    ```
    
    ##### Input
    
    ```text
    {{ "ACME" | downcase }}
    ```
    
    ##### Output
    
    ```text
    acme
    ```
    
*   ### escape
    
    Escaping (or encoding) a string removes special characters.
    
    ##### Input
    
    ```text
    {{ "win+help@customer.io" | escape }}
    ```
    
    ##### Output
    
    ```text
    win%2Bhelp%40customer.io
    ```
    
*   ### escape\_once
    
    Escapes or encodes a string, but doesn’t include already-escaped characters.
    
    ##### Input
    
    ```text
    {{ "1 < 2 & 3" | escape_once }}
    ```
    
    ##### Output
    
    ```text
    1 < 2 & 3
    ```
    
*   ### hex\_base64
    
    Returns a base64 encoding of a hex digest, like ones returned by the `hmac_sha256` filter.
    
    ##### Input
    
    ```text
    {{ "Customer.io" | hmac_sha256: "some_key" | hex_base64 }}
    ```
    
    ##### Output
    
    ```text
    bd23cyOCFrzicxM7w/ahKoJPQd0YTQlFLwXHZZ2ufVc=
    ```
    
*   ### hmac\_sha1
    
    Converts a string into an hmac\_sha1 hash.
    
    ##### Input
    
    ```text
    {{ "Customer.io" | hmac_sha1: "some_key" }}
    ```
    
    ##### Output
    
    ```text
    2bdf556c9a75766f258d1e2824f6d0e31d1beedc
    ```
    
*   ### hmac\_sha256
    
    Converts a string into an hmac\_sha256 hash.
    
    ##### Input
    
    ```text
    {{ "Customer.io" | hmac_sha256: "some_key" }}
    ```
    
    ##### Output
    
    ```text
    6dddb773238216bce273133bc3f6a12a824f41dd184d09452f05c7659dae7d57
    ```
    
*   ### htmlencode
    
    Escapes HTML characters into HTML entities.
    
*   ### lstrip
    
    Strips all whitespace, including tabs, spaces, and newlines, from the left side of a string.
    
    ##### Input
    
    ```text
    text{{ " Customer.io " | lstrip }}text
    ```
    
    ##### Output
    
    ```text
    textCustomer.io text
    ```
    
*   ### md5
    
    Converts a string into an md5 hash.
    
    ##### Input
    
    ```text
    {{ "Customer.io" | md5 }}
    ```
    
    ##### Output
    
    ```text
    d52b6a207bf5255c05b1d0056230617e
    ```
    
*   ### newline\_to\_br
    
    Replaces newline with an HTML line break. input: See [this](https://shopify.github.io/liquid/filters/newline_to_br/) example for output.
    
    ##### Input
    
    ```text
    <br />
    Customer.io<br />
    liquid<br />
    ```
    
*   ### pluralize
    
    Outputs the singular or plural version of a string based on the value of a number. The first parameter is the singular string and the second parameter is the plural string.
    
    ##### Syntax
    
    ```text
    {{ int-val | pluralize: 'singular', 'plural'}}
    ```
    
    ##### Input
    
    ```text
    {{ event.item_count | pluralize: 'item', 'items' }}
    ```
    
    ##### Output
    
    ```text
    3 items
    ```
    
*   ### prepend
    
    Adds a string to the beginning of another string.
    
    ##### Input
    
    ```text
    {{ "Sufferin' succotash!" | prepend: "Sylvester: " }}
    ```
    
    ##### Output
    
    ```text
    Sylvester: Sufferin' succotash!
    ```
    
*   ### remove\_first
    
    Removes the first occurrence of a value from a string.
    
    ##### Input
    
    ```text
    {{ "folks that's all, folks!" | remove_first: "folks" }}
    ```
    
    ##### Output
    
    ```text
    that's all folks!
    ```
    
*   ### remove\_last
    
    Remove the last occurence of a string within a substring.
    
    ##### Input
    
    ```text
    {{ "foobarbar" | remove_last: "bar" }}
    ```
    
    ##### Output
    
    ```text
    foobar
    ```
    
*   ### remove
    
    Removes a value from a string.
    
    ##### Input
    
    ```text
    {{ "And that's all, folks!" | remove: ", folks" }}
    ```
    
    ##### Output
    
    ```text
    And that's all!
    ```
    
*   ### replace
    
    Find and replace values within a string. The first argument represents the value you want to replace, and the second argument is the replacement.
    
    ##### Syntax
    
    ```text
    {{ "String you want to replace values in" | replace: "find-str", "replace-str" }}
    ```
    
    ##### Input
    
    ```text
    {{ "Coyotes never catch roadrunners!" | replace: "never", "always" }}
    ```
    
    ##### Output
    
    ```text
    Coyotes always catch roadrunners!
    ```
    
*   ### replace\_first
    
    Find and replace the first match in a string. The first argument represents the value you want to replace, and the second argument is the replacement.
    
    ##### Syntax
    
    ```text
    {{ "String you want to replace values in" | replace_first: "find-str", "replace-str" }}
    ```
    
    ##### Input
    
    ```text
    {{ "roller rocket roller skates" | replace_first: "roller", "awesome" }}
    ```
    
    ##### Output
    
    ```text
    awesome rocket roller skates
    ```
    
*   ### replace\_last
    
    Replace the last occurence of a string within a substring.
    
    ##### Input
    
    ```text
    {{ "foobarbar" | replace_last: "bar", "foo" }}
    ```
    
    ##### Output
    
    ```text
    foobarfoo
    ```
    
*   ### rstrip
    
    Strips all whitespace, including tabs, spaces, and newlines, from the right side of a string.
    
    ##### Input
    
    ```text
    text{{ " Customer.io " | rstrip }}text
    ```
    
    ##### Output
    
    ```text
    text Customer.iotext
    ```
    
*   ### sha1
    
    Converts a string into a sha1 hash.
    
    ##### Input
    
    ```text
    {{ "Customer.io" | sha1 }}
    ```
    
    ##### Output
    
    ```text
    c197ff0ae0a41983362f35ca972c544061c54d4c
    ```
    
*   ### sha256
    
    Converts a string into the same output as [`hmac_sha256`](/journeys/liquid/tag-list/?version=legacy#hmac_sha256-legacy).
    
    ##### Input
    
    ```text
    {{ "Customer.io" | sha256 }}
    ```
    
    ##### Output
    
    ```text
    6dddb773238216bce273133bc3f6a12a824f41dd184d09452f05c7659dae7d57
    ```
    
*   ### slice
    
    Returns the character located at the index specified in the first argument. You can also provide a second argument indicating the length of the string you want to return (if you want to return multiple characters).
    
    If the first argument is a negative number, the index is begins from the end of the string.
    
    ##### Syntax
    
    ```text
    {{ "string" | slice: <req, index of char>, <optional, length of result> }}
    ```
    
    ##### Input
    
    ```text
    {{ "Customer.io" | slice: 3 }}
    {{ "Customer.io" | slice: 3, 3 }}
    {{ "Customer.io" | slice: '-4', 3 }}
    ```
    
    ##### Output
    
    ```text
    t
    tom
    r.i
    ```
    
*   ### split
    
    Divides an input string into an array using a separator you define. This filter is often used with a for loop.
    
    ##### Input
    
    ```text
    {% assign rolling_stones = "Mick, Keith, Ronnie, Charlie" | split: ", " %}
    
    {% for member in rolling_stones %}
      {{ member }}
    {% endfor %}
    ```
    
*   ### strip
    
    Strips all whitespace, including tabs, spaces, and newlines, from the left and right side of a string.
    
    ##### Input
    
    ```text
    text{{ " Customer.io " | strip }}text
    ```
    
    ##### Output
    
    ```text
    Customer.io
    ```
    
*   ### strip\_html
    
    Removes HTML characters from a string.
    
    ##### Input
    
    ```text
    {{ "Eh, what's <i>up</i>, <b>Doc</b>?" | strip_html }}
    ```
    
    ##### Output
    
    ```text
    Eh, what's up, Doc?
    ```
    
*   ### strip\_newlines
    
    Removes line breaks (\\n) from a string.
    
    ##### Example
    
    ```text
    {{ product.description | strip_newlines }}
    ```
    
*   ### titlecase
    
    Converts a string to title case.
    
    ##### Syntax
    
    ```text
    {{ 'string' | titlecase }}
    ```
    
    ##### Input
    
    ```text
    {{ "rocket roller skates" | titlecase }}
    ```
    
    ##### Output
    
    ```text
    Rocket Roller Skates
    ```
    
*   ### truncate
    
    Shortens a string to the specified number of characters, adding an ellipsis if the string is longer than the value provided.
    
    ##### Input
    
    ```text
    {{ "I knew I shoulda taken that left turn at Albuquerque." | truncate: 20 }}
    ```
    
    ##### Output
    
    ```text
    I knew I shoulda ...
    ```
    
*   ### truncatewords
    
    Shortens a string to a specified number of words, rather than characters, and adds an ellipsis if the string contains more words than the value provided.
    
    ##### Input
    
    ```text
    {{ "I knew I shoulda taken that left turn at Albuquerque." | truncatewords: 8 }}
    ```
    
    ##### Output
    
    ```text
    I knew I shoulda taken that left turn...
    ```
    
*   ### upcase
    
    Converts a string to upper case.
    
    ##### Syntax
    
    ```text
    {{ 'string' | upcase }}
    ```
    
    ##### Input
    
    ```text
    {{ 'acme' | upcase }}
    ```
    
    ##### Output
    
    ```text
    ACME
    ```
    
*   ### url\_decode
    
    Decodes a string that has been encoded as a URL or has been modified by `url_encode`.
    
    ##### Input
    
    ```text
    {{ "%27Customer.io+is+great%27" | url_decode }}
    ```
    
    ##### Output
    
    ```text
    Customer.io is great
    ```
    
*   ### url\_encode
    
    Escapes/encodes URL-unsafe characters in a string.
    
    ##### Input
    
    ```text
    {{ "cool.person@example.com" | url_encode }}
    ```
    
    ##### Output
    
    ```text
    cool.person%40example.com
    ```
    
*   ## Miscellaneous
    
    These are tags that you can use to escape liquid rendering or escape rendering all together.
    
*   ### comment
    
    This tag doesn’t show its contents, providing a way for you to leave notes inside templates for other members of your organization.
    
    ##### Syntax
    
    ```text
    {% comment %} Don't display me! {% endcomment %}
    ```
    
*   ### generate\_uuid
    
    Generate a UUID.
    
    ##### Example
    
    ```text
    {% generate_uuid %}
    ```
    
*   ### raw
    
    Temporarily disables Liquid processing. You might use this to escape tag processing if you use a conflicting syntax or you want to show raw liquid syntax in your message."
    
    ##### Example
    
    ```text
    {% raw %}
      {{This}} is displayed exactly as typed.
    {% endraw %}
    ```
    
*   ### to\_json
    
    Outputs the json representation of the input. For example, `{{ customer | to_json }}` sends all your customer data into a JSON variable.
    
    ##### Example
    
    ```text
    {{ customer | to_json }}
    ```
    

Version latestlegacy

*    [Customer.io Keys](#customer.io-keys-latest)
    *   [cio\_link](#cio_link-latest)
    *   [cio\_link\_id](#cio_link_id-latest)
    *   [customer attributes](#customer-attributes-latest)
    *   [event properties](#event-properties-latest)
    *   [event\_id](#event_id-latest)
    *   [event\_name](#event_name-latest)
    *   [event\_timestamp](#event_timestamp-latest)
    *   [journey attributes](#journey-attributes-latest)
    *   [object & relationship attributes](#object-relationship-attributes-latest)
    *   [render\_liquid](#render_liquid-latest)
    *   [snippets](#snippets-latest)
    *   [trigger properties](#trigger-properties-latest)
    *   [view\_in\_browser\_url](#view_in_browser_url-latest)

*    [Customer.io Unsubscribe Keys](#customer.io-unsubscribe-keys-latest)
    *   [manage\_subscription\_preferences\_url](#manage_subscription_preferences_url-latest)
    *   [unsubscribe](#unsubscribe-latest)
    *   [unsubscribe\_url](#unsubscribe_url-latest)

*    [Customer.io Meta Keys](#customer.io-meta-keys-latest)
    *   [campaign.id](#campaign-id-latest)
    *   [campaign.name](#campaign-name-latest)
    *   [campaign.subscription\_topic\_ids](#campaign-subscription_topic_ids-latest)
    *   [campaign.type](#campaign-type-latest)
    *   [content](#content-latest)
    *   [delivery\_id](#delivery_id-latest)
    *   [editor](#editor-latest)
    *   [layout.id](#layout-id-latest)
    *   [layout.name](#layout-name-latest)
    *   [message.id](#message-id-latest)
    *   [message.journey\_id](#message-journey_id-latest)
    *   [message.name](#message-name-latest)
    *   [message.preheader](#message-preheader-latest)
    *   [message.send\_to\_unsubs](#message-send_to_unsubs-latest)
    *   [message.subject](#message-subject-latest)
    *   [message.subscription\_topic\_ids](#message-subscription_topic_ids-latest)
    *   [message.subscription\_topic.name](#message-subscription_topic-name-latest)
    *   [message.type](#message-type-latest)
    *   [subscription\_topic\_name](#subscription_topic_name-latest)

*    [Variable Tags](#variable-tags-latest)
    *   [assign](#assign-latest)
    *   [capture](#capture-latest)

*    [Iterative Tags](#iterative-tags-latest)
    *   [cycle](#cycle-latest)
    *   [for loop](#for-loop-latest)

*    [Conditional Tags](#conditional-tags-latest)
    *   [case](#case-latest)
    *   [if](#if-latest)
    *   [unless](#unless-latest)

*    [Logical Operators](#logical-operators-latest)
    *   [and](#and-latest)
    *   [does not equal (!=)](#does-not-equal-latest)
    *   [equals (==)](#equals-latest)
    *   [greater than and greater than or equal to (>, >=)](#greater-than-and-greater-than-or-equal-to-latest)
    *   [less than and less than or equal to (<, <=)](#less-than-and-less-than-or-equal-to-latest)
    *   [or](#or-latest)

*    [Timestamps and Dates](#timestamps-and-dates-latest)
    *   [add\_day](#add_day-latest)
    *   [add\_month](#add_month-latest)
    *   [add\_year](#add_year-latest)
    *   [countdown](#countdown-latest)
    *   [date](#date-latest)
    *   [date\_to\_long\_string](#date_to_long_string-latest)
    *   [date\_to\_rfc822](#date_to_rfc822-latest)
    *   [date\_to\_string](#date_to_string-latest)
    *   [date\_to\_xmlschema](#date_to_xmlschema-latest)
    *   [event\_timestamp](#event_timestamp-latest)
    *   [now](#now-latest)
    *   [subtract\_day](#subtract_day-latest)
    *   [subtract\_month](#subtract_month-latest)
    *   [subtract\_year](#subtract_year-latest)

*    [Array Filters](#array-filters-latest)
    *   [compact](#compact-latest)
    *   [concat](#concat-latest)
    *   [find](#find-latest)
    *   [find\_exp](#find_exp-latest)
    *   [first](#first-latest)
    *   [group\_by](#group_by-latest)
    *   [group\_by\_exp](#group_by_exp-latest)
    *   [join](#join-latest)
    *   [json\_array\_uniq](#json_array_uniq-latest)
    *   [last](#last-latest)
    *   [limit](#limit-latest)
    *   [map](#map-latest)
    *   [pop](#pop-latest)
    *   [push](#push-latest)
    *   [remove](#remove-latest)
    *   [reverse](#reverse-latest)
    *   [shift](#shift-latest)
    *   [size](#size-latest)
    *   [sort](#sort-latest)
    *   [sort\_natural](#sort_natural-latest)
    *   [sum](#sum-latest)
    *   [uniq](#uniq-latest)
    *   [unshift](#unshift-latest)
    *   [where](#where-latest)
    *   [where\_exp](#where_exp-latest)
    *   [where\_not](#where_not-latest)

*    [Number and Currency Filters](#number-and-currency-filters-latest)
    *   [A list of locales and currency codes](#a-list-of-locales-and-currency-codes-latest)
    *   [abs](#abs-latest)
    *   [ceil](#ceil-latest)
    *   [currency](#currency-latest)
    *   [floor](#floor-latest)
    *   [format\_number](#format_number-latest)
    *   [random](#random-latest)
    *   [round](#round-latest)
    *   [rounded\_currency](#rounded_currency-latest)

*    [Math Filters](#math-filters-latest)
    *   [at\_least](#at_least-latest)
    *   [at\_most](#at_most-latest)
    *   [divided\_by](#divided_by-latest)
    *   [minus](#minus-latest)
    *   [modulo](#modulo-latest)
    *   [plus](#plus-latest)
    *   [times](#times-latest)

*    [String Filters](#string-filters-latest)
    *   [append](#append-latest)
    *   [array\_to\_sentence\_string](#array_to_sentence_string-latest)
    *   [base64](#base64-latest)
    *   [base64\_decode](#base64_decode-latest)
    *   [base64\_encode](#base64_encode-latest)
    *   [base64\_url\_safe\_decode](#base64_url_safe_decode-latest)
    *   [base64\_url\_safe\_encode](#base64_url_safe_encode-latest)
    *   [capitalize](#capitalize-latest)
    *   [cgi\_escape](#cgi_escape-latest)
    *   [contains](#contains-latest)
    *   [downcase](#downcase-latest)
    *   [escape](#escape-latest)
    *   [escape\_once](#escape_once-latest)
    *   [hex\_base64](#hex_base64-latest)
    *   [hmac\_sha1](#hmac_sha1-latest)
    *   [hmac\_sha256](#hmac_sha256-latest)
    *   [lstrip](#lstrip-latest)
    *   [md5](#md5-latest)
    *   [newline\_to\_br](#newline_to_br-latest)
    *   [normalize\_whitespace](#normalize_whitespace-latest)
    *   [number\_of\_words](#number_of_words-latest)
    *   [pluralize](#pluralize-latest)
    *   [prepend](#prepend-latest)
    *   [remove\_first](#remove_first-latest)
    *   [remove\_last](#remove_last-latest)
    *   [remove](#remove-string-latest)
    *   [replace](#replace-latest)
    *   [replace\_first](#replace_first-latest)
    *   [replace\_last](#replace_last-latest)
    *   [rstrip](#rstrip-latest)
    *   [sha1](#sha1-latest)
    *   [sha256](#sha256-latest)
    *   [slice](#slice-latest)
    *   [slugify](#slugify-latest)
    *   [split](#split-latest)
    *   [strip](#strip-latest)
    *   [strip\_html](#strip_html-latest)
    *   [strip\_newlines](#strip_newlines-latest)
    *   [titlecase](#titlecase-latest)
    *   [truncate](#truncate-latest)
    *   [truncatewords](#truncatewords-latest)
    *   [upcase](#upcase-latest)
    *   [uri\_escape](#uri_escape-latest)
    *   [url\_decode](#url_decode-latest)
    *   [url\_encode](#url_encode-latest)
    *   [xml\_escape](#xml_escape-latest)

*    [Miscellaneous](#miscellaneous-latest)
    *   [comment](#comment-latest)
    *   [default](#default-latest)
    *   [from\_json](#from_json-latest)
    *   [generate\_uuid](#generate_uuid-latest)
    *   [json](#json-latest)
    *   [raw](#raw-latest)
    *   [to\_json](#to_json-latest)
    *   [whitespace control](#whitespace-control-latest)

*    [Customer.io Keys](#customer.io-keys-legacy)
    *   [cio\_link](#cio_link-legacy)
    *   [cio\_link\_id](#cio_link_id-legacy)
    *   [customer attributes](#customer-attributes-legacy)
    *   [event properties](#event-properties-legacy)
    *   [event\_id](#event_id-legacy)
    *   [event\_name](#event_name-legacy)
    *   [event\_timestamp](#event_timestamp-legacy)
    *   [journey attributes](#journey-attributes-legacy)
    *   [object & relationship attributes](#object-relationship-attributes-legacy)
    *   [snippets](#snippets-legacy)
    *   [trigger properties](#trigger-properties-legacy)
    *   [view\_in\_browser\_url](#view_in_browser_url-legacy)

*    [Customer.io Unsubscribe Keys](#customer.io-unsubscribe-keys-legacy)
    *   [manage\_subscription\_preferences\_url](#manage_subscription_preferences_url-legacy)
    *   [unsubscribe](#unsubscribe-legacy)
    *   [unsubscribe\_url](#unsubscribe_url-legacy)

*    [Customer.io Meta Keys](#customer.io-meta-keys-legacy)
    *   [campaign.id](#campaign-id-legacy)
    *   [campaign.name](#campaign-name-legacy)
    *   [campaign.subscription\_topic\_ids](#campaign-subscription_topic_ids-legacy)
    *   [campaign.type](#campaign-type-legacy)
    *   [content](#content-legacy)
    *   [delivery\_id](#delivery_id-legacy)
    *   [editor](#editor-legacy)
    *   [layout.id](#layout-id-legacy)
    *   [layout.name](#layout-name-legacy)
    *   [message.id](#message-id-legacy)
    *   [message.journey\_id](#message-journey_id-legacy)
    *   [message.name](#message-name-legacy)
    *   [message.preheader](#message-preheader-legacy)
    *   [message.send\_to\_unsubs](#message-send_to_unsubs-legacy)
    *   [message.subject](#message-subject-legacy)
    *   [message.subscription\_topic\_ids](#message-subscription_topic_ids-legacy)
    *   [message.type](#message-type-legacy)
    *   [subscription\_topic\_name](#subscription_topic_name-legacy)

*    [Variable Tags](#variable-tags-legacy)
    *   [assign](#assign-legacy)
    *   [capture](#capture-legacy)

*    [Iterative Tags](#iterative-tags-legacy)
    *   [cycle](#cycle-legacy)
    *   [for loop](#for-loop-legacy)

*    [Conditional Tags](#conditional-tags-legacy)
    *   [case](#case-legacy)
    *   [if](#if-legacy)
    *   [unless](#unless-legacy)

*    [Logical Operators](#logical-operators-legacy)
    *   [and](#and-legacy)
    *   [does not equal (!=)](#does-not-equal-legacy)
    *   [equals (==)](#equals-legacy)
    *   [greater than and greater than or equal to (>, >=)](#greater-than-and-greater-than-or-equal-to-legacy)
    *   [less than and less than or equal to (<, <=)](#less-than-and-less-than-or-equal-to-legacy)
    *   [or](#or-legacy)

*    [Timestamps and Dates](#timestamps-and-dates-legacy)
    *   [add\_day](#add_day-legacy)
    *   [add\_month](#add_month-legacy)
    *   [add\_year](#add_year-legacy)
    *   [countdown](#countdown-legacy)
    *   [date](#date-legacy)
    *   [event\_timestamp](#event_timestamp-legacy)
    *   [now](#now-legacy)
    *   [subtract\_day](#subtract_day-legacy)
    *   [subtract\_month](#subtract_month-legacy)
    *   [subtract\_year](#subtract_year-legacy)
    *   [timezone](#timezone-legacy)

*    [Array Filters](#array-filters-legacy)
    *   [compact](#compact-legacy)
    *   [concat](#concat-legacy)
    *   [first](#first-legacy)
    *   [join](#join-legacy)
    *   [last](#last-legacy)
    *   [limit](#limit-legacy)
    *   [map](#map-legacy)
    *   [remove](#remove-legacy)
    *   [size](#size-legacy)
    *   [sort](#sort-legacy)
    *   [sort\_natural](#sort_natural-legacy)
    *   [sum](#sum-legacy)
    *   [uniq](#uniq-legacy)
    *   [where](#where-legacy)
    *   [where\_not](#where_not-legacy)

*    [Number and Currency Filters](#number-and-currency-filters-legacy)
    *   [A list of locales](#a-list-of-locales-legacy)
    *   [abs](#abs-legacy)
    *   [ceil](#ceil-legacy)
    *   [currency](#currency-legacy)
    *   [floor](#floor-legacy)
    *   [format\_number](#format_number-legacy)
    *   [random](#random-legacy)
    *   [round](#round-legacy)
    *   [rounded\_currency](#rounded_currency-legacy)

*    [Math Filters](#math-filters-legacy)
    *   [at\_least](#at_least-legacy)
    *   [at\_most](#at_most-legacy)
    *   [divided\_by](#divided_by-legacy)
    *   [minus](#minus-legacy)
    *   [modulo](#modulo-legacy)
    *   [plus](#plus-legacy)
    *   [times](#times-legacy)

*    [String Filters](#string-filters-legacy)
    *   [append](#append-legacy)
    *   [base64](#base64-legacy)
    *   [base64\_decode](#base64_decode-legacy)
    *   [base64\_encode](#base64_encode-legacy)
    *   [base64\_url\_safe\_decode](#base64_url_safe_decode-legacy)
    *   [base64\_url\_safe\_encode](#base64_url_safe_encode-legacy)
    *   [capitalize](#capitalize-legacy)
    *   [contains](#contains-legacy)
    *   [downcase](#downcase-legacy)
    *   [escape](#escape-legacy)
    *   [escape\_once](#escape_once-legacy)
    *   [hex\_base64](#hex_base64-legacy)
    *   [hmac\_sha1](#hmac_sha1-legacy)
    *   [hmac\_sha256](#hmac_sha256-legacy)
    *   [htmlencode](#htmlencode-legacy)
    *   [lstrip](#lstrip-legacy)
    *   [md5](#md5-legacy)
    *   [newline\_to\_br](#newline_to_br-legacy)
    *   [pluralize](#pluralize-legacy)
    *   [prepend](#prepend-legacy)
    *   [remove\_first](#remove_first-legacy)
    *   [remove\_last](#remove_last-legacy)
    *   [remove](#remove-string-legacy)
    *   [replace](#replace-legacy)
    *   [replace\_first](#replace_first-legacy)
    *   [replace\_last](#replace_last-legacy)
    *   [rstrip](#rstrip-legacy)
    *   [sha1](#sha1-legacy)
    *   [sha256](#sha256-legacy)
    *   [slice](#slice-legacy)
    *   [split](#split-legacy)
    *   [strip](#strip-legacy)
    *   [strip\_html](#strip_html-legacy)
    *   [strip\_newlines](#strip_newlines-legacy)
    *   [titlecase](#titlecase-legacy)
    *   [truncate](#truncate-legacy)
    *   [truncatewords](#truncatewords-legacy)
    *   [upcase](#upcase-legacy)
    *   [url\_decode](#url_decode-legacy)
    *   [url\_encode](#url_encode-legacy)

*    [Miscellaneous](#miscellaneous-legacy)
    *   [comment](#comment-legacy)
    *   [generate\_uuid](#generate_uuid-legacy)
    *   [raw](#raw-legacy)
    *   [to\_json](#to_json-legacy)
