Leveraging Intelligent Recommendations for Operational Transformation. AMS Partners click HERE | EMEA/APJ Partners click HERE |
05/16/2024
06:09 AM
- last edited on
05/20/2024
11:02 PM
by
Sunil
05/16/2024 06:39 AM
@Iabdelmoneim can give below and chekc it
"httpHeaders":{
"Authorization": "${access_token}",
"Accept": "application/json"
}
05/16/2024
07:41 PM
- last edited on
05/20/2024
11:03 PM
by
Sunil
use below updated json
we are using the following importjson
{
"accountParams":{
"connection":"acctAuth",
"processingType":"SequentialAndIterative",
"call":{
"call1":{
"callOrder":0,
"stageNumber":0,
"http":{
"url": "https://domain/api/users",
"httpContentType":"application/json",
"httpMethod":"GET",
"httpHeaders":{
"Authorization": "${access_token}",
"Accept": "application/json"
}
},
"listField":"",
"keyField":"accountID",
"colsToPropsMap":{
"accountID": "id~#~char",
"customproperty1": "email~#~char",
"name": "login~#~char",
"status": "active~#~char",
"customproperty2": "firstname~#~char",
"customproperty3": "lastname~#~char",
"customproperty4": "fullname~#~char",
"customproperty5": "call1.message.mention-name~#~char",
"customproperty6": "company~#~char",
"customproperty7": "cost-center~#~char",
"customproperty8": "purchasing-user~#~char",
"customproperty9": "expense-user~#~char",
"customproperty10": "sourcing-user~#~char",
"customproperty11": "inventory-user~#~char",
"customproperty12": "contracts-user~#~char",
"customproperty13": "analytics-user~#~char",
"customproperty14": "created-by.id~#~char",
"customproperty15": "sso-identifier~#~char",
"customproperty16": "employee-number~#~char",
"customproperty31": "STORE#ACC#ENT#MAPPINGINFO~#~char"
}
}
},
"acctEntMappings":{
"Roles":{
"importAsEntitlement":true,
"listPath":"roles",
"idPath":"id",
"keyField":"entitlementID",
"colsToPropsMap":{
"entitlementID":"id~#~char",
"entitlement_value":"name~#~char",
"customproperty1":"description~#~char"
}
}
}
},
"entitlementParams":{
"connection":"acctAuth",
"processingType":"SequentialAndIterative",
"entTypes":{
"Roles":{
}
}
},
"acctEntParams":{
"processingType":"acctToEntMapping"
}
}
05/17/2024 12:12 AM
05/19/2024 10:50 AM
Does it works from postman if yes please share screenshot masking sensitive information
05/20/2024 12:14 AM - edited 05/20/2024 11:57 PM
Dear,
for the following call https://domain/api/users?offset=0&limit=50
[This message has been edited by moderator to mask url]
05/20/2024 06:58 PM
Please share postman screenshot and curl command [Refer https://codingnconcepts.com/postman/how-to-generate-curl-command-from-postman/ ]
⚠️‼️‼️Do not upload any attachments that contain sensitive information, such as IP Addresses, URLs, Company/Employee Names, Email Addresses, etc.‼️‼️⚠️
05/20/2024 11:51 PM - edited 05/20/2024 11:58 PM
Hi Vartak,
Please find below.
this from output curl.
curl
\
--header 'ACCEPT: application/json' \
--header 'Authorization: Bearer ' \
--header 'Cookie: _mkra_ctxt=--200'
this from output JSON
05/21/2024 04:52 AM
Please use the below connection JSON. Update the host, url and url in testconnectionparams. Use the actual access token at the place of <Token> after Bearer. Perform save and test connection and share the logs and status of save and test.
{
"authentications": {
"acctAuth": {
"authType": "oauth2",
"httpHeaders": {
"Host": "ecco-test.coupahost.com",
"contentType": "application/json"
},
"authError": [
"InvalidAuthenticationToken",
"AuthenticationFailed"
],
"url": "https://ecco-test.coupahost.com/oauth2/token",
"httpMethod": "POST",
"httpContentType": "application/x-www-form-urlencoded",
"errorPath": "error.code",
"maxRefreshTryCount": 5,
"tokenResponsePath": "access_token",
"tokenType": "Bearer",
"authHeaderName": "X-COUPA-API-KEY",
"accessToken": "Bearer <TOKEN>",
"retryFailureStatusCode": [
401
],
"testConnectionParams": {
"http": {
"url": "https://domain/api/users",
"httpHeaders": {
"Authorization": "${access_token}"
},
"httpContentType": "application/json",
"httpMethod": "GET"
}
}
}
}
}
Use the below ImportJSON , update the values and run the import. Share the logs and status of import.
{
"accountParams":{
"connection":"acctAuth",
"processingType":"SequentialAndIterative",
"call":{
"call1":{
"callOrder":0,
"stageNumber":0,
"http":{
"url": "https://domain/api/users",
"httpContentType":"application/json",
"httpMethod":"GET",
"httpHeaders":{
"Authorization": "${access_token}",
"Accept": "application/json"
}
},
"listField":"",
"keyField":"accountID",
"colsToPropsMap":{
"accountID": "id~#~char",
"customproperty1": "email~#~char",
"name": "login~#~char",
"status": "active~#~char",
"customproperty2": "firstname~#~char",
"customproperty3": "lastname~#~char",
"customproperty4": "fullname~#~char",
"customproperty5": "call1.message.mention-name~#~char",
"customproperty6": "company~#~char",
"customproperty7": "cost-center~#~char",
"customproperty8": "purchasing-user~#~char",
"customproperty9": "expense-user~#~char",
"customproperty10": "sourcing-user~#~char",
"customproperty11": "inventory-user~#~char",
"customproperty12": "contracts-user~#~char",
"customproperty13": "analytics-user~#~char",
"customproperty14": "created-by.id~#~char",
"customproperty15": "sso-identifier~#~char",
"customproperty16": "employee-number~#~char",
"customproperty31": "STORE#ACC#ENT#MAPPINGINFO~#~char"
}
}
},
"acctEntMappings":{
"Roles":{
"importAsEntitlement":true,
"listPath":"roles",
"idPath":"id",
"keyField":"entitlementID",
"colsToPropsMap":{
"entitlementID":"id~#~char",
"entitlement_value":"name~#~char",
"customproperty1":"description~#~char"
}
}
}
},
"entitlementParams":{
"connection":"acctAuth",
"processingType":"SequentialAndIterative",
"entTypes":{
"Roles":{
}
}
},
"acctEntParams":{
"processingType":"acctToEntMapping"
}
}
Regards,
Dhruv Sharma
05/21/2024 05:23 AM
Hi Dhruv,
I have tried but I am getting the following
Thanks,
Ibrahim
05/21/2024 05:47 AM
could you please share the logs for below and also confirm if save and test connection is working.
1. save and test connection
2. Import job
05/21/2024 06:33 AM
Dear,
Import failed and we get the following in the logs.
1. save and test connection
Connection works and tested successfully
2. Import job
failed with the above error and in the UI
Error WebService call failed After retrying 5 times with responseStatusCode null | Failed url-https://domain/api/users with Error Message-null |
Error while getting Account Import Response WebService call failed with responseStatusCode null | Failed url-https://domain/api/users with Error Message-null |
05/21/2024 07:14 AM
From the error, it looks that you have provided either incorrect/expired token first time or it is not able to get the new token from the API. Could you please retry with fresh token.
"invalid_token","error_description":"The access token provided is expired, revoked, malformed or invalid for other reasons."}, cookies:[], statusCode:401]
05/21/2024 07:25 AM - edited 05/21/2024 07:26 AM
Please use below in connection JSON and keep same importJSON as earlier and confirm if it works. Exclude Bearer keyword both in tokentype and accessToken value.
{
"authentications": {
"acctAuth": {
"authType": "oauth2",
"httpHeaders": {
"Host": "ecco-test.coupahost.com",
"contentType": "application/json"
},
"authError": [
"InvalidAuthenticationToken",
"AuthenticationFailed"
],
"url": "https://ecco-test.coupahost.com/oauth2/token",
"httpMethod": "POST",
"httpContentType": "application/x-www-form-urlencoded",
"errorPath": "error.code",
"maxRefreshTryCount": 5,
"tokenResponsePath": "access_token",
"tokenType": "",
"authHeaderName": "X-COUPA-API-KEY",
"accessToken": "<TOKEN>",
"retryFailureStatusCode": [
401
],
"testConnectionParams": {
"http": {
"url": "https://domain/api/users",
"httpHeaders": {
"Authorization": "${access_token}"
},
"httpContentType": "application/json",
"httpMethod": "GET"
}
}
}
}
}
Regards,
Dhruv
05/21/2024 08:48 AM
Hi Dhruv,
We are still getting the same.
Thanks!
05/21/2024 10:06 AM
{
"authentications": {
"acctAuth": {
"authType": "oauth2",
"httpHeaders": {
"contentType": "application/x-www-form-urlencoded"
},
"httpParams": {
"grant_type": "client_credentials",
"client_secret": "CLIENT_SECRET_VALUE",
"client_id": "CLIENT_ID_VALUE",
"scope": "CLIENT_ID_VALUE"
},
"httpContentType": "application/x-www-form-urlencoded",
"authError": [
"InvalidAuthenticationToken",
"AuthenticationFailed"
],
"url": "https://xxxxxxxxxx.coupahost.com/oauth2/token",
"httpMethod": "POST",
"errorPath": "error.code",
"maxRefreshTryCount": 5,
"tokenResponsePath": "access_token",
"tokenType": "Bearer",
"accessToken": "Bearer abc",
"retryFailureStatusCode": [
401
],
"testConnectionParams": {
"http": {
"url": "https://domain/api/users",
"httpHeaders": {
"Authorization": "${access_token}"
},
"httpContentType": "application/json",
"httpMethod": "GET"
}
}
}
}
}
Document have old version JSON
Update client id / secret/ scope
05/21/2024 11:15 PM
Hi @Iabdelmoneim could you please check and confirm if it is working with the above JSON mentioned by @rushikeshvartak
Regards,
Dhruv Sharma
05/27/2024 12:51 AM
Dear,
Thank you for your support, now import is working but there is no entitlement being imported.
here is ImportAccountEntJSON so please if you can advise, i have done a bit modifications but still no ent to import.
{
"accountParams": {
"connection": "acctAuth",
"processingType": "SequentialAndIterative",
"call": {
"call1": {
"callOrder": 0,
"stageNumber": 0,
"http": {
"url": "https://domain/api/users",
"httpContentType": "application/json",
"httpMethod": "GET",
"httpHeaders": {
"Authorization": "${access_token}",
"Accept": "application/json"
}
},
"listField": "",
"keyField": "accountID",
"colsToPropsMap": {
"accountID": "id~#~char",
"name": "login~#~char",
"status": "active~#~char",
"customproperty5": "active~#~char",
"customproperty1": "email~#~char",
"customproperty2": "firstname~#~char",
"customproperty3": "lastname~#~char",
"customproperty4": "mention-name~#~char",
"customproperty7": "active~#~char",
"customproperty14": "created-at~#~char",
"customproperty15": "sso-identifier~#~char",
"customproperty16": "employee-number~#~char",
"customproperty31": "STORE#ACC#ENT#MAPPINGINFO~#~char"
},
"pagination": {
"offset": {
"offsetParam": "offset",
"batchParam": "limit",
"batchSize": 50,
"totalCountPath": 85000
}
}
}
},
"acctEntMappings": {
"Roles": {
"importAsEntitlement": true,
"listPath": "roles",
"idPath": "id",
"keyField": "entitlementID",
"colsToPropsMap": {
"entitlementID": "id~#~char",
"entitlement_value": "name~#~char",
"customproperty1": "description~#~char"
}
}
}
},
"entitlementParams": {
"connection": "acctAuth",
"processingType": "SequentialAndIterative",
"entTypes": {
"Roles": {}
}
},
"acctEntParams": {
"processingType": "acctToEntMapping"
}
}
Thank you!
05/27/2024 01:40 AM
Please refer to the working JSON at the end of the below post and let us know if it helps.
Solved: Import Coupa Roles/Entitlements - Saviynt Forums - 70113
Regards,
Dhruv Sharma
05/27/2024 08:53 AM
{
"accountParams": {
"connection": "acctAuth",
"processingType": "SequentialAndIterative",
"call": {
"call1": {
"callOrder": 0,
"stageNumber": 0,
"http": {
"url": "https://xxxx.coupahost.com/api/users?fields=%5B%22id%22%2C%22email%22%2C%22login%22%2C%22active%22%2...",
"httpContentType": "application/json",
"httpMethod": "GET",
"httpHeaders": {
"Authorization": "${access_token}",
"Accept": "application/json"
}
},
"listField": "",
"keyField": "accountID",
"colsToPropsMap": {
"accountID": "id~#~char",
"name": "login~#~char",
"status": "active~#~char",
"customproperty5": "active~#~char",
"customproperty1": "email~#~char",
"customproperty2": "firstname~#~char",
"customproperty3": "lastname~#~char",
"customproperty4": "mention-name~#~char",
"customproperty7": "active~#~char",
"customproperty14": "created-at~#~char",
"customproperty15": "sso-identifier~#~char",
"customproperty16": "employee-number~#~char",
"customproperty31": "STORE#ACC#ENT#MAPPINGINFO~#~char"
},
"pagination": {
"offset": {
"offsetParam": "offset",
"batchParam": "limit",
"batchSize": 50,
"totalCountPath": 85000
}
}
}
},
"acctEntMappings": {
"Roles": {
"importAsEntitlement": true,
"listPath": "roles",
"idPath": "id",
"keyField": "entitlementID",
"colsToPropsMap": {
"entitlementID": "id~#~char",
"entitlement_value": "name~#~char",
"customproperty1": "description~#~char"
}
}
}
},
"entitlementParams": {
"connection": "acctAuth",
"processingType": "SequentialAndIterative",
"entTypes": {
"Roles": {}
}
},
"acctEntParams": {
"processingType": "acctToEntMapping"
}
}
05/27/2024 02:33 AM
Dear Dhruv,
I have tried the solution but I see no entitlements were imported.
{
"accountParams": {
"connection": "acctAuth",
"processingType": "SequentialAndIterative",
"call": {
"call1": {
"callOrder": 0,
"stageNumber": 0,
"http": {
"url": "https://domain/api/users",
"httpContentType": "application/json",
"httpMethod": "GET",
"httpHeaders": {
"Authorization": "${access_token}",
"Accept": "application/json"
}
},
"listField": "",
"keyField": "accountID",
"colsToPropsMap": {
"accountID": "id~#~char",
"name": "login~#~char",
"status": "active~#~char",
"customproperty5": "active~#~char",
"customproperty1": "email~#~char",
"customproperty2": "firstname~#~char",
"customproperty3": "lastname~#~char",
"customproperty4": "mention-name~#~char",
"customproperty7": "active~#~char",
"customproperty14": "created-at~#~char",
"customproperty15": "sso-identifier~#~char",
"customproperty16": "employee-number~#~char",
"customproperty31": "STORE#ACC#ENT#MAPPINGINFO~#~char"
},
"pagination": {
"offset": {
"offsetParam": "offset",
"batchParam": "limit",
"batchSize": 50,
"totalCountPath": 85000
}
}
}
},
"acctEntMappings": {
"Roles": {
"importAsEntitlement": true,
"listPath": "roles",
"idPath": "id",
"keyField": "entitlementID",
"colsToPropsMap": {
"entitlementID": "id~#~char",
"entitlement_value": "name~#~char",
"customproperty1": "description~#~char"
}
}
}
},
"entitlementParams": {
"connection": "acctAuth",
"processingType": "SequentialAndIterative",
"entTypes": {
"Roles": {}
}
},
"acctEntParams": {
"processingType": "acctToEntMapping"
}
}
Please advise.
Thank you!
05/27/2024 02:39 AM
Could you please share the logs and the working postman screenshot. Please share on ticket if there is a ticket open and share the ticket number.
Regards,
Dhruv Sharma
05/27/2024 02:44 AM
Hi,
Attached all to the following ticket #INC-2026274
Thank you!
05/27/2024 03:33 AM
The JSON above doesn't have URL for entitlement/roles. Kindly refer below sample and modify your JSON accordingly. Please note the highlighted lines in the below JSON and add the URL for the entitlementtype (roles/Usergroup etc) which you want to import your JSON.
{
"accountParams": {
"connection": "acctAuth",
"processingType": "SequentialAndIterative",
"statusAndThresholdConfig": {
"accountsNotInImportAction": "Suspend",
"accountThresholdValue": 1000
},
"call": {
"call1": {
"callOrder": 0,
"stageNumber": 0,
"http": {
"url": "https://wawa.coupahost.com/api/users",
"httpMethod": "GET",
"httpHeaders": {
"Authorization": "${access_token}",
"Accept": "application/json",
"Content-Type": "application/json"
}
},
"listField": "",
"keyField": "accountID",
"statusConfig": {
"active": "true",
"inactive": "false"
},
"colsToPropsMap": {
"accountID": "id~#~char",
"customproperty1": "email~#~char",
"name": "login~#~char",
"status": "active~#~char",
"customproperty2": "firstname~#~char",
"customproperty3": "lastname~#~char",
"customproperty4": "fullname~#~char",
"customproperty5": "mention-name~#~char",
"customproperty6": "api-user~#~char",
"customproperty14": "created-by.id~#~char",
"customproperty15": "sso-identifier~#~char",
"customproperty32": "requisition-approval-limit.name~#~char",
"customproperty31": "STORE#ACC#ENT#MAPPINGINFO~#~char"
},
"pagination": {
"offset": {
"offsetParam": "offset",
"batchParam": "limit",
"batchSize": 1000,
"totalCountPath": 100
}
}
}
},
"acctEntMappings": {
"Role": {
"importAsEntitlement": false,
"listPath": "roles",
"idPath": "id",
"keyField": "entitlementID"
},
"User Group": {
"importAsEntitlement": false,
"listPath": "user-groups",
"idPath": "id",
"keyField": "entitlementID"
},
"Business Group": {
"importAsEntitlement": false,
"listPath": "content-groups",
"idPath": "id",
"keyField": "entitlementID"
}
}
},
"entitlementParams": {
"processingType": "SequentialAndIterative",
"entTypes": {
"Role": {
"entTypeOrder": 0,
"entTypeLabels": {
"customproperty1": "Meta Created"
},
"call": {
"call1": {
"connection": "acctAuth",
"callOrder": 0,
"stageNumber": 1,
"http": {
"url": "https://XYZ.coupahost.com/api/roles",
"httpMethod": "GET",
"httpHeaders": {
"Authorization": "${access_token}",
"Accept": "application/json",
"Content-Type": "application/json"
}
},
"listField": "",
"keyField": "entitlementID",
"colsToPropsMap": {
"entitlementID": "id~#~char",
"entitlement_value": "name~#~char",
"description": "description~#~char"
},
"pagination": {
"offset": {
"offsetParam": "offset",
"batchParam": "limit",
"batchSize": 50,
"totalCountPath": 10000
}
}
}
}
},
"User Group": {
"entTypeOrder": 1,
"entTypeLabels": {
"customproperty1": "Meta Created"
},
"call": {
"call1": {
"connection": "acctAuth",
"callOrder": 0,
"stageNumber": 2,
"http": {
"url": "https://XYZ.coupahost.com/api/user_groups",
"httpMethod": "GET",
"httpHeaders": {
"Authorization": "${access_token}",
"Accept": "application/json",
"Content-Type": "application/json"
}
},
"listField": "",
"keyField": "entitlementID",
"colsToPropsMap": {
"entitlementID": "id~#~char",
"entitlement_value": "name~#~char",
"description": "description~#~char"
},
"pagination": {
"offset": {
"offsetParam": "offset",
"batchParam": "limit",
"batchSize": 50,
"totalCountPath": 10000
}
}
}
}
},
"Business Group": {
"entTypeOrder": 2,
"entTypeLabels": {
"customproperty1": "Meta Created"
},
"call": {
"call1": {
"connection": "acctAuth",
"callOrder": 0,
"stageNumber": 3,
"http": {
"url": "https://XYZ.coupahost.com/api/business_groups",
"httpMethod": "GET",
"httpHeaders": {
"Authorization": "${access_token}",
"Accept": "application/json",
"Content-Type": "application/json"
}
},
"listField": "",
"keyField": "entitlementID",
"colsToPropsMap": {
"entitlementID": "id~#~char",
"entitlement_value": "name~#~char",
"description": "description~#~char"
},
"pagination": {
"offset": {
"offsetParam": "offset",
"batchParam": "limit",
"batchSize": 50,
"totalCountPath": 10000
}
}
}
}
}
}
},
"acctEntParams": {
"processingType": "acctToEntMapping"
}
}
Regards,
Dhruv Sharma
05/27/2024 03:52 AM
This Json got a lot of accounts to be suspended. attached logs to the ticket
05/27/2024 05:24 AM
I have just shared the above JSON as a sample. Please use the JSON which you were using already and only add the URLs for roles api only just like the above JSON. Without API URL mentioned in the JSON, it won't import entitlements.
Regards,
Dhruv Sharma
05/27/2024 10:50 PM
Dear Dhruv,
I would appreciate if you can give me the final version of JSON that I should use since it is still not working. And it worth to mention what I am trying to do is not only importing entitlements but also assign it to the accounts or correlate it.
Thank you!
05/27/2024 11:01 PM
Used attached working json
05/27/2024 11:52 PM
Hi Rushikesh,
Import is working but still accounts missing entitlements.
So please if you can advise?
Thank you!
Ibrahim
05/28/2024 01:14 AM - edited 05/28/2024 01:15 AM
Please use below JSON and update the url for users and roles. Please confirm if it works.
{
"accountParams": {
"connection": "acctAuth",
"processingType": "SequentialAndIterative",
"call": {
"call1": {
"callOrder": 0,
"stageNumber": 0,
"http": {
"url": "https://domain/api/users",
"httpContentType": "application/json",
"httpMethod": "GET",
"httpHeaders": {
"Authorization": "${access_token}",
"Accept": "application/json"
}
},
"listField": "",
"keyField": "accountID",
"colsToPropsMap": {
"accountID": "id~#~char",
"name": "login~#~char",
"status": "active~#~char",
"customproperty5": "active~#~char",
"customproperty1": "email~#~char",
"customproperty2": "firstname~#~char",
"customproperty3": "lastname~#~char",
"customproperty4": "mention-name~#~char",
"customproperty7": "active~#~char",
"customproperty14": "created-at~#~char",
"customproperty15": "sso-identifier~#~char",
"customproperty16": "employee-number~#~char",
"customproperty31": "STORE#ACC#ENT#MAPPINGINFO~#~char"
},
"pagination": {
"offset": {
"offsetParam": "offset",
"batchParam": "limit",
"batchSize": 50,
"totalCountPath": 85000
}
}
}
},
"acctEntMappings": {
"Role": {
"importAsEntitlement": false,
"listPath": "roles",
"idPath": "id",
"keyField": "entitlementID",
"colsToPropsMap": {
"entitlementID": "id~#~char",
"entitlement_value": "name~#~char",
"customproperty1": "description~#~char"
}
}
}
},
"entitlementParams": {
"connection": "acctAuth",
"processingType": "SequentialAndIterative",
"entTypes": {
"Role": {
"entTypeOrder": 0,
"entTypeLabels": {
"customproperty1": "Meta Created"
},
"call": {
"call1": {
"connection": "acctAuth",
"callOrder": 0,
"stageNumber": 1,
"http": {
"url": "https://XYZ.coupahost.com/api/roles",
"httpMethod": "GET",
"httpHeaders": {
"Authorization": "${access_token}",
"Accept": "application/json",
"Content-Type": "application/json"
}
},
"listField": "",
"keyField": "entitlementID",
"colsToPropsMap": {
"entitlementID": "id~#~char",
"entitlement_value": "name~#~char",
"description": "description~#~char"
},
"pagination": {
"offset": {
"offsetParam": "offset",
"batchParam": "limit",
"batchSize": 50,
"totalCountPath": 10000
}
}
}
}
}
}
},
"acctEntParams": {
"processingType": "acctToEntMapping"
}
}
Regards,
Dhruv Sharma
05/28/2024 11:29 AM
05/28/2024 02:26 AM
Hi Dhruv,
Sorry but still accounts are being imported and no entitlements are associated or roles.
Thank you!
Ibrahim
05/28/2024 11:54 PM
Yes
shared in the ticket
05/29/2024 12:49 AM
Please use the below JSON and share the results. Share the logs on ticket.
Please note that this is only for the entitlement type roles. For other entitlement types, you need to modify the same.
{
"accountParams": {
"connection": "acctAuth",
"processingType": "SequentialAndIterative",
"call": {
"call1": {
"callOrder": 0,
"stageNumber": 0,
"http": {
"url": "https://xxxx.coupahost.com/api/users",
"httpContentType": "application/json",
"httpMethod": "GET",
"httpHeaders": {
"Authorization": "${access_token}",
"Accept": "application/json"
}
},
"listField": "",
"keyField": "accountID",
"colsToPropsMap": {
"accountID": "id~#~char",
"name": "login~#~char",
"status": "active~#~char",
"customproperty5": "active~#~char",
"customproperty1": "email~#~char",
"customproperty2": "firstname~#~char",
"customproperty3": "lastname~#~char",
"customproperty4": "mention-name~#~char",
"customproperty7": "active~#~char",
"customproperty14": "created-at~#~char",
"customproperty15": "sso-identifier~#~char",
"customproperty16": "employee-number~#~char",
"customproperty31": "STORE#ACC#ENT#MAPPINGINFO~#~char"
},
"pagination": {
"offset": {
"offsetParam": "offset",
"batchParam": "limit",
"batchSize": 50,
"totalCountPath": 85000
}
}
}
},
"acctEntMappings": {
"Roles": {
"importAsEntitlement": true,
"listPath": "roles",
"idPath": "id",
"keyField": "entitlementID",
"colsToPropsMap": {
"entitlementID": "id~#~char",
"entitlement_value": "name~#~char",
"customproperty1": "description~#~char"
}
}
}
},
"entitlementParams": {
"connection": "acctAuth",
"processingType": "SequentialAndIterative",
"entTypes": {
"Roles": {"entTypeOrder": 0,
"entTypeLabels": {
"customproperty1": "Meta Created"
},
"call": {
"call1": {
"connection": "acctAuth",
"callOrder": 0,
"stageNumber": 1,
"http": {
"httpHeaders": {
"Authorization": "${access_token}",
"Accept": "application/json"
},
"url": "https://<BASE_URL>/api/roles",
"httpContentType": "application/json",
"httpMethod": "GET"
},
"listField": "",
"keyField": "entitlementID",
"colsToPropsMap": {
"entitlementID": "id~#~char",
"entitlement_value": "name~#~char",
"description": "description~#~char"
},
"pagination": {
"offset": {
"offsetParam": "offset",
"batchParam": "limit",
"batchSize": 50,
"totalCountPath": 10000
}
}
}
}}
}
},
"acctEntParams": {
"processingType": "acctToEntMapping"
}
}
Regards,
Dhruv Sharma
06/03/2024 02:12 AM
Hi Dhruv,
still Entitlements aren't being associated with the accounts, logs shared. in the ticket and account example.
Thank you!
Ibrahim
06/20/2024 04:42 AM
Hi,
Now we have the following.
- When we create account in Saviynt isn't reflected in Coupa
- When we add new role to the account in Saviynt isn't reflected in Coupa
IMport JSON:
{
"accountParams": {
"connection": "acctAuth",
"processingType": "SequentialAndIterative",
"call": {
"call1": {
"callOrder": 0,
"stageNumber": 0,
"http": {
"url": "https://domain/api/users",
"httpContentType": "application/json",
"httpMethod": "GET",
"httpHeaders": {
"Authorization": "${access_token}",
"Accept": "application/json"
}
},
"listField": "",
"keyField": "accountID",
"colsToPropsMap": {
"accountID": "id~#~char",
"name": "login~#~char",
"status": "active~#~char",
"customproperty5": "active~#~char",
"customproperty1": "email~#~char",
"customproperty2": "firstname~#~char",
"customproperty3": "lastname~#~char",
"customproperty4": "mention-name~#~char",
"customproperty7": "active~#~char",
"customproperty14": "created-at~#~char",
"customproperty15": "sso-identifier~#~char",
"customproperty16": "employee-number~#~char",
"customproperty31": "STORE#ACC#ENT#MAPPINGINFO~#~char"
},
"pagination": {
"offset": {
"offsetParam": "offset",
"batchParam": "limit",
"batchSize": 50,
"totalCountPath": 85000
}
}
}
},
"acctEntMappings": {
"Roles": {
"importAsEntitlement": true,
"listPath": "roles",
"idPath": "id",
"keyField": "entitlementID",
"colsToPropsMap": {
"entitlementID": "id~#~char",
"entitlement_value": "name~#~char",
"customproperty1": "description~#~char"
}
}
}
},
"entitlementParams": {
"connection": "acctAuth",
"processingType": "SequentialAndIterative",
"entTypes": {
"Roles": {"entTypeOrder": 0,
"entTypeLabels": {
"customproperty1": "Meta Created"
},
"call": {
"call1": {
"connection": "acctAuth",
"callOrder": 0,
"stageNumber": 1,
"http": {
"httpHeaders": {
"Authorization": "${access_token}",
"Accept": "application/json"
},
"url": "https://domin/api/roles",
"httpContentType": "application/json",
"httpMethod": "GET"
},
"listField": "",
"keyField": "entitlementID",
"colsToPropsMap": {
"entitlementID": "id~#~char",
"entitlement_value": "name~#~char",
"description": "description~#~char"
},
"pagination": {
"offset": {
"offsetParam": "offset",
"batchParam": "limit",
"batchSize": 50,
"totalCountPath": 10000
}
}
}
}}
}
},
"acctEntParams": {
"processingType": "acctToEntMapping"
}
}
CREATE Account:
{
"accountIdPath": "call1.message.id",
"responseColsToPropsMap": {
"displayname": "call1.message.fullname~#~char",
"customproperty1": "call1.message.email~#~char",
"customproperty2": "call1.message.firstname~#~char",
"customproperty3": "call1.message.lastName~#~char",
"name": "call1.message.login~#~char",
"customproperty5": "call1.message.mention-name~#~char",
"customproperty16": "call1.message.sso-identifier~#~char"
},
"call": [{
"name": "call1",
"connection": "acctAuth",
"url": "https://domain/api/users/${account.accountID}",
"httpMethod": "PUT",
"httpParams": "{\"login\":\"${user.locationdesc}\",\"sso-identifier\":\"${user.locationdesc}\",\"email\":\"${user.email}\",\"firstname\":\"${user.firstname}\",\"lastname\":\"${user.lastname}\",\"fullname\":\"${user.displayname}\",\"band\":\"${user.employeeclass}\",\"sharp-user-id\":\"${user.username}\",\"phone-work\":\"${user.phonenumber}\",\"default-address\":{\"country\":{\"code\":\"${user.country}\"},\"city\":\"${user.city}\",\"street1\":\"${user.street}\",\"postal-code\":\"${user.customproperty31}\"},\"state\":\"${user.customproperty58}\"}},\"requisition-approval-limit\":{\"name\":\"${user.country}+'-'+${user.employeeclass}\"}, \"invoice-approval-limit\":{\"name\":\"${user.country}+'-'+${user.employeeclass}\"}}",
"httpHeaders": {
"accessToken": "${access_token}",
"Accept": "application/json"
},
"httpContentType": "application/json",
"successResponses": {
"statusCode": [200, 201]
}
}]
}
Adding Access:
{
"call": [
{
"name": "Roles",
"connection": "acctAuth",
"url": "https://domain/api/users/${account.accountID}",
"httpMethod": "PUT",
"httpParams": "{\"roles\":{\"roles\":{\"name\":\"${entitlementValue.entitlement_value}\"}}}",
"httpHeaders": {
"X-COUPA-API-KEY": "${access_token}",
"Accept": "application/json" },
"httpContentType": "application/json",
"successResponses": {
"statusCode": [
200,
201
]
}
},
{
"name": "User Group",
"connection": "acctAuth",
"url": "https://domain/api/user_group_memberships",
"httpMethod": "POST",
"httpParams": "{\"user-group-id\": ${entitlementValue.entitlementID},\"user-id\": ${account.accountID}}",
"httpHeaders": {
"X-COUPA-API-KEY": "${access_token}",
"Accept": "application/json" },
"httpContentType": "application/json",
"successResponses": {
"statusCode": [
201
]
}
},
{
"name": "Business Group",
"connection": "acctAuth",
"url": "https://domain/api/users/${account.accountID}",
"httpMethod": "PUT",
"httpParams": "{\"content-groups\":[{\"id\": ${entitlementValue.entitlementID}}]}",
"httpHeaders": {
"X-COUPA-API-KEY": "${access_token}",
"Accept": "application/json" },
"httpContentType": "application/json",
"successResponses": {
"statusCode": [
201,
200
]
}
}
]
}
Update Account:
{
"accountIdPath": "call1.message.id",
"responseColsToPropsMap": {
"displayName": "call1.message.fullname~#~char",
"name": "call1.message.login~#~char",
"customproperty1": "call1.message.email~#~char",
"customproperty2": "call1.message.firstname~#~char",
"customproperty3": "call1.message.lastName~#~char",
"customproperty4": "call1.message.fullname~#~char",
"customproperty5": "call1.message.mention-name~#~char",
"customproperty6": "call1.message.company~#~char",
"customproperty7": "call1.message.cost-center~#~char",
"customproperty8": "call1.message.purchasing-user~#~char",
"customproperty9": "call1.message.expense-user~#~char",
"customproperty10": "call1.message.sourcing-user~#~char",
"customproperty11": "call1.message.inventory-user~#~char",
"customproperty12": "call1.message.contracts-user~#~char",
"customproperty13": "call1.message.analytics-user~#~char",
"customproperty14": "call1.message.created-by.id~#~char" },
"call": [
{
"name": "call1",
"connection": "acctAuth",
"url": "https://domain/api/users/${account.accountID}",
"httpMethod": "PUT",
"httpParams": "{\"login\":\"${user.username}\",\"email\":\"${user.customproperty1}\",\"firstname\":\"${account.customproperty2}\",\"lastname\":\"${account.customproperty3}\",\"fullname\":\"${account.customproperty4}\",\"mention-name\":\"${account.customproperty5}\",\"company\":\"IN10\",\"cost-center\":\"IN1019624\",\"purchasing-user\":\"${requestAccessAttributes.customproperty8}\",\"expense-user\":\"${requestAccessAttributes.customproperty9}\",\"sourcing-user\":\"${requestAccessAttributes.customproperty10}\",\"inventory-user\":\"${requestAccessAttributes.customproperty11}\",\"contracts-user\":\"${requestAccessAttributes.customproperty12}\",\"analytics-user\":\"${requestAccessAttributes.customproperty13}\"}",
"httpHeaders": {
"X-COUPA-API-KEY": "${access_token}",
"Accept": "application/json" },
"httpContentType": "application/json",
"successResponses": {
"statusCode": [
200
]
}
}
]
}
Please advise,
Thank you
06/20/2024 06:02 AM
Send authorization in httpHeader
"Authorization": "${access_token}",
06/21/2024
02:07 AM
- last edited on
06/21/2024
02:48 AM
by
Sunil
Hi,
I have added and still the same and now we get
2024-06-21T11:00:02+02:00-ecm-worker-rest.RestUtilService-quartzScheduler_Worker-10-xqjqw-DEBUG-Got null response statusCode with erroMsg - [error:Error Illegal character in path at index 43: https://domain/api/users/${account.name}]
and
{"call1":{"headers":null,"message":"","statusCode":null,"description":null,"status":"Failed"}}
Logs attached in the following ticket
Please advise urgently thanks a lot,
Ibra
[This message has been edited by moderator to disable url hyperlink]
06/21/2024 07:44 AM
Share current JSON
06/24/2024 01:25 AM
Import account
{
"accountParams": {
"connection": "acctAuth",
"processingType": "SequentialAndIterative",
"call": {
"call1": {
"callOrder": 0,
"stageNumber": 0,
"http": {
"url": "https://domain/api/users",
"httpContentType": "application/json",
"httpMethod": "GET",
"httpHeaders": {
"Authorization": "${access_token}",
"Accept": "application/json"
}
},
"listField": "",
"keyField": "accountID",
"colsToPropsMap": {
"accountID": "id~#~char",
"name": "login~#~char",
"status": "active~#~char",
"customproperty5": "active~#~char",
"customproperty1": "email~#~char",
"customproperty2": "firstname~#~char",
"customproperty3": "lastname~#~char",
"customproperty4": "mention-name~#~char",
"customproperty7": "active~#~char",
"customproperty14": "created-at~#~char",
"customproperty15": "sso-identifier~#~char",
"customproperty16": "employee-number~#~char",
"customproperty31": "STORE#ACC#ENT#MAPPINGINFO~#~char"
},
"pagination": {
"offset": {
"offsetParam": "offset",
"batchParam": "limit",
"batchSize": 50,
"totalCountPath": 85000
}
}
}
},
"acctEntMappings": {
"Roles": {
"importAsEntitlement": true,
"listPath": "roles",
"idPath": "id",
"keyField": "entitlementID",
"colsToPropsMap": {
"entitlementID": "id~#~char",
"entitlement_value": "name~#~char",
"customproperty1": "description~#~char"
}
}
}
},
"entitlementParams": {
"connection": "acctAuth",
"processingType": "SequentialAndIterative",
"entTypes": {
"Roles": {"entTypeOrder": 0,
"entTypeLabels": {
"customproperty1": "Meta Created"
},
"call": {
"call1": {
"connection": "acctAuth",
"callOrder": 0,
"stageNumber": 1,
"http": {
"httpHeaders": {
"Authorization": "${access_token}",
"Accept": "application/json"
},
"url": "https://domain/api/roles",
"httpContentType": "application/json",
"httpMethod": "GET"
},
"listField": "",
"keyField": "entitlementID",
"colsToPropsMap": {
"entitlementID": "id~#~char",
"entitlement_value": "name~#~char",
"description": "description~#~char"
},
"pagination": {
"offset": {
"offsetParam": "offset",
"batchParam": "limit",
"batchSize": 50,
"totalCountPath": 10000
}
}
}
}}
}
},
"acctEntParams": {
"processingType": "acctToEntMapping"
}
}
--------
CREATE ACCOUNT
{
"accountIdPath": "call1.message.id",
"responseColsToPropsMap": {
"displayName": "call1.message.fullname~#~char",
"customproperty1": "call1.message.email~#~char",
"customproperty2": "call1.message.firstname~#~char",
"customproperty3": "call1.message.lastName~#~char",
"name": "call1.message.login~#~char",
"customproperty5": "call1.message.mention-name~#~char",
"customproperty16": "call1.message.sso-identifier~#~char"
},
"call": [
{
"name": "call1",
"connection": "acctAuth",
"url": "https://domain/api/users/",
"httpMethod": "POST",
"httpParams": "{\"login\":\"${user.locationdesc}\",\"sso-identifier\":\"${user.locationdesc}\",\"active\":false,\"email\":\"${user.email}\",\"firstname\":\"${user.firstname}\",\"lastname\":\"${user.lastname}\",\"fullname\":\"${user.displayname}\",\"band\":\"${user.employeeclass}\",\"sharp-user-id\":\"${user.username}\",\"phone-work\":\"${user.phonenumber}\",\"roles\":{\"role\":{\"name\":\"ABI Read Only\"}},\"default-address\":{\"country\":{\"code\":\"${user.country}\"},\"city\":\"\",\"street1\":\"${user.street}\",\"postal-code\":\"${user.customproperty31}\",\"state\":\"${user.customproperty58}\"},\"default-currency\":{\"code\":\"USD\"},\"requisition-approval-limit\":{\"name\":\"${user.country}-${user.employeeclass}\"},\"invoice-approval-limit\":{\"name\":\"${user.country}-${user.employeeclass}\"},\"authentication-method\":\"saml\"}",
"httpHeaders": {
"accessToken": "${access_token}",
"Accept": "application/json"
},
"httpContentType": "application/json",
"successResponses": {
"statusCode": [
200,
201
]
}
}
]
}
-----
UPDATE ACCOUNT
{
"accountIdPath": "call1.message.id",
"responseColsToPropsMap": {
"accountID": "id~#~char",
"name": "login~#~char",
"status": "active~#~char",
"customproperty5": "active~#~char",
"customproperty1": "email~#~char",
"customproperty2": "firstname~#~char",
"customproperty3": "lastname~#~char",
"customproperty4": "mention-name~#~char",
"customproperty7": "active~#~char",
"customproperty14": "created-at~#~char",
"customproperty15": "sso-identifier~#~char",
"customproperty16": "employee-number~#~char",
"customproperty31": "STORE#ACC#ENT#MAPPINGINFO~#~char"
},
"call": [
{
"name": "call1",
"connection": "acctAuth",
"url": "https://domain/api/users/${account.name}",
"httpMethod": "PUT",
"httpParams": "{\"login\":\"${user.username}\",\"email\":\"${user.customproperty1}\",\"firstname\":\"${account.customproperty2}\",\"lastname\":\"${account.customproperty3}\",\"fullname\":\"${account.customproperty4}\",\"mention-name\":\"${account.customproperty5}\",\"company\":\"IN10\",\"cost-center\":\"IN1019624\",\"purchasing-user\":\"${requestAccessAttributes.customproperty8}\",\"expense-user\":\"${requestAccessAttributes.customproperty9}\",\"sourcing-user\":\"${requestAccessAttributes.customproperty10}\",\"inventory-user\":\"${requestAccessAttributes.customproperty11}\",\"contracts-user\":\"${requestAccessAttributes.customproperty12}\",\"analytics-user\":\"${requestAccessAttributes.customproperty13}\"}",
"httpHeaders": {
"X-COUPA-API-KEY": "${access_token}",
"Accept": "application/json",
"Authorization": "${access_token}"
},
"httpContentType": "application/json",
"successResponses": {
"statusCode": [
200
]
}
}
]
}
---
ENABLE
{
"call": [
{
"name": "call1",
"connection": "acctAuth",
"url": "https://domain/api/users/${account.accountID}",
"httpMethod": "PUT",
"httpParams": "{\"active\":true}",
"httpHeaders": {
"X-COUPA-API-KEY": "${access_token}",
"Accept": "application/json" },
"Authorization": "${access_token}",
"httpContentType": "application/json",
"successResponses": {
"statusCode": [
200
]
}
}
]
}
---
ADD ACCESS
{
"call": [
{
"name": "Roles",
"connection": "acctAuth",
"url": "https://domain/api/users/${account.name}",
"httpMethod": "PUT",
"httpParams": "{\"roles\":{\"role\":{\"name\":\"${entitlementValue.entitlement_value}\"}}}",
"httpHeaders": {
"X-COUPA-API-KEY": "${access_token}",
"Accept": "application/json" },
"Authorization": "${access_token}",
"httpContentType": "application/json",
"successResponses": {
"statusCode": [
200,
201
]
}
},
{
"name": "User Group",
"connection": "acctAuth",
"url": "https://domain/api/user_group_memberships",
"httpMethod": "POST",
"httpParams": "{\"user-group-id\": ${entitlementValue.entitlementID},\"user-id\": ${account.accountID}}",
"httpHeaders": {
"X-COUPA-API-KEY": "${access_token}",
"Accept": "application/json" },
"Authorization": "${access_token}",
"httpContentType": "application/json",
"successResponses": {
"statusCode": [
201
]
}
},
{
"name": "Business Group",
"connection": "acctAuth",
"url": "https://domain/api/users/${account.name}",
"httpMethod": "PUT",
"httpParams": "{\"content-groups\":[{\"id\": ${entitlementValue.entitlementID}}]}",
"httpHeaders": {
"X-COUPA-API-KEY": "${access_token}",
"Authorization": "${access_token}",
"Accept": "application/json" },
"httpContentType": "application/json",
"successResponses": {
"statusCode": [
201,
200
]
}
}
]
}
---
PLEASE FIND ABOVE JSONS
06/24/2024 09:35 PM
In create account JSON change
"accessToken": "${access_token}", to
"Authorization": "${access_token}",