{{ x }}
and {{x}}
are equivalent.
This standardized format ensures consistency across all platform components and makes variables easily identifiable in your content.
{{ vars.session.id }}
- Unique identifier for the current session{{ vars.session.agent.name }}
- Name of the current agent{{ vars.session.datetime }}
- Current timestamp, e.g. 2025-01-02 12:00
{{ vars.session.date }}
- Current date, e.g. 2025-01-02
{{ vars.session.language }}
- The current language code for the session, e.g. en-US
{{ vars.custom_field }}
- User-defined variables stored in the vars namespacevars.
for clarity{{ vars.customer_name }}
{{ order_number }}
{{ Customer Name }}
(spaces){{ vars.customer-name }}
(hyphens){{ CUSTOMER_ID }}
(all caps)Welcome, {{ unknown_var }}!
becomes Welcome, !
){{ }}
Legacy Format | New Format |
---|---|
{variable} | {{ variable }} |
${variable} | {{ variable }} |
{{ variable }}
syntax works exactly the same as the ${variable}
syntax: if we the variable doesn’t exist, it defaults to an empty string. The {variable}
syntax has slightly different behavior: if the variable doesn’t exist, the {variable}
placeholder remains in the text as-is.