Email templates

Editing Templates

You can access the email templates from Admin > Emails > Email Templates.

../_images/templates-email-list.png

You can also edit a template from any trigger or other automated action that uses it:

../_images/trigger-edit-template.png

The Layout templates affect the look of all emails by changing the HTML header/footer and CSS styling.

You can edit the built-in templates for the emails Deskpro sends automatically.

If you’re using a custom trigger to send an email for a particular situation, you may find that none of the default email templates are suitable. In that case, you can create a new Custom Email Template. Look at similar default templates to find variables and existing Variables in custom phrases you can use.

If you need to add a new phrase that will appear in several emails, it’s better to store it as a Variables in custom phrases, rather than entering it directly into the template. Even if you only use one language in your helpdesk, using phrases can make it easier to maintain your templates.

For example, suppose your company slogan is “Simply the Best!” and you are going to include it in a lot of your outgoing emails. You should store it as a phrase or add it to the email header/footer. Then, when the slogan changes, you can change it in one place instead of having to update all your templates.

Templates example: custom email auto-response by department

Suppose your helpdesk is configured to send the default automatic email response when a user submits a new ticket.

The marketing department comes to you with another great idea: users who submit new tickets to the sales department should get a custom acknowledgement email, with a 10% discount code, to reward their interest in your company.

How can you implement this?

  1. Got to Tickets > Email Templates, then click Custom Email Templates.

  2. Click Create a New Email Template.

  3. In the window that opens, enter a descriptive file name for the new template, e.g. marketing-auto-response.html. Save the new blank template.

  4. You can use the template for the regular auto-response email as the basis for the new template. Under User Email Templates, click Ticket Emails, then New Ticket Auto-Response. Copy the code for the subject and body into a text editor.

    Email Subject: {{ phrase('user.email_subjects.tickets_re') }}

    Email Body:

{{ phrase('user.emails.greeting') }}

<br /><br />

{{ phrase('user.emails.ticket_received') }}

<br /><br />

<dp:ticket-messages />

{% if app.isPortalEnabled() %}
  <br /><br />
  {{ phrase('user.emails.ticket_access_ticket_online') }}
  <a href="{{ ticket.link }}">{{ ticket.link }}</a>
{% endif %}

This is an example of the output of the default template:

../_images/default-newticket-email.png

  1. To change the user message, you can remove {{ phrase('user.emails.ticket_received') }} and replace it with a reference to a suitable custom phrase.

  2. Go to Setup > Languages, click All Custom Phrases then + Add Custom Phrase. Enter a suitable custom phrase, then save it as something descriptive, e.g. custom.sales-auto-response: ../_images/custom-sales-phrase.png

  3. Back in Tickets > Email Templates, edit the custom marketing-auto-response.html and add the code from the default response.

  4. Replace {{ phrase('user.emails.ticket_received') }} in the default template with {{ phrase('custom.sales-auto-response') }}.

  5. Now set your helpdesk so that it sends an email using the new template when a user submits a ticket to the sales department via email or the portal.

Published: 23/03/2017

Last updated: 21/05/2018