Is there a way to add customers with their first and last name in bulk?

Benjamin Peikes December 20, 2017

We can't create tickets with our customers as request participants until they have created Service Desk accounts. We would like to create the accounts on their behalf, with first and last names. The way we do it now, requires us to add the customer via the "Customers" item in the Service Desk project, then to hover on the user, and click on "Administer User", then click on Edit.

When we bring on a new client, we'd like to "precreate" all of their customer accounts, with first and last names. Is there anyway to do this?

1 answer

0 votes
RianS
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.
December 20, 2017

This sounds like something that can be handled by the REST api for service desk. There are two ways to do this through REST. You can add a generic customer that isn't attached to a particular ServiceDesk Project or add a customer to a specific ServiceDesk Project.

The documentation for Server is:

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

And for Cloud is:

https://developer.atlassian.com/cloud/jira/service-desk/rest/#api-customer-post

Benjamin Peikes December 20, 2017

We were hoping there was a way of doing this through the UI, we're really not interested in developing for Jira. We have our own development tasks to work on.

Additionally, The API is a doesn't make sense. The createCustomer takes a single "displayName" and "email", while the add customer to a service desk endpoint takes a list of usernames.

A couple more questions:
1) What's a username? 
2) In the Service Desk UI, you can decide on whether or not they get an email when created/added. It's not clear via the API if a customer is emailed when created.

Like Shmuel Wilhelm likes this
RianS
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.
December 20, 2017

Looks like to do this you need to create the "customer" in Service Desk as a whole which is the first REST API (servicedeskapi/customer) you looked at that requires the displayName and Email. It will return the username for the person during this creation. You can use this username or list of usernames for the second REST API (servicedeskapi/servicedesk/{serviceDeskId}/customer) so that these customer accounts will be associated with that particular service desk.

The username is the account username that is tied to the customer's account in JIRA service desk.

As far as emails go, the first operation (servicedeskapi/customer) doesn't email the customer during the account creation. However, the documentation doesn't mention whether the second operation (servicedeskapi/servicedesk/{serviceDeskId}/customer) emails in the same that the UI does when adding a customer to a service desk project. That would probably need to be tested to see what the behavior is.

Benjamin Peikes January 10, 2018

Thanks! I think we're going to pass on writing anything ourselves. That would mean having to host the page to perform the action on another server. 

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events