Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Automate - CustomerID

Myles Boyd
Contributor
October 22, 2024

We are using Atlassian Guard for the source for Customers (this is populated in turn by Okta).

We have added some fields to Customer Detail, which we need to populate, which can be sourced from Okta.

 

However I have hit a stumbling block. I found this link, but it talks about using CUSTOMERID to put/get the data. I can find ACCOUNTID, but web searches say Customer ID and Account ID are two different values.

What I need to do in automation is,

1. Get the customer detail record.

2.  If it's empty, make a call to Okta and populate the customer detail record.

 

Any suggestions, etc much appreciated.

1 answer

0 votes
Nico Maikranz
Contributor
October 22, 2024

We are also using Atlassian Guard and I populated the Customer Details with the AccountID.

Because we only have internal customers, I have created an organization with all our customers.

I then used the API endpoint "/rest/servicedeskapi/organization/{organizationID}/user" to get the AccountIDs of all our customers and populated the customer details from our Active Directory with the API endpoint you posted.

 

Long story short: AccountID should work, at least it worked for me.

 

Myles Boyd
Contributor
October 22, 2024

We didnt want to use Organizations as it seemed to facilitate people in the same org seeing all tickets.

 

So I have test customer and using their ID and the URL

https://api.atlassian.com/jsm/csm/cloudid/{{cloudid}}/api/v1/customer/{{accountId}}

I get error 500 server error.

Nico Maikranz
Contributor
October 22, 2024

Ok.

Can you post the details of that error 500 here?

Myles Boyd
Contributor
October 22, 2024

Using postman for testing, this is all I get

{
    "errorMessage""Encountered error while executing request.",
    "errors": [
        "INTERNAL_SERVER_ERROR"
    ],
    "statusCode"500
}
Nico Maikranz
Contributor
October 23, 2024

Unfortunately, I am not familiar with postman.

Basically, I can only say that you are on the right track with the AccountId. The URL from above also looks correct.

I have tried to adapt my script so that I also get an Error 500.

Method "Get" replaced by "Post": Error 405 "Method not allowed"
Incorrect cloud ID stored: Error 404 "Tenant not found"
Incorrect customer/account ID stored: Error 404 "accountId not found for customer"
Incorrect URL stored: Error 404 "not found"
Incorrect credentials stored: Error 401 "unauthorized"

There is currently no scenario (with Powershell) where I can get an error 500.

I therefore assume that the error is not directly related to the URL you are using.
Maybe its something related to postman or some configurations in postman. But these are just guesses.

Myles Boyd
Contributor
October 23, 2024

I get the same in JSM; just used PM as it's easier to change.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
TAGS
AUG Leaders

Atlassian Community Events