Template variables in canned responses

Updated Nov 28, 20262 min read
English
On this page

Canned responses can contain placeholders that Deskwoot fills in the moment an agent inserts the response into the reply box. Every variable below works in every canned response, on every channel.

All variables

The Change template window: the text with {{contact.first_name | there}}, the Add a placeholder buttons and the How it arrives preview
Each button under Add a placeholder puts its variable into the text. How it arrives shows the reply for a customer with a name and without one.

Write a variable as {{ variable }}. Spaces inside the braces are ignored.

VariableFilled withExample
{{agent.name}}
Full name of the agent inserting the response
Maria Lopez
{{agent.first_name}}
The agent's first name
Maria
{{agent.last_name}}
The agent's last name
Lopez
{{agent.email}}
The agent's email address
maria@yourcompany.com
{{contact.name}}
Full name of the customer
Jonas Weber
{{contact.first_name}}
The customer's first name
Jonas
{{contact.last_name}}
The customer's last name
Weber
{{contact.email}}
The customer's email address
jonas@example.org
{{contact.phone}}
The customer's phone number
+49 170 1234567
{{contact.company}}
The customer's company
Weber GmbH
{{conversation.id}}
The conversation number shown in the inbox
4821
{{inbox.name}}
Name of the inbox the conversation belongs to
Website Live Chat
{{account.name}}
Name of your workspace
Your Company

Fallback text for empty values

Not every contact has a name or a company. Add a fallback after a pipe and it is used whenever the value is empty: Hi {{contact.first_name | there}} becomes "Hi Jonas" for a known customer and "Hi there" for an anonymous visitor.

A fallback may contain any text except | and }.

What happens when a value is empty

  • With a fallback, the fallback text is inserted.
  • Without a fallback, the placeholder is removed and nothing is inserted.
  • The automatic name "Visitor" that live chat gives anonymous contacts counts as empty, so {{contact.first_name | there}} never greets someone as "Visitor".
  • A variable Deskwoot does not know stays in the text exactly as written, so a typo is visible before you send.

Frequently asked questions

Can I use variables in macros or automation rules?

No. Variables are filled in when a canned response is inserted into the reply box. Macros and automation rules send their text as written.

Which variables should always have a fallback?

The contact fields (name, first name, last name, company) and the agent fields, because they can be empty or unknown. Deskwoot highlights these when you save a canned response without a fallback.

Who do the agent variables refer to?

Always the person who inserts the response, not the conversation's assignee.

Can I still change the text before sending?

Yes. Values are filled in when you insert the response, and the text stays editable until you send it.

What does {{contact.name}} show without a full name?

The first and last name combined.

Was this guide helpful?

Keep reading

Still need help?

Fynn answers from these guides in the chat, and you can reach the team there too.