What's the best way to configure the webhook to provide accurate reporter details?
Asked by Leslie Martin:

We have a cloud instance of Jira Service Management. We are using automation to post a web request to a 3rd party software when tickets are created and edited. Our 3rd party software needs to know the reporter information.

We had it working using the Reporter.EmailAddress, but that is banking on users making their email addresses visible.

How do we know predictably which Atlassian customer account created any given ticket?


Answers:
author: Jehan Bhathena
body: Hi [@Leslie Martin](/t5/user/viewprofilepage/user-id/5365209) ,

Welcome to the Community.

Please can you add the answers for the below points:

* You trigger a Jira Automation when a new JSM ticket is created?
* Can you share a snapshot of the automation that you've configured to achieve this?
* Have you tried using the "Log Action" to see what value is printed for for the reporters Smart Value? <https://support.atlassian.com/cloud-automation/docs/jira-smart-values-issues/#Available-properties>

comments: author: Leslie Martin
body: Hi, Thanks!

Rather than trigger an automation when a ticket is created, we are doing it when a tickets is assigned for the first time only. But the automation needs to contain identifying information about the account that created the ticket.

I'm new, and I hadn't seen Log Actions. That's a good suggestion, but still doesn't provide the necessary information.

![image.png](https://community.atlassian.com/t5/image/serverpage/image-id/292198iE6D40F20EBA3034C/image-size/large?v=v2&px=999 "image.png")


author: Jehan Bhathena
body: Hey [@Leslie Martin](/t5/user/viewprofilepage/user-id/5365209) ,

Thanks for the update.

Few things I can suggest:

* Try using the "Validate your web request" Option to see if the API works first
* I'm assuming you're sending data to another system, does this system accept Jira's issue data format?

I'll check the Jira JSON structure too in the meantime too see the reporter info.


author: Leslie Martin
body: "reporter": {  
"self": "\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*",  
"name": null,  
"key": null,  
"accountId": "\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*",  
"emailAddress": null,  
"avatarUrls": {  
"48x48": "<https://secure.gravatar.com/avatar/10af61ade0ce03766241ffdb2fa0bd21?d=https%3A%2F%2Favatar-management--avatars.us-west-2.prod.public.atl-paas.net%2Finitials%2FLM-4.png>",  
"24x24": "<https://secure.gravatar.com/avatar/10af61ade0ce03766241ffdb2fa0bd21?d=https%3A%2F%2Favatar-management--avatars.us-west-2.prod.public.atl-paas.net%2Finitials%2FLM-4.png>",  
"16x16": "<https://secure.gravatar.com/avatar/10af61ade0ce03766241ffdb2fa0bd21?d=https%3A%2F%2Favatar-management--avatars.us-west-2.prod.public.atl-paas.net%2Finitials%2FLM-4.png>",  
"32x32": "<https://secure.gravatar.com/avatar/10af61ade0ce03766241ffdb2fa0bd21?d=https%3A%2F%2Favatar-management--avatars.us-west-2.prod.public.atl-paas.net%2Finitials%2FLM-4.png>"  
},  
"displayName": "\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*",  
"active": true,  
"timeZone": "America/New_York",  
"groups": null,  
"locale": null,  
"accountType": "atlassian"  
},


author: Leslie Martin
body: Yes, my other software accepts the payload correctly.

When I get it, the emailAddress is null. I have a displayName and accountId. The displayName can be the same for multiple accounts.

So the account id is possibly the only identifier for a specific account, but my other software doesn't know what accountIds are what, unless we'd do an API call back to Jira for the information. We were hoping to avoid that.


author: Jehan Bhathena
body: I checked the Jira issue data using this page <https://support.atlassian.com/cloud-automation/docs/issue-data-jira-format-payload-for-send-web-request-action/>

Here you can see that the email field is available : <https://jqplay.org/s/x9ISHc39ua6>

I'll try this out in my system to see if I can replicate the behavior mentioned.

In the mean while please try using the Json path shown in the above Jqplay link to reference the creator info too see if that works too.


author: Leslie Martin
body: Thanks for that link to documentation! I was struggling to find good clear documentation. And again thanks for your help so far!

So, your examples exhibit the same behavior as I have been seeing. The email field is available, but it is null. In my research that is because the user has the visibility set to hide their email.

Our original plan was to use the email address as the unique identifier to identify the ticket creator/reporter in our 3rd party database. But that isn't going to work email will likely be null most of the time.

Which begs the original question....how can I accurately identify the account that submitted the ticket?

To explain our use case more: Our 3rd party software has all the additional customer information, including street address etc. We want to receive information from Jira that we can use to query our existing database to get full information about the creator of the ticket.


author: Leslie Martin
body: One option I was pursuing:

If you set up an animation on ticket creation, the user fields include the account information of the creator. I could do a rule to send the user.emailAddress to a custom field or comment to save it and query it later??

I haven't figured out the syntax for that.


author: Jehan Bhathena
body: If you use the Validate Web request, does the body contain the email then?

Perhaps you can share the body from one request with the imp info blurred out.


author: Leslie Martin
body: [@Jehan Bhathena](/t5/user/viewprofilepage/user-id/5119409) yes, the body contains all the info as I expect. But it doesn't have the info I need.

It doesn't contain anything other than the long account id to uniquely identify the creator of the ticket. The email would be an identifer but its blocked for privacy.


author: Jehan Bhathena
body: Hi [@Leslie Martin](/t5/user/viewprofilepage/user-id/5365209) ,

You're right the email is marked as null at my end too.

What you can do is extract the UUID and pass it as a input to this API : <https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-users/#api-rest-api-3-user-get>.

The output from this API can then be passed back to your system.

To extract values from the webRequest you can use this Smart Value to get the JSON content: {{webResponse.body}}, another post that might be helpful for reference <https://community.atlassian.com/t5/Jira-Software-questions/Automation-How-retrieve-data-in-quot-Send-web-request-quot/qaq-p/2153217#M221473>

Do let us know if this works for your use case.


author: Leslie Martin
body: Hi [@Jehan Bhathena](/t5/user/viewprofilepage/user-id/5119409) ,

Thanks so much for your continued answers. We will check into these options. Thanks!


author: Leslie Martin
body: Although, it says this.

Get user {#toc-hId--411465914}
------------------------------

```


Returns a user.

Privacy controls are applied to the response based on the user's preferences. This could mean, for example, that the user's email address is hidden. See the Profile visibility overview for more details.


```

I suspect the API response may not be the same as the webhook body.


author: Jehan Bhathena
body: Hey [@Leslie Martin](/t5/user/viewprofilepage/user-id/5365209) ,

The Api response won't be the same, that is why you'll need to extract the value that you need and then pipe it as a individual variable to your webhook. The other alternative that I can think of is, to use the users Uid and fire a curl command in your destination machine that fetches the User ID there itself and use that in the content there.

? Hope this helps.
> API response may not be the same as the webhook body.


author: Leslie Martin
body: The User fields include the email address upon creation of a ticket. But our webhook only fires when the rule is assigned for the first time. At that point, it does not provide the user information of the creator or reporter.

Our use case is querying for additional contact information in our 3rd party software. But Jira provides us with no customer identifier, other then the name, of which we can have duplicates.

I see the account id, but for that to work, we would need to add all those id's to our 3rd party database.

I hope someone can help. I haven't found good documentation on these payloads.