How to customize the Customer Satisfaction email in Jira Service Management
Platform Notice: Data Center Only - This article only applies to Atlassian products on the Data Center platform.
Note that this KB was created for the Data Center version of the product. Data Center KBs for non-Data-Center-specific features may also work for Server versions of the product, however they have not been tested. Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.
*Except Fisheye and Crucible
Summary
The Customer Satisfaction feature of JSM does not allow free customization of it's email content.
For instance, you may wish to:
Change the graphics of the survey stars in the JSM Customer Satisfaction email
or
Change the URL of the survey link in the JSM Customer Satisfaction email
The solution below describes how to replace Jira's inbuilt email system with an Automation for Jira replacement, which provides unlimited flexibility.
Solution
In your JSM project, goto Project Settings -> Satisfaction settings -> Turn off
Visit Jira Admin -> System -> Automation Rules
Create a new rule
Rule Details: Scope: Your JSM project
Trigger: Issue transitioned
From Status: Blank
To status: your resolved status (EG "Resolved")
Action: Set entity property
Entity Type: Issue
Property key: feedback.token.key
Property value:
1
{"token":"{{#=}}CEILING(RANDOM()*100000000){{/}}{{#=}}CEILING(RANDOM()*100000000){{/}}{{#=}}CEILING(RANDOM()*100000000){{/}}{{#=}}CEILING(RANDOM()*100000000){{/}}{{#=}}CEILING(RANDOM()*100000000){{/}}{{#=}}CEILING(RANDOM()*100000000){{/}}","issueID":{{issue.id}},"userKey":"{{reporter.key}}"}
Action: Send email
To: Reporter
Subject:
1
{{issue.key}} has been marked as resolved
More options: Uncheck "Convert line breaks to HTML line breaks"
Content: You can customise to what you want. The example below is the default JSM email HTML content
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <base href="https://YOUR_JIRA"> </head> <body> <div class="jsm-message-content" style="margin-bottom: 30px"> <div class="jsd-activity-item-content"> <p>admin changed the status to Resolved.</p> </div> <hr class="jsd-activity-item-separator" style="border: none; border-bottom: 1px solid #cccccc"> <p></p> <div class="jsd-activity-item-content"> <p>admin resolved this as Done.</p> </div> <div class="srf-section" style="min-width: 280px"> <br> <div class="jsd-satisfaction-survey-question srf-question" style="font-weight: 700"> How was our service for this request? </div> <div class="srf-line-break" style="min-height: 10px; max-height: 10px; font-size: 8px; line-height: 10px; display: block; width: 100%; overflow: hidden"> </div> <table class="srf-star-table srf-star-table-with-text" style="width: 200px; width: 400px" width="400"> <tbody> <tr> <td class="srf-star-row srf-star-with-text" style="vertical-align: top; text-align: center; width: 75px; border: none; display: table-cell" width="75"><a href="https://YOUR_JIRA/servicedesk/customer/portal/2/{{issue.key}}/feedback?token={{issue.properties."feedback.token.key".token}}&rating=1" class="jsd-satisfaction-survey-star srf-star" style="color: #666666; text-decoration: none; font-size: 40px; border: none; display: inline-block; vertical-align: top">☆</a><p class="srf-text" style="margin: 0; padding: 0; font-size: 13px; font-weight: 400; line-height: 20px; text-align: center">Very poor</p></td> <td class="srf-star-row srf-star-with-text" style="vertical-align: top; text-align: center; width: 75px; border: none; display: table-cell" width="75"><a href="https://YOUR_JIRA/servicedesk/customer/portal/2/{{issue.key}}/feedback?token={{issue.properties."feedback.token.key".token}}&rating=2" class="jsd-satisfaction-survey-star srf-star" style="color: #666666; text-decoration: none; font-size: 40px; border: none; display: inline-block; vertical-align: top">☆</a><p class="srf-text" style="margin: 0; padding: 0; font-size: 13px; font-weight: 400; line-height: 20px; text-align: center">Poor</p></td> <td class="srf-star-row srf-star-with-text" style="vertical-align: top; text-align: center; width: 75px; border: none; display: table-cell" width="75"><a href="https://YOUR_JIRA/servicedesk/customer/portal/2/{{issue.key}}/feedback?token={{issue.properties."feedback.token.key".token}}&rating=3" class="jsd-satisfaction-survey-star srf-star" style="color: #666666; text-decoration: none; font-size: 40px; border: none; display: inline-block; vertical-align: top">☆</a><p class="srf-text" style="margin: 0; padding: 0; font-size: 13px; font-weight: 400; line-height: 20px; text-align: center">Neither good nor poor</p></td> <td class="srf-star-row srf-star-with-text" style="vertical-align: top; text-align: center; width: 75px; border: none; display: table-cell" width="75"><a href="https://YOUR_JIRA/servicedesk/customer/portal/2/{{issue.key}}/feedback?token={{issue.properties."feedback.token.key".token}}&rating=4" class="jsd-satisfaction-survey-star srf-star" style="color: #666666; text-decoration: none; font-size: 40px; border: none; display: inline-block; vertical-align: top">☆</a><p class="srf-text" style="margin: 0; padding: 0; font-size: 13px; font-weight: 400; line-height: 20px; text-align: center">Good</p></td> <td class="srf-star-row srf-star-with-text" style="vertical-align: top; text-align: center; width: 75px; border: none; display: table-cell" width="75"><a href="https://YOUR_JIRA/servicedesk/customer/portal/2/{{issue.key}}/feedback?token={{issue.properties."feedback.token.key".token}}&rating=5" class="jsd-satisfaction-survey-star srf-star" style="color: #666666; text-decoration: none; font-size: 40px; border: none; display: inline-block; vertical-align: top">☆</a><p class="srf-text" style="margin: 0; padding: 0; font-size: 13px; font-weight: 400; line-height: 20px; text-align: center">Very good</p></td> </tr> </tbody> </table> <br> <br> </div> </div> <p> <a class="jsm-issue-link" href="https://YOUR_JIRA/servicedesk/customer/portal/2/{{issue.key}}?sda_source=notification-email" style="color: #0052cc; text-decoration: none">View request</a> <span class="jsm-link-separator" style="padding: 0 10px">·</span> </p> <p class="jsm-request-sharedwith" style="color: #7a869a; font-size: 12px"> This is shared with admin@atl-cd.net. </p> <p class="jsm-help-center-footer" style="color: #7a869a; font-size: 12px"> Help Center, powered by <a class="jsm-servicedesk-link" href="https://www.atlassian.com/software/jira/service-management?utm_medium=email&utm_source=service-desk_email-notification_server&utm_campaign=service-desk_email-notification_server" style="color: #0052cc; text-decoration: none">Jira Service Management</a>, sent you this message. </p> </body></html>
If you use the above HTML content, you will need to:
Replace YOUR_JIRA with your Jira's base url and context path
Replace /customer/portal/2/ with the customer portal URL for this project
Finally, click Publish changes to complete your rule. You may now test the rule
Was this helpful?