Sirportly

Toggle Menu

Ticket Variables

In various parts of your configuration you can use "variables" to insert information about a ticket. Any location where these are supported is clearly marked in the form.

Standard Ticket Variables

{{subject}} Ticket Subject
{{reference}} Ticket Reference
{{updates_count}} Number of updates posted to the ticket
{{link.staff}} A link to the ticket in the staff interface
{{link.public.xxx}} A link to the public interface where 'xxx' is the first part of the public interface's internal domain
{{link.support.xxx}} A link to the support centre where 'xxx' is the first part of the support centre's internal domain
{{status}} The name of the status
{{priority}} The name of the priority
{{team}} The name of the assigned team

Department & Brand Variables

The following variables allow you to access information about the brand & department the ticket is associated with.

{{department}} The name of the department
{{brand}} The name of the brand
{{brand.url}} The URL of the brand
{{brand.phone}} The phone number of the brand

Contact Variables

The following variables provide information about the assigned customer & contact method.

{{contact.name}} The full name of the customer
{{contact.first_name}} The (assumed) first name of the contact. This is everything before the first space in the contact's name
{{contact.last_name}} The (assumed) last name of the contact. This is everything after the last space in the contact's name
{{contact.contact_method}} The contact method associated with the ticket (for example, if submitted by e-mail this will be an e-mail address)
{{contact.email_address}} The e-mail address associated with the contact, regardless of how they submitted the ticket (if we have it)
{{contact.company}} The name of the contact's company
{{contact.pin}} The pin which allows contact's to login to support centres

Assigned User variables

The following variables are available if the ticket has an assigned user. If there is no assigned user they will be blank.

{{assigned_user.first_name}} The first name of the assigned user
{{assigned_user.last_name}} The last name of the assigned user
{{assigned_user.name}} The full name of the assigned user
{{assigned_user.email}} The email address of the assigned user
{{assigned_user.job_title}} The job title of the assigned user

SLA Variables

The following variables will be available if the ticket has an SLA. If there is no SLA, they will be blank.

{{sla}} The name of the SLA
{{sla.reply_time}} The reply time for the SLA (minutes)
{{sla.resolution_time}} The resolution time for the SLA (minutes)

Dates

The following fields can be used to insert timestamps. The resulting date is formatted as 'Monday 3 May 2012 at 14:30'. If there is no date, this will be blank,

{{created_at}} The date the ticket was submitted
{{last_update_posted_at}} The date the last update was posted to the ticket
{{reply_due_at}} The date a reply is due for the ticket
{{resolution_due_at}} The date a resolution is due for the ticket

Current User Variables

The following variables are available if there is a user which can be attributed to invoking the message. If not, these will be blank.

{{user.id}} The id of the user performing the action (if appropriate)
{{user.first_name}} The first name of the user performing the action (if appropriate)
{{user.last_name}} The last name of the user performing the action (if appropriate)
{{user.name}} The full name of the user performing the action (if appropriate)
{{user.email}} The e-mail address of the user performing the action (if appropriate)
{{user.job_title}} The job title of the user performing the action (if appropriate)

Incoming E-Mail Routing

If your ticket has been submitted by e-mail, the following variables are available to help you determine the address which the message was sent to.

{{incoming_address}} The e-mail address the user submitted the ticket to
{{incoming_email_tag}} The name & email address the user submitted the ticket to. For example "Support <support@domain.com>"

Ticket Updates

The variable system has a powerful method for inserting the content of ticket updates, as described below. The variable is made up three parts:

  • the scope you wish to find the update from (public, private, staff, customer or all)
  • which update you wish to insert (an integer to determine how many updates from the latest to get)
  • which data about the update you wish to insert (plain_body, html_body, body, from_name, from_address, timestamp)

You can review these examples below:

{{update.customer~0.plain_body}} Inserts the plain text body of the most recent customer message
{{update.private~0.from_name}} Inserts the name of the user who posted the latest private note
{{update.all~2.plain_body}} Inserts the plain text body of the message which is 3rd most recent

In addition to these options, you also have the following options available:

{{initial_update.plain_body}} The plain text body of the first update
{{initial_update.html_body}} The HTML body of the first update
{{initial_update.body}} The plain text body of the first update or the stripped HTML body if the plain body is missing

Custom Fields

If you wish to access custom fields, you can call {{custom.field_name}} where 'field_name' is the system name of the field you wish to access. If the field name is incorrect or missing, the return value will be blank.

Utilising IF statements

The variable system implements a basic conditional system which you can use. To begin an if block just enter {$if variablename$} and to end one just use {$end$}. These can split over multiple lines if necessary. See below for an example

The {{brand}} {{department}} Team
{$if {{current_user.name}}$}Your support agent today was {{current_user.name}}{$end$}

Terms & conditions would be here in a non-demonstration environment...