Hi all,
I am trying to make a script that assigns Customers to an organization upon Issue Creation with Scriptrunner.
I have used the "Add user to organization" method documented here: https://developer.atlassian.com/cloud/jira/service-desk/rest/api-group-organization/#api-rest-servicedeskapi-organization-organizationid-user-post
and while it works with licensed users, it turns up errors whenever I try it with a customer accountId.
{"errorMessage":"Could not find accountIds: qm%3A9c4ffcdc-c9a8-4072-a73d-f1c796ec83cd%3A86f55d53-c694-4db6-84ed-0889500b7fac","i18nErrorMessage":{"i18nKey":"sd.request.participants.validation.missing.account.ids","parameters":["qm%3A9c4ffcdc-c9a8-4072-a73d-f1c796ec83cd%3A86f55d53-c694-4db6-84ed-0889500b7fac"]}} 2021-08-13 09:18:49.728 INFO - {"errorMessage":"Could not find accountIds: qm%3A9c4ffcdc-c9a8-4072-a73d-f1c796ec83cd%3A86f55d53-c694-4db6-84ed-0889500b7fac","i18nErrorMessage":{"i18nKey":"sd.request.participants.validation.missing.account.ids","parameters":["qm%3A9c4ffcdc-c9a8-4072-a73d-f1c796ec83cd%3A86f55d53-c694-4db6-84ed-0889500b7fac"]}}
I also (without luck) tried out some suggestions found around the atlassian comunitty, such as: https://community.atlassian.com/t5/Jira-Service-Management/Organization-automation/qaq-p/225618
So I'd like to ask if there's something I have overlooked somewhere and/or if it is even possible to add Costumers to organization via script?
Any suggestions/ even a clear "not possible", is much appreciated!
Had high hopes for JSD, but without the ability to auto assign customers, it probably isn't for us.
Kind regards,
Amanda
Of course it is possible!
here an example :
https://github.com/WuerthPhoenix/Atlassian-Extension-Scripts/blob/main/load-jsm-customer-ldap/load-jsm-customer-ldap.sh
file: load-jsm-customer-ldap (from line 116)
Cheers
Nicola
That is very cool! Havn't tried it out, but will accept this as the answer :)
We have however decided that JSD isn't for fit for our needs atm. But I will save this in case that changes.
Thank you so much for your help !
(This has been bugging me for weeks and eventhough we're not going to use it, this gives me peace of mind)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Has anyone managed this without the need for making an API call?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @amanda
I think that you have to create your customer first (https://developer.atlassian.com/cloud/jira/service-desk/rest/api-group-customer/#api-rest-servicedeskapi-customer-post), and then to add him to an organization. Sending an API request for adding a customer to an organization, requires his/her ID. An this is created once the customer is created.
Hope that helps :)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks ! :) I tried it friday but it didn't seem to do the trick.
It gave the same error, but worked fine with a licensed user (that wasn't yet a customer).
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.