Email templates decide what the emails from your platform look like. The outgoing template frames every email reply to customers, and the notification templates hold the texts of the emails agents receive. You edit both under Admin > Notifications > Templates, and both accept expressions such as {{ .Recipient.FirstName }} that the platform replaces with real values at sending time.
Where templates live
Admin > Notifications > Templates has two tabs: Outgoing email templates and Email notification templates. Editing them needs the Manage templates permission. New template works on the outgoing tab only; the notification templates are built in, so you can change them but not delete them.
The outgoing template
The outgoing template frames:
- replies to customers in email inboxes, whoever writes them: an agent, the AI assistant or a rule;
- the emails agents receive about their work (see below).
Replies in the chat widget, Telegram and WhatsApp are not framed. Invitations to new agents and password reset emails also have a fixed layout of their own, written in the platform language.
You can keep several outgoing templates, but only the one marked Is default is used, and only one can have that mark. An outgoing template has no subject field. The template must contain {{ template "content" . }} exactly once: that is where the message goes.
What a new platform uses
A new platform has no outgoing template. Email replies go out exactly as the agent wrote them, and the emails to agents get a simple frame: your site name on top and a line at the bottom saying the email comes automatically from your support panel.
When you add a default outgoing template, it frames both kinds of email. Write it so that it reads well for customers and for your own agents, for example with a greeting to {{ .Recipient.FirstName }}, which is the right person in both cases. Avoid the Contact variables there: SLA emails to agents have no contact, and the email would show <no value> in their place.
Variables
| Variable | Value |
|---|---|
{{ .Conversation.ReferenceNumber }} |
Reference number of the conversation |
{{ .Conversation.Subject }} |
Subject of the conversation |
{{ .Conversation.Priority }} |
Priority of the conversation |
{{ .Conversation.UUID }} |
Internal identifier of the conversation, used in links |
{{ .Contact.FirstName }}, {{ .Contact.LastName }}, {{ .Contact.FullName }}, {{ .Contact.Email }} |
The customer |
{{ .Recipient.FirstName }}, {{ .Recipient.LastName }}, {{ .Recipient.FullName }}, {{ .Recipient.Email }} |
The person who receives this email |
{{ .Author.FirstName }}, {{ .Author.LastName }}, {{ .Author.FullName }}, {{ .Author.Email }} |
The person who wrote the message |
{{ .IsAIComposed }} |
true when the AI assistant wrote the reply |
{{ .IsContinuityEmail }} |
true when the email carries chat messages to a visitor who left the chat |
In a reply to a customer, Recipient and Contact are the same person. In the emails to agents, Recipient is the agent. When the platform sends something by itself, for example a rule's reply, the Author fields are empty, so such an email carries no author name.
Functions
| Function | Value |
|---|---|
{{ RootURL }} |
The address of your support panel |
{{ SiteName }} |
Site name from Admin > Workspace > General |
{{ LogoURL }} |
Address of your uploaded logo |
{{ FaviconURL }} |
Address of your uploaded favicon |
{{ Date "2006-01-02" }} |
The current date and time in a Go time layout; {{ Date "" }} gives a format like Mon Jan 2 15:04:05 2006 |
{{ L.T "key" }}, {{ L.Ts "key" "name" value }} |
A text from the platform dictionary, in the platform language |
The seven built-in templates for agents use L.T and L.Ts for their wording. Keep those parts if the emails should follow the platform language.
Expressions in replies, notes and macros
The same expressions work in what agents type: replies, private notes, macro responses and replies sent by rules. They are replaced when the message is saved, so the agent already sees the final text in the conversation. This works in every channel, not only email.
Writing HTML
Templates are HTML. Wrap paragraphs in <p> and break lines with <br />: text without tags arrives as one long line. Emails to agents also get a plain text version added automatically.
Example of an outgoing template
<p>Hello {{ .Recipient.FirstName }},</p>
{{ template "content" . }}
<p>Kind regards,<br />
{{ if .Author.FullName }}{{ .Author.FullName }}, {{ end }}{{ SiteName }}</p>
<p style="color: #71717a;">Ticket #{{ .Conversation.ReferenceNumber }}</p>
{{ if .IsAIComposed }}<p>This answer was written by our AI assistant.</p>{{ end }}
How the template wraps a message
What the agent types replaces {{ template "content" . }}; everything around it comes from the template. With the example above, an agent writes only the body:
Your order left our warehouse today and should reach you within two days.
and the customer receives:
Hello Anna,
Your order left our warehouse today and should reach you within two days.
Kind regards,
Mark Lee, Acme Support
Ticket #1042
If the agent also types «Hi Anna» and «Best, Mark», the customer gets two greetings and two signatures. Agents should know which parts the template already adds.
Other template shapes
If the template has no greeting, agents greet the customer themselves. If it is nothing but {{ template "content" . }}, agents write the whole email, greeting and signature included. Check the default template before you tell your team how to write.
AI disclosure and continuity emails
Use {{ .IsAIComposed }} to mark answers written by the AI assistant, and {{ .IsContinuityEmail }} to leave out parts that make no sense when unread chat messages are emailed to a visitor who left the chat:
{{ if .IsContinuityEmail }}
<p>Here are the replies you missed in the chat:</p>
{{ else }}
<p>Hello {{ .Recipient.FirstName }},</p>
{{ end }}
Notification templates
The Email notification templates tab holds the texts of these emails. Each has a body and, except CSAT request, a subject; both accept expressions.
| Template | Sent to | Extra variables |
|---|---|---|
| Conversation assigned | The agent who got the conversation | none |
| Mentioned in conversation | The mentioned agent | {{ .MentionedBy.FirstName }}, {{ .MentionedBy.LastName }}, {{ .MentionedBy.FullName }}, {{ .MentionedBy.Email }}, {{ .Message.Content }} (text of the note), {{ .Message.UUID }} |
| New reply from contact | The assigned agent | {{ .Message.Content }}, {{ .Message.UUID }} |
| New reply on participating conversation | Other agents who wrote in the conversation | {{ .Message.Content }}, {{ .Message.UUID }} |
| Conversation reopened | The assigned agent | {{ .Message.Content }}, {{ .Message.UUID }} |
| SLA breach warning | The alert recipients of the SLA policy | {{ .SLA.Metric }}, {{ .SLA.DueIn }} (time left) |
| SLA breached | The alert recipients of the SLA policy | {{ .SLA.Metric }}, {{ .SLA.OverdueBy }} (time past the deadline) |
| CSAT request | The customer | {{ .CSATLink }}, {{ .CSATUUID }} |
In the seven templates for agents, Recipient is the agent and the Conversation variables are available. The Contact variables are there too, except in the two SLA templates, where {{ .Conversation.Priority }} is also empty. Author is empty, except in the three reply templates, where it is the customer who wrote. Use only the variables a template offers. One it does not have shows up as <no value> in the email, and when it is passed to a function such as L.Ts, the email is not sent at all. When each email is sent is explained in Notifications and the EPAV mailbox.
How notification emails are wrapped
The default outgoing template frames the notification emails too. Without one, they get the platform's own frame with your site name and the footer line. Emails from the rule action Notify agents are framed the same way.
The CSAT request
The CSAT request goes to the customer as an ordinary reply in the conversation, so the outgoing template frames it and it has every variable of a reply. {{ .Author.* }} is whoever resolved the conversation: an agent, or the AI assistant (then {{ .IsAIComposed }} is true); it is empty when a rule resolved the conversation or sent the survey.
Its built-in text is in English («Your conversation #... has been resolved», a question and five rating links from Poor to Excellent) and does not follow the platform language. If your customers write in another language, rewrite it in theirs.
{{ .CSATLink }} is the address of the rating page. Add ?rating=1 up to ?rating=5 to open the page with that rating already chosen: one click in the email, and the customer only has to send it, with a comment if they like. Surveys in other channels are described in Macros, tags, SLA and business hours.
Texts in the platform language
The seven built-in templates for agents take their wording from the platform dictionary, so the emails follow the language set in Admin > Workspace > General and carry your site name instead of any other brand. A template you have edited keeps your text when the platform is updated. In SLA emails, {{ .SLA.Metric }} (First response, Resolution or Next response) and the times in {{ .SLA.DueIn }} and {{ .SLA.OverdueBy }} are always in English.
Reset to default
A built-in template you have changed can be brought back: open it and press Reset to default next to Save. The editor gets the original body back; for the seven templates for agents that is our text from the platform dictionary, so the email follows the site language again. The subject stays as it is, and nothing changes until you press Save.