How to customize the Customer Satisfaction email in Jira Service Management

Still need help?

The Atlassian Community is here for you.

Ask the community


Platform notice: Server and Data Center only. This article only applies to Atlassian products on the Server and Data Center platforms.

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

Purpose

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

  1. In your JSM project, goto Project Settings -> Satisfaction settings -> Turn off
  2. Visit Jira Admin -> System -> Automation Rules
  3. Create a new rule
  4. Rule Details: Scope: Your JSM project
  5. Trigger: Issue transitioned
    • From Status: Blank
    • To status: your resolved status (EG "Resolved")
  6. Action: Set entity property
    • Entity Type: Issue
    • Property key: feedback.token.key
    • Property value:

      {"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}}"}
  7. Action: Send email
    1. To: Reporter
    2. Subject:

      {{issue.key}} has been marked as resolved
    3. More options: Uncheck "Convert line breaks to HTML line breaks"
    4. Content: You can customise to what you want. The example below is the default JSM email HTML content

      <!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>
    5. If you use the above HTML content, you will need to:

      1. Replace YOUR_JIRA with your Jira's base url and context path

      2. Replace /customer/portal/2/ with the customer portal URL for this project

  8. Finally, click Publish changes to complete your rule. You may now test the rule


DescriptionHow to customize the Customer Satisfaction email in Jira Service Management
ProductJira Service Management

Last modified on Jan 9, 2024

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.