Integrating Ticket Surveys into an Email Template

Edcel Ceniza Updated by Edcel Ceniza

The default DeskDirector system email template already contains logic to display a survey button to the email sent when a ticket is closed (this is assuming ticket survey is activated for the board. This means that if you are using the system email template on your board's ticket closed notification event, no change is needed from your end.

How do we know if we are using the system template for the ticket closed event of a board?

You can easily identify this from the admin console, via Email > Notification Events > Ticket Board Events then select the board you want to check and look for the Ticket Closed section. An event using the system email template will look like this:

An event using a custom email template will look like this:

For Ticket Closed events that use a custom template, surveys must be manually integrated into your template code.

How do we integrate surveys into our custom email templates?

DeskDirector email template utilizes both MJML markup language and Liquid template engine to allow user to easily code dynamic email content. This also makes it easy to integrate surveys into your custom email templates.

To get started, you can read this articles to give you an idea of how our templates work:

The logic for the ticket surveys can called via the Survey tag. e.g.

<mj-raw>
{% if Survey %}
</mj-raw>
<mj-text font-size="14px" line-height="1.5">
Your feedback helps us improve the process where needed, and recognize those doing a great job. I know you are busy but, if you can, please take a moment and fill out this survey for us:
</mj-text>
<mj-raw>
{% endif %}
</mj-raw>

This code snippet will check if Surveys are enabled for the board where this email template is assigned to. If yes, it will display the block of text. Here's a sample code snippet adding a "Take the Survey" button into the email template:

<mj-raw>
{% if Survey %}
</mj-raw>
<mj-column>
<mj-button font-family="Helvetica" background-color="#2e86ab" color="white" font-size="16px" font-weight="bold" href="{{ Survey.Link }}" target="_blank">
Take the Survey
</mj-button>
</mj-column>
<mj-raw>
{% endif %}
</mj-raw>

What if I am not using the Ticket Closed event but want to use a Ticket Survey?

If you are not using DeskDirector email event, the survey link can be added into your PSA's email template by using portal deep link. You can read more about deeplinking to specific tickets

Survey deeplinking can be referenced as &action=survey appended to a deeplink to a specific ticket.

For example:

https://[your-hostname].deskdirector.com/portal/deeplink?name=ticket&ticket_id=1713798&action=survey

How did we do?

Creating Surveys in DeskDirector

Contact