Skip to main content

Ticket ref codes

Ticket Fields

By default, a ticket’s ID number is displayed to users on the portal. InkedInterface_LI.jpg

However, ticket ID numbers are assigned in order: 1, 2, 3... That means they reveal the total number of tickets you have had to your helpdesk, and let repeat users work out how many tickets you deal with.

In addition, once you have a lot of tickets in your helpdesk, you will end up with long ID numbers that aren’t very readable or meaningful.

You can choose to use ref codes instead of the ticket ID. A ref code is a string of numbers and letters that uniquely identifies a ticket, but isn’t assigned in sequence.

You can customize the ref code format. You can choose to a code format that indicates the date and time the ticket was created or includes your company’s name; ticket reference 2014-12-05-ACME-AB3-792 is more meaningful than ticket ID 74983.

To enable ref codes, go to Tickets > Settings and then the Ticket Ref Codes section, and check Use ref codes.


By default, ref codes are in the format ABCD-1234-EFGH.

If you check Use a custom ref code, you can enter the format you want as a string of tokens, surrounded by angle brackets. For example, <YEAR>-<MONTH>-<A><A><A><><> would give you codes such as 2014-05-QZD45.

Anything you enter that isn’t in angle brackets will be the same in every code.

Here are the available tokens:

Token Result
<A> A random letter
<> A random number
<?> A random letter or number
<YEAR> Year as a four-digit number (e.g. 2013)
<MONTH> Month as a two-digit number (01-12)
<DAY> Day as a two-digit number (01-31)
<HOUR> Hour in 24-hour time (00-24)
<MIN> Minute as a two-digit number (00-59)
<SEC> Second as a two-digit number (00-59)

You can also choose to have up to 8 digits added onto the end of the code. These are added sequentially.


Ticket ref codes are also kept unique like ticket IDs, the system would not allow two tickets to have the same reference. If you build a reference structure, and your helpdesk exhausted all potential codes, the system would automatically append random numbers to the end of the ref code.


Here are some examples:

Format Example codes
<YEAR>-<MONTH>-<DAY>- and append 3 digits 2014-10-02-001, 2014-10-02-002 (counting upwards)
<?><?><?><?><?><?> 1A45QR, 6BB73S
<YEAR>-<A><A><?><?><?> 2013-AB34Q, 2013-HXR81
ACME-<A><A><><><><><> ACME-AB2952, ACME-FV4541

Adding ref code or ID to ticket emails

By default, Deskpro doesn’t include the ticket ID or ref code in emails to the user.

You can add the ID or ref code to the email templates used when the helpdesk emails a user about a ticket.

  1. In Tickets > Email Templates, in the User Email Templates section, click Ticket Emails.

  2. You will see a list of templates. You can edit each of these to include the ref code or ID.

    Your helpdesk won’t necessarily use all of these. For example, there’s no need to edit New Ticket Auto-Response if you haven’t enabled the auto- response trigger.

    The main templates you are likely to want to edit are:

    New Agent Reply (the template used to send agent replies to tickets) New Ticket by Agent (if your agents ever create tickets for users).

    Click the template to edit it and insert:

    {{ticket.ref}} - to include the ref code {{}} - to include the ticket ID


  3. Click Save.

Note that if you use more than one language, you should insert the variable as part of a custom phrase instead. See the section on Variables in custom phrases for details.

Authors list

First published: 23/03/2017

Last updated: Jul 5, 2018 by Colin Dunn