Just a heads up: On March 24, 2025, starting at 4:30pm CDT / 19:30 UTC, the site will be undergoing scheduled maintenance for a few hours. During this time, the site might be unavailable for a short while. Thanks for your patience.

×
Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

set assignee from webhook data

fishern July 8, 2024

a bit of an odd request, but we have a live chat tool that I can extract data from a webhook when the chat ends. I am using this to create a ticket in Jira, however I am not able to map the assigned technician easily. 

I am able to post the agent's name in the description of the newly created ticket so I thought I would try to setup a table to map this. I've tried email and Atlassian ID but no dice.
 table.png

here is a snippet from the edit part of the rule
edit.png

looking for any ideas how to pull this in for editing the assignee of the tickets. 

ps. this works fine and displays the agent name:
description update.png

3 answers

1 accepted

0 votes
Answer accepted
Mikael Sandberg
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
July 8, 2024

Is the lookup returning the agent based on the webhookData? If not, could it be the case that you have a white space in the result from the webhookData for the assignee? If you add .trim does that change anything?

fishern July 8, 2024

The payload is presenting the agent name which is what I’m using to post in the description. 
im struggling to sort out how to use that with the table/assignee part of the automation. I figured this was the only way to grab the agent name and change the assignee in Jira 

Mikael Sandberg
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
July 8, 2024

You could do a web request to Find users endpoint instead of using a lookup table. The endpoint can search both on displayName and emailAddress.

fishern July 9, 2024

I like this idea, but the user lookup I think would be different as the chat tool uses a different display name than what is showing in Atlassian. Why I figured the table was a good way to go as it seemed to be the only way I can match up the unique information from chat/jira and pump out what i assign. 

Mikael Sandberg
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
July 9, 2024

Are you able to get the email address of the assignee from the chat tool?

Have you done a log action to see that data is returned from the lookup table? If it is returning the Atlassian Id of the user then it should work to set the assignee. I am using lookup table to collect data about the reporter that we are using for different things.

fishern July 9, 2024

no, the only thing I can get from the payload is the display name from the chat tool that they are using. The lookup smartvalue I am using is not working at all, just the payload dump is in the description. 

Mikael Sandberg
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
July 9, 2024

Okay, so it sounds like there might be a whitespace or something in the payload that is causing the lookup table to not return the Atlassian Id. Depending on how big your team is you may want to use the if/else condition and the smart value compare instead. You could then use {{webhookData.payload.agents.name}} and use the contain compare to set the assignee. 

Like fishern likes this
fishern July 9, 2024

this worked like a charm, thank you

Like Mikael Sandberg likes this
0 votes
Iryna Ihnatiuk
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 9, 2024

Hello @fishern ,

Have you ever considered using apps like our Chat for JSM as a live chat solution? With this app, you can add a live chat widget to Jira Customer Portal or any website/ app. Jira tickets will be created automatically, and all messages will be synchronized with comments, so you won't need to do it manually. 

Let me know if you're interested and we can arrange a quick demo. 

Thanks,
Iryna
Appfire

fishern July 9, 2024

thank you, but we are looking to enhance our chat with a chatbot interlaced before chat. I don't think your tool shows that as a function. 

0 votes
said kouzibry
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 8, 2024

Just adding the name like that will not work, you need to use the accountId of the user, @Mikael Sandberg  provided the solution, I will expand on that. Do a web request to the user search end point (https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-user-search/#api-rest-api-3-user-search-get) then extract the accountId of your user and use that to set the Assignee.

Making a web request to your own site's rest api will require the Authorization header, you will find more information on that here Basic auth for REST APIs.

 

fishern July 9, 2024

I have tried to use the account ID directly in the table. My issue is the Display name in our Chat tool (where the webhook payload is coming from) does not match the name in Atlassian user list. This is why I wanted to manage this manually. 

I am not sure if this is a limitation within Atlassian as I can use the chat tool's automation to create a similar table, spit out the assignee with no issues. I just have to pay for the automation to run so I was hoping to save some cost doing the same thing in Jira.

I seem to be able to post to the description with the information with no issues, just can't seem to have the Assignee smart value fully correct. 

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
TAGS
AUG Leaders

Atlassian Community Events