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

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

This widget could not be displayed.
Rian Spivak Community Champion Dec 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

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.

Rian Spivak Community Champion Dec 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.

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
Community showcase
Published Aug 13, 2018 in Jira Service Desk

Jira Service Desk – Don’t be afraid, the journey begins with curiosity!

...be more productive while being fun to use at the same time. For some, getting started can be a bit intimidating. This is especially true if Jira Service Desk is your first exposure to Atlassian...

9,900 views 9 28
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you