Useful template variables

Editing Templates

You may recognize that many variables used in templates are the same ones you use for snippets in the agent interface.

Note that you can only include these variables directly in a template, not in a custom phrase. See the section Variables in custom phrases for details.

Logged-in user information

The variables in this section will only work in contexts where the user is logged: portal or widget, but not email.

{{ app.user.name }}

User’s name.

{{ app.user.email_address}}

User’s email address.

{{ app.user.organization.name }}

Name of user’s organization.

{{ app.language.id }}

ID number of user’s language.

Language

{{ lang.id }}

Language ID number.

{{ lang.flag_image }}

Language flag image.

{{ lang.title }}

Language name.

Search Results

{{ res.type }}

Result type.

{{ res.object.id }}

Result ID.

Agent

{{ agent.display_name_user }}

Agent override name displayed to users (as set in Preferences).

{{ entity.agent.primary_phone.number }}

Agent phone number.

Tickets

{{ ticket.subject }}

Ticket subject.

{{ ticket.department.title }}

Ticket department.

{{ ticket.department.full_title }}

Ticket department full title.

{{ ticket.product.title }}

Current product of ticket.

{{ ticket.category.title }}

Current category of ticket.

{{ ticket.workflow.title }}

Current workflow stage of ticket.

{{ ticket.priority.title }}

Current priority of ticket.

{{ ticket.id }}

Ticket ID number.

{{ ticket.ref }}

Ticket ref code.

{{ ticket.date_created|date('full') }}

Time and date ticket was created e.g. “2014-03-14 11:38:17”.

{{ ticket.date_last_agent_reply|date }}

Time and date of the last agent reply.

{{ ticket.agent.display_name }}

Name of currently assigned agent (or override name if set).

{{ ticket.email_account.address }}

Address of the email account/relay the ticket currently sends mail from (ie. support@example.com)

{{ ticket.person.display_name }}

User’s full name.

{{ ticket.person.first_name }}

User's first name only.

{{ ticket.person.last_name }}

User's last name only.

<dp:ticket-messages />

List of ticket messages - doesn’t need {{ }} around it.

Custom fields

{{ ticket.renderCustomFieldN | raw }}
OR
{{ ticket.renderCustomField (N, 'text') }}

Display a custom ticket field; replace N with field ID (use the gear icon at top right of fields list to display IDs).

{{ ticket.person.renderCustomFieldN | raw }}
OR
{{ ticket.person.renderCustomField (N, 'text') }}

Display a custom user field; replace N with field ID.

{{ ticket.person.organization.renderCustomFieldN | raw }}
OR
{{ ticket.person.organization.renderCustomField (N, 'text') }}

Display a custom organization field, replace N with field ID.

Ticket user information

{{ ticket.person.display_name }}

Name of user associated with ticket.

{{ ticket.person.primary_email.email }}

Ticket user’s email.

{{ ticket.person.organization.name }}

Ticket user’s organization.

{{ ticket.person.organization_position }}

Ticket user’s position in organization.

Ticket agent information

{{ ticket.agent.display_name }}

Name of assigned agent.

action_performer.display_name

Name of agent who performed the action, such as adding a response.

{{ ticket.agent.primary_email.email }}

Agent’s primary email.

{{ ticket.agent_team.name }}

Assigned team.

Ticket form

{{ f.title }}

Title.

{{ f.field_def.description }}

Field description.

Article

{{ article.person.display_name_user }}

Article author.

{{ article.title }}

Article title.

Message

{{ message.person.display_name_user }}

Message author.

News

{{ news.person.display_name_user }}

News post author.

{{ news.category.title }}

News post category.

{{ news.content }}

News post article.

{{ news.link }}

News link.

Download

{{ download.title }}

Title of download file.

{{ download.content_desc }}

Description of file.

{{ download.filename }}

Filename of file.

{{ download.readable_filesize }}

Filesize of file.

{{ download.person.display_name_user }}

Author of download.

{{ download.date_created|date('full') }}

Date created.

Ticket Feedback

{{ feedback.status }}

Feedback item’s status.

{{ feedback.person.display_name_user }}

Feedback creator.

{{ feedback.message }}

Feedback message.

{{ feedback.rating }}

Feedback rating.

Category

{{ category.title }}

Category name.

{{ subcat.title }}

Subcategory name.

Participant

“Participant” means a CC’d user.

{{ part.person.id }}

Participant ID.

{{ part.person.email_address }}

Participant email address.

Published: 23/03/2017

Last updated: 27/02/2019