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

# Supported Liquid Syntax for Phone Templates

> Learn about the Liquid tags, filters, and common variables supported in phone templates.

For an overview of Liquid syntax, read the [LiquidJS introduction](https://liquidjs.com/tutorials/intro-to-liquid.html). It has a brief summary of Liquid's two kinds of markup:

* **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 %}`.

This page lists the tags, filters, and variables supported in phone templates.

## Tags

All phone templates support the following Liquid tags:

| Category     | Tags                                    |
| ------------ | --------------------------------------- |
| Iteration    | `for`, `cycle`, `tablerow`              |
| Control flow | `if`, `unless`, `elsif`, `else`, `case` |
| Variable     | `assign`, `increment`, `decrement`      |
| File         | `include`, `layout`                     |
| Language     | `raw`, `comment`                        |

You can view descriptions and examples of Liquid tags on the [LiquidJS tags page](https://liquidjs.com/tags/overview.html).

## Filters

All phone templates support the following Liquid filters:

| Category | Filters                                                                                                                                                                                            |
| -------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Math     | `plus`, `minus`, `modulo`, `times`, `floor`, `ceil`, `round`, `divided_by`, `abs`, `at_least`, `at_most`                                                                                           |
| String   | `append`, `prepend`, `capitalize`, `upcase`, `downcase`, `strip`, `lstrip`, `rstrip`, `strip_newlines`, `split`, `replace`, `replace_first`, `remove`, `remove_first`, `truncate`, `truncatewords` |
| HTML/URI | `escape`, `escape_once`, `url_encode`, `url_decode`, `strip_html`, `newline_to_br`                                                                                                                 |
| Array    | `slice`, `map`, `sort`, `sort_natural`, `first`, `last`, `join`, `reverse`, `size`                                                                                                                 |
| Date     | `date`                                                                                                                                                                                             |
| Misc     | `default`                                                                                                                                                                                          |

You can view descriptions and examples of Liquid filters on the [LiquidJS filters page](https://liquidjs.com/filters/overview.html).

## General variables

The following variables are available to the **Text Message Template** field in every phone template unless otherwise noted.

URL-based properties, like `logo_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](https://manage.auth0.com/#/tenant):
  * `tenant`, which is the raw tenant name
  * `friendly_name`
  * `support_email`
  * `support_url`
  * `logo_url`
  * `home_url`
  * `region`

* `locale`, which is based on the `ui_local` query parameter on `/authorize` requests

* `code` (unavailable on `blocked_account` templates)

* `connection`, the database connection name

* The following `user` variables:
  * `user.name`
  * `user.nickname`
  * `user.given_name`
  * `user.family_name`
  * `user.picture`
  * `user.login_count`
  * `user.user_metadata`, user attributes that do not impact a user's core functionality, including user preferences
  * `user.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 groups
  * `user.email_verified`
  * `user.email`
  * `user.phone_number`
  * `user.phone_verified`
  * `user.multifactor`
  * `user.source_ip`
  * `user.country`
  * `user.city`

* The following `client` variables:
  * `name`
  * `clientID`
  * `metadata`

* The `application` object, with access to the standard client properties like `application.name` and `application.client_metadata`

* When a user logs in through an [Organization](/docs/manage-users/organizations/organizations-overview), the following additional variables are available:
  * `organization.id`
  * `organization.name`
  * `organization.display_name`
  * `organization.metadata`
  * `organization.branding.logo_url`
  * `organization.branding.colors.primary`
  * `organization.branding.colors.page_background`

* Multiple <Tooltip tip="Custom Domain: Third-party domain with a specialized, or vanity, name." cta="View Glossary" href="/docs/glossary?term=custom+domains">custom domains</Tooltip> variables:
  * `custom_domain.domain`, the tenant's domain name
  * `custom_domain.domain_metadata`, the custom domain's metadata fields (key-value pairs)
