Pasar al contenido principal

How do I use variables in snippets, messages and webhook actions? - Base de conocimiento / Using Deskpro - Deskpro Support

How do I use variables in snippets, messages and webhook actions?

Lista de autores

These variables are available for use in snippets, as well as when sending a reply or SMS message with an automated action or using a web hook action. The variables are automatically replaced with the relevant value for the particular ticket.


NOTE: the variables used in email templates and portal templates are different from these. If you can't find the template variable you need by looking through the existing templates, please contact us at


A typical simple use case is to start a message with

Dear Name

where 'Name' is the actual name of the user.

The format for a variable is:

{{ XXX }}


To start a message with the user's name:


Dear {{ ticket.person.display_name }} 


By using more variables and custom fields, you can build up a complicated personalised reply.



Ticket variables

{{ ticket.subject }}{{ ticket.department.title }}{{ ticket.product.title }}{{ ticket.category.title }}{{ ticket.workflow.title }}{{ ticket.priority.title }}{{ }} {{ ticket.fieldN }} (for custom fields; replace N with the field ID) {{ ticket.ref }} {{ ticket.date_created }} (time and date ticket was created e.g. 2014-03-14 11:38:17)



User variables

 {{ ticket.person.display_name }} (user's name) {{ }} (user's email) {{ }} (user's organization) {{ ticket.person.organization_position }} (user's position in organization) {{ ticket.person.fieldN }} (for custom fields; replace N with the field ID)


Agent variables

{{ ticket.agent.display_name }}{{ }}{{ }}


De ayuda Poco útil

74 de 127 personas considera que esta página es útil

Comentarios (4)

John DiNapoli
Does this represent all of the default objects available?
Ben Henley
This is most of the common variables. Please contact us if the variable you want is not here.
Harry Sheffield
Is it possible to create custom variables? I would like a variable that just pulls in the user's first name
Lauren Cumming
Hey Harry- you cannot create a custom variable to pull in the users first name sorry as DeskPRO uses a fullname format for users names at the moment.

Nuevo comentario

Por favor, inicia sesión o regístrate para enviar un comentario.

¿Necesitas que te recordemos la contraseña?