Uploaded image for project: 'Jira Service Management Cloud'
  1. Jira Service Management Cloud
  2. JSDCLOUD-13433

Make 'Organization detail fields' and 'Customer detail fields' accessible in Automation Rules, REST API and Queue Columns

    • 64
    • 33
    • Our product teams collect and evaluate feedback from a number of different sources. To learn more about how we use customer feedback in the planning process, check out our new feature policy.

      Summary

      The organization detail fields and customer detail fields are a great addition to customer service management. However, these fields can only be used in JQLs at this moment.

      What is required

      It would be great if we could use these fields directly in the automation rules as smart values and in Queue Columns as fields. This can be used in multiple use cases, I have shared an example below:

      • Organization A has region EMEA, Organization B has region AMER and so on
      • Organization A has the currency EUR, Organization B has the currency USD and so on
      • Create an automation rule to automatically update the custom fields Organization Region and currency using smart values.
      • Create a Queue to show the customer details fields as columns.

      Workaround 1

      At this moment, we need to use multiple IF/ELSE blocks in the automation rule to achieve the use case. This can be very hard to achieve when there are many organizations in the project.

      Workaround 2

      Use Jira Automation to get the Organisation details using the Get organization detail fields REST API. Let's say we need to obtain the following organisation details in an automation rule:

      Use Jira Automation to retrieve Organisation details with the Get organization detail fields REST API. If the following organisation exists:

      As a possible solution, you can obtain each organisation detail individually from the REST API response:

      • Create variable and assign the organisation ID from the Organizations field
        OrganisationID = {{customField_xxxxx.id}}
      • To retrieve Organisation details, use the Send web request action to access the Get organization detail fields REST API.
        • Web request URL:
          https://api.atlassian.com/jsm/csm/cloudid/<SITE_ID>/api/v1/organization/{{OrganisationID}}
        • HTTP method: GET
        • Web request body: EMPTY
        • Enable: "Delay execution of subsequent rule actions until we've received a response for this web request"
        • Headers:
          Key Value
          Accept application/json
          Authorization Basic <ADD THE ENCODED STRING>*

          * To encode a username and API Token in Base64 encode to be use as basic authentication, follow these instructions: Supply basic auth headers 

          echo -n "email@example.com:<YOUR_TOKEN_HERE>" | base64
      • The REST API response based on the organisation previously defined will be:
        {
            "id": "X",
            "name": "Organisation A",
            "details": [
                {
                    "id": "XX",
                    "name": "Country",
                    "type": {
                        "name": "SELECT",
                        "options": [
                            "Australia",
                            "Colombia",
                            "USA"
                        ]
                    },
                    "values": [
                        "Colombia"
                    ],
                    "configuration": {
                        "position": 0
                    }
                },
                {
                    "id": "XY",
                    "name": "Website",
                    "type": {
                        "name": "URL",
                        "options": null
                    },
                    "values": [
                        "https://organisationA.com.au"
                    ],
                    "configuration": {
                        "position": 1
                    }
                },
                {
                    "id": "XYZ",
                    "name": "Email",
                    "type": {
                        "name": "EMAIL",
                        "options": null
                    },
                    "values": [
                        "orgA@gmail.com"
                    ],
                    "configuration": {
                        "position": 2
                    }
                }
            ]
        }
      • From the previous example, to get each organisation detail individually, the following smart values can be used:
        • Country
          {{webResponse.body.details.first.values}}
        • Website
          {{webResponse.body.details.get(1).values}}
        • Email
          {{webResponse.body.details.get(2).values}}

      These details can then be copied into custom fields through the Edit work item action. This allows these fields to used in automation rules via smart values or display them in queues as columns.

            [JSDCLOUD-13433] Make 'Organization detail fields' and 'Customer detail fields' accessible in Automation Rules, REST API and Queue Columns

            Aanchal . added a comment -

            Aanchal . added a comment - https://getsupport.atlassian.com/browse/CHAT-86549

            I agree.  We would strongly benefit from the use of this feature. 

            Rebecca Van Dyke added a comment - I agree.  We would strongly benefit from the use of this feature. 

            Lee Hutchinson added a comment - - edited

            Please can we get this feature soon. Having the ability to store Organisations and customer, custom values is a really good thing, but limiting the use to JQL only really reduces their actual use. I would like to use automation rules to set values in my JSM issues from custom fields held against the Organisation.

            Lee Hutchinson added a comment - - edited Please can we get this feature soon. Having the ability to store Organisations and customer, custom values is a really good thing, but limiting the use to JQL only really reduces their actual use. I would like to use automation rules to set values in my JSM issues from custom fields held against the Organisation.

            I'd also love to be able to create variables based on fields in the Customer Details.

            Rabbit Stoddard added a comment - I'd also love to be able to create variables based on fields in the Customer Details.

            Pepijn Szekér (GIM) added a comment - - edited

            As a temporary work around, JQL could be used in Condition checks
            Example based on https://support.atlassian.com/jira-service-management-cloud/docs/create-queues-based-on-customer-details/

            To filter for a certain customer detail "Language", one could use the JQL-statement 

            reporter in customerDetail("Language", "EN")

            Pepijn Szekér (GIM) added a comment - - edited As a temporary work around, JQL could be used in Condition checks Example based on https://support.atlassian.com/jira-service-management-cloud/docs/create-queues-based-on-customer-details/ To filter for a certain customer detail "Language", one could use the JQL-statement  reporter in customerDetail( "Language" , "EN" )

              Unassigned Unassigned
              157cb8ea75c4 Abhishek Singh
              Votes:
              53 Vote for this issue
              Watchers:
              39 Start watching this issue

                Created:
                Updated: