You can do this by modifying Email and Help Center templates so that the survey links are only shown for tickets in certain departments.
In the example below, we’re going only to show survey links for tickets in the Support
department.
-
Find the department ID by going into Admin > Ticket Structure > Departments. The department ID will be located under the ID column, in this case, it’s
1
. -
Go into Admin > Channels > Email > Templates and use the Templates dropdown to select User Email Templates > Ticket Emails > New Agent Reply.
-
Find the block named
emails_common:ticket_rating_links.html.twig
and select it. It’ll be shown in green and if you haven’t modified this template before, it’ll be located in line 17. -
In the new view, at the very first line of the template, insert
{% if ticket.department.id == 1 %}
where1
is the ID of the target department. If you wanted the survey displayed for multiple departments, you could use{% if ticket.department.id in [1, 2, 3] %}
where2
,3
, are the IDs of the extra departments.
After the last line of the template, add{% endif %}
and save the template. It should look like this:
If your Helpdesk uses the Help Center, users can log in and see the ticket survey there as well. To modify this template:
-
Go into Admin > Help Center > Help Center Design and click Open Template Editor from the bottom of the left panel.
-
From the Template dropdown, select the Tickets > timeline/timeline.html template.
-
Locate the
Theme:Tickets:timeline/agent_message.html.twig
green block and select it. If you haven’t modified this template before, it’ll be in line 33. -
Find a line that reads
{% if app.getSetting('core_tickets.enable_feedback') %}
. If you haven’t modified this template before, it’ll be line 35. Edit this line to add a check for the department at the end. It should look like the following:{% if app.getSetting('core_tickets.enable_feedback') and ticket.department.id == 1 %}
. Like in the Email templates section, you can also target multiple departments by usingin [1, 2]
instead of== 1
. Remember to click Save after you’ve made your changes.
Finally, if you are sending automated satisfaction requests through the Satisfaction request escalation, you’ll need to create a new custom escalation to send the survey only for the departments you want.
-
Go into Admin > Business Rules > Escalations and select the Satisfaction request escalation. Turn off the Enabled toggle and save the escalation.
-
Create a new custom escalation that is the same as the Satisfaction request escalation, but only applies to the department you want surveys for:
Add a comment
Please log in or register to submit a comment.