-
Outputs, which output HTML.
The syntax for outputs is a variable or value and optional list of filters surrounded by
{{and}}. For example,{{ user.name }}. -
Tags, which control template rendering and implement logic.
The syntax for tags is a tag name and optional arguments surrounded by
{%and%}. For example,{% if user_metadata.lang == 'it' %} Ciao! {% endif %}.
Tags
All phone templates support the following Liquid tags:
You can view descriptions and examples of Liquid tags on the LiquidJS tags page.
Filters
All phone templates support the following Liquid filters:
You can view descriptions and examples of Liquid filters on the LiquidJS filters page.
General variables
The following variables are available to the Text Message Template field in every phone template unless otherwise noted. URL-based properties, likelogo_url, are automatically URL-escaped to reduce security risks. Phone numbers are stored with their country prefix (+<country_code>) except for US phone numbers, which may omit the country prefix.
-
Tenant-related information defined in Tenant Settings:
tenant, which is the raw tenant namefriendly_namesupport_emailsupport_urllogo_urlhome_urlregion
-
locale, which is based on theui_localquery parameter on/authorizerequests -
code(unavailable onblocked_accounttemplates) -
connection, the database connection name -
The following
uservariables:user.nameuser.nicknameuser.given_nameuser.family_nameuser.pictureuser.login_countuser.user_metadata, user attributes that do not impact a user’s core functionality, including user preferencesuser.app_metadata, user attributes that can impact a user’s core functionality, such as how an application functions or what the user can access, including their support plan, security roles, and access control groupsuser.email_verifieduser.emailuser.phone_numberuser.phone_verifieduser.multifactoruser.source_ipuser.countryuser.city
-
The following
clientvariables:nameclientIDmetadata
-
The
applicationobject, with access to the standard client properties likeapplication.nameandapplication.client_metadata -
When a user logs in through an Organization, the following additional variables are available:
organization.idorganization.nameorganization.display_nameorganization.metadataorganization.branding.logo_urlorganization.branding.colors.primaryorganization.branding.colors.page_background
-
Multiple variables:
custom_domain.domain, the tenant’s domain namecustom_domain.domain_metadata, the custom domain’s metadata fields (key-value pairs)