Missed Team ’24? Catch up on announcements here.

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

Setting the Reporter for the ServiceDesk via the API

Dean van Rooyen October 24, 2018

Hello,

We have custom forms built in our applications which we link to JIRA ServiceDesks issues via the API.

I have 2 questions relating to this:

1. The user is logged into the app so we know their FirstName,LastName and email address. Is there a way that, if we match their email within JIRA then we set the reporter to that user within the issue?

2. If the user is not matched via email address, is there a way to create a customer account within JIRA via the API which will then set the reporter to the user logging an issue via the application form?

1 answer

1 accepted

1 vote
Answer accepted
Keri
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
October 25, 2018

Hey Dan,

 

Thanks for reaching out to the Atlassian Community!

 

You can call the CreateCustomer REST API end point with the customers email address. If this returns back 400 then the customer already exists, or there is a problem with the email address.  If it doesn’t exist it will create a new customer:

https://docs.atlassian.com/jira-servicedesk/REST/3.6.2/#servicedeskapi/customer-createCustomer

 

You’ll want to make sure that you do some email validation before calling this end point.

 

Once you’ve created the customer, you may need to add them to the Service Desk, depending on your current customer sharing settings. https://docs.atlassian.com/jira-servicedesk/REST/3.6.2/#servicedeskapi/servicedesk/{serviceDeskId}/customer

 

You can then raise a request on behalf of the user: createCustomerRequest https://docs.atlassian.com/jira-servicedesk/REST/3.6.2/#servicedeskapi/request-createCustomerRequest

 

Hope this helps!

 

Cheers,

Keri

David Orazine October 15, 2019

@Keri 

 

In regards to 

You can then raise a request on behalf of the user: createCustomerRequest https://docs.atlassian.com/jira-servicedesk/REST/3.6.2/#servicedeskapi/request-createCustomerRequest

What argument do I use to specify the customer?

Jonathan January 19, 2021

I would also need to know this.

You can't adress the reporter field and there also seems to be no field like "customer" or any information about how to set this via the SD-API

Jefferson Fabrin Puntim
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
February 22, 2021

Hello bud!  Just set "raiseOnBehalfOf" field to the costumer that you want.

 

{
"serviceDeskId": "1",
"requestTypeId": "1",
"requestFieldValues": {
"summary": "Request JSD help via REST",
"description": "I need a new *mouse* for my Mac"
},
"raiseOnBehalfOf": "qm:a58be9bc-77cb-469a-969f-4a31bc08b487:83694b75-5714-45d8-b5ca-f16344d217ec"

}

 

Like # people like this

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events