Template Variables

List of Variables

Included below are a list of common variables you may want to use. When these are included in a Smart Link URL, they will be populated with dynamic data specific to the ticket that your agent is viewing.

If you want to reference fields not listed here, let us know via this form and we're happy to help!

Field
Template String
Description

Ticket ID

{{ticket.id}}

ID of the active ticket

Current User ID

{{currentUser.id}}

ID of the current user (agent)

Current User Email

{{currentUser.email}}

Email address of the current user (agent)

Requester ID

{{ticket.requester.id}}

ID of the ticket requester (end-user)

Requester External ID

{{ticket.requester.externalId}}

Externally-mapped ID of the ticket requester (end-user)

Requester Email

{{ticket.requester.email}}

Email address of the requester

Requester Phone Number

{{ticket.requester.$phone}}

The ticket requester's phone number contact in E.164 international format (docs), eg. +15551234567

Requester Phone Number (US-format)

{{ticket.requester.$phone-us}}

The ticket requester's phone number contact parsed for US format (removing country code), eg. 5551234567

Requester X / Twitter Handle

{{ticket.requester.$twitter}}

The ticket requester's X / Twitter contact handle

Requester Google Handle

{{ticket.requester.$google}}

The ticket requester's Google contact handle

Requester Facebook Handle

{{ticket.requester.$facebook}}

The ticket requester's Facebook contact handle

Custom Field

{{ticket.customField:custom_field_<field_id>}}

Value of a custom field — replace <field_id> with the ID of the custom field, example: {{ticket.customField:custom_field_12345678}} See Referencing Custom Fields for more details

Assignee ID

{{ticket.assignee.user.id}}

ID of the agent assigned to the active ticket

Assignee Email

{{ticket.assignee.user.email}}

Email address of the agent assigned to the active ticket

Brand ID

{{ticket.brand.id}}

ID of the brand associated with the ticket

Group ID

{{ticket.assignee.group.id}}

ID of the group assigned to the ticket

Form ID

{{ticket.form.id}}

ID of the ticket form used

Smart Links is built with a dynamic engine to allow you to access nearly any data accessible via the Zendesk agent workspace's Ticket Sidebar location via this "dot-notation" pattern. The above variables probably cover most use cases, but they are not all you can reference! See the Zendesk API Reference for help creating your own, or reach out via our Data Request form.

Why do some variables have a $ in them, eg. {{ticket.requester.$phone}}?

These simply denote custom data fields that we provide via Smart Links that are not natively accessible through the Zendesk dot-notation method. Use these in the exact same way as other template variables, they are here to give you easy access to useful data!

Referencing Custom Fields

To reference the value of a custom field in a Smart Link, we will enter our template string in this syntax: {{ticket.customField:custom_field_<field_id>}}

To determine the field_id to use, you'll need to navigate to the Zendesk Admin Center > Objects and rules > Tickets > Fields

Here you can view and create new fields. To reference them via a Smart Link, copy the value of the Field ID column, and we'll use that in our smart link like so: {{ticket.customField:custom_field_35588134477723}}

Finding the Field ID of a custom field via the Zendesk Admin Console

Last updated