Creating Custom Email Template

Jason He Updated by Jason He

DeskDirector has several events that send out email notification, that include approvals, mail login tokens and ticket life cycle notifications. You can customize them to fit your own style or branding and in this article, we will go through how to create and use customized templates.

Creating a new Email Template

To get started, login to your admin console and head toEmail > Custom Template. Go to the template event you want to create a template for (e.g. Reset Password) then click on "New Template" button then specify a template name.

Make sure you are in the right template category before creating a new template because you can't use an email template on an event it is not built for. For example, templates built under "Reset Password" can't be used in the "Mail Auth Token" event.
Customizing the Email Template

The template engine used on template editor is combination of MJML and Liquid. You can check our article on template editor here to give you an overview in customizing the email template. This gives a lot of flexibility on how you want the email template to look and function.

The easiest way to create a template is to import a sample template then customize it to fit your need. After the new template has been created, click on the ellipses in the upper-right corner of the editor then click Import Sample Template from the dropdown. Select a sample from the list and click Import.

You can utilize the split view feature to preview and edit the template the template at same time.

Modify the imported content in the editor to your liking, then click Save. Your new custom template is now ready to be used for the corresponding Notification Event you want to use it for.

Customization Guide

Display content according to your office hours

The token Context.IsOfficeHour can be used to control what content should be included in your emails according to your office hours settings.

For example, to display content when current time is office hour

<mj-raw>{% if Context.IsOfficeHour %}</mj-raw>  
<mj-text>
Now is our office hour.
</mj-text>
<mj-raw>{% endif %}</mj-raw>

and to display content when current time is NOT office hour

<mj-raw>{% unless Context.IsOfficeHour %}</mj-raw>  
<mj-text>
Now is outside of our office hours.
</mj-text>
<mj-raw>{% endunless %}</mj-raw>

Custom Email Template - Tutorials

Creating a custom email template

32 STEPS

1. Open DeskDirector Admin Portal and click Email.

Step 1 image

2. Click Custom Template.

Step 2 image

3. We can create custom email templates for different events. In this example, we will create a custom template for the Ticket Closed event. Click Ticket Closed.

Step 3 image

4. Click New Template.

Step 4 image

5. Type a name for the email template.

Step 5 image

6. To add any tags, click Add Tag.

Step 6 image

7. Select the Tag you want to add.

Step 7 image

8. Click Create.

Step 8 image

9. In the code section, you can add MJML code to insert sections or controls into the email.

Step 9 image

10. In the Preview section, you can see the preview of the email template.

Step 10 image

11. To import a pre-existing design template, click the three-dot menu.

Step 11 image

12. Click Import sample template.

Step 12 image

13. Here, you can select the template you like. For this example, click Customer Satisfaction.

Step 13 image

14. Click Import.

Step 14 image

15. To delete any section, just remove its code. Here, we have deleted the discussion section from the template, by deleting its code below the notes heading.

Step 15 image

16. Let's add the ticket's date of creation in the details table. Click inside the code, below the Summary row.

Step 16 image

17. Type the code required to insert a new row.

Step 17 image

18. Click between the <td> tags to edit the caption.

Step 18 image

19. Type - Date created.

Step 19 image

20. To add the date value, click on the Tokens tab.

Step 20 image

21. Here, you can find the tokens for different properties of the ticket. Click on the copy icon for the Ticket.DateEntered token.

Step 21 image

22. Click back to the Code page.

Step 22 image

23. Click between the <td> tags in the code.

Step 23 image

24. Paste the token that we copied earlier.

Step 24 image

25. In the preview, we can see that we have added a new row called Date created.

Step 25 image

26. Next, click on the Settings tab.

Step 26 image

27. Click the Template textbox to enter a subject line.

Step 27 image

28. Type a subject for the new Email.

Step 28 image

29. Click Preview to check the new subject line.

Step 29 image

30. Click Save to save the changes.

Step 30 image

31. Now, when a ticket is closed, the user will receive our custom email.

Step 31 image

32. That's it. You're done.

Step 32 image

** Best experienced in Full Screen (click the icon in the top right corner before you begin) **

https://www.iorad.com/player/2344963/Creating-a-custom-email-template

Editing custom email template

26 STEPS

1. Open DeskDirector Admin Portal and click Email.

Step 1 image

2. Click Custom Template.

Step 2 image

3. Here, we can add or update email templates for ticket events. Click Ticket Created to edit its template.

Step 3 image

4. Click the template - New Ticket created.

Step 4 image

5. In the code section, you can add MJML code to insert sections or controls into the email.

Step 5 image

6. In the Preview section, you can see the preview of the email template and any changes that you make.

Step 6 image

7. Let's add a new line to display ticket priority in the email table. Click in the code block.

Step 7 image

8. Type the code required to add a new row.

Step 8 image

9. Click to add the title for this new row.

Step 9 image

10. Let's name the row title - Priority.

Step 10 image

11. To add the priority value of the ticket, click the Tokens tab.

Step 11 image

12. Here, you can find the tokens for different properties of the ticket.

Step 12 image

13. Click on the copy icon for the Ticket.Priority.Name token.

Step 13 image

14. Click back to the Code page.

Step 14 image

15. Click in the code section to add the token.

Step 15 image

16. Paste the token that we copied.

Step 16 image

17. In the preview, we can see that we have added a new row called Priority.

Step 17 image

18. Now, click the Settings tab.

Step 18 image

19. Click the Template textbox to edit the subject line.

Step 19 image

20. Choose a new email subject line.

Step 20 image

21. Click Preview to check the new subject line.

Step 21 image

22. To add tags to this template, click Add Tag.

Step 22 image

23. Select the tag that you want to add.

Step 23 image

24. Click Save to save the changes.

Step 24 image

25. We can see that the New Ticket Created email template, now includes the ticket Priority.

Step 25 image

26. That's it. You're done.

Step 26 image

** Best experienced in Full Screen (click the icon in the top right corner before you begin) **

https://www.iorad.com/player/2344908/Editing-a-custom-email-template

Deleting a custom email template

9 STEPS

1. Open DeskDirector Admin Portal and click Email.

Step 1 image

2. Click Custom Template.

Step 2 image

3. Select the category of the template. Click Ticket - Status Changed.

Step 3 image

4. Now, click the template that you want to delete. Click Ticket status change template.

Step 4 image

5. Click the settings icon.

Step 5 image

6. Click Delete.

Step 6 image

7. On the pop-up screen, click Delete to confirm.

Step 7 image

8. Your template has been deleted.

Step 8 image

9. That's it. You're done.

Step 9 image

** Best experienced in Full Screen (click the icon in the top right corner before you begin) **

https://www.iorad.com/player/2344944/Delete-a-custom-email-template

How did we do?

Getting Started with Email Template Engine - DeskDirector

Setting Email Templates for Notification Events

Contact