-
Suggestion
-
Resolution: Unresolved
-
None
-
64
-
33
-
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:
- Name: Organisation A
- Details:
- Country: Australia
- Website: organisationA.com.au
- Email: orgA@gmail.com
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
- Web request URL:
- 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}}
- Country
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.
- relates to
-
JSDCLOUD-13902 Create/Update customer detail fields via REST API
- Gathering Interest
- mentioned in
-
Page Failed to load
https://getsupport.atlassian.com/browse/CHAT-86549