How to add customer satisfaction feedback to a service desk notification template

SINCE 3.0.0

This feature requires Jira Service Management to be installed. If you do not have that but still want a Customer Satisfaction feature see Use Directive Sets where there is an example CSAT scenario.

Jira Service Desk has a Customer Satisfaction feature which can be used to gather customer feedback upon issue resolution via email. JEMH cannot make use of Jira Service Desk's internal email templates, however identical functionality can be achieved via a customised JEMH email template.

Step-by-step guide

Create a JEMH Template Set for the Issue Resolved issue event

Modify the Template Set content and append the customer satisfaction code to the end of the HTML part of the template

#rowWrapperNormalBegin("feedback") #set($jsdApi = $jemhUtils.getJsdApi()) #if($jsdApi) #set($feedbackDetails = $jsdApi.getRequestFeedbackDetails($recipientUser, $issue)) #if($feedbackDetails) <h2>$feedbackDetails.getFeedbackQuestion()</h2> #set($feedbackUrl = $feedbackDetails.getRequestFeedbackToken().getCustomerPortalLink()) <ul> #foreach($i in [1..$feedbackDetails.getFeedbackScale()]) <li> <a href="$!feedbackUrl&rating=$i"> $i Star </a> </li> #end </ul> #else <h1>ERR: Customer satisfaction must be enabled (Jira Project Admin &gt; Satisfaction Settings &gt; Customer satisfaction : <b>on</b> </h1> #end #else <h1>ERR: no JSD API</h1> #end #rowWrapperNormalEnd()

Preview the Template Set content

Set an Actioner user/Action user and example issue key to render the preview with

After setting an actioner/action user, press the blue preview button to view a preview of the Template Set.

Add star icons for rating levels via Static Resources

The above example shows a list of links for each star rating, for a better visual experience you may want to use some customised icons for each rating level, this can be achieved via Static Resources

  • Create a Static Resource for the star image

  • Take note of the ID of the created Static Resource

  • Replace the hyperlink text with the rendered Static Resource image

Before

After

Before

After



#foreach($i in [1..$feedbackDetails.getFeedbackScale()]) <li> <a href="$!feedbackUrl&rating=$i"> $i Star </a> </li> #end





#foreach($i in [1..$feedbackDetails.getFeedbackScale()]) <a href="$!feedbackUrl&rating=$i"> $jemhUtils.renderStaticResourceImage(STATIC_RESOURCE_ID) </a> #end



  • Preview the final template



The satisfaction survey will only be shown if the action user/recipient is the reporter of the preview issue

Related articles