Click HERE to see how Saviynt Intelligence is transforming the industry. |
02/13/2024 09:33 AM
PostMan call for Invite User to the InContact Application is as follows
Tried adding this to the CreateAccount JSON Call 2 and getting the following error.
Task Response: {"call1":{"headers":"","message":{"success":true,"uuid":"11eeca92-79f1-3170-8427-0242ac110004","msg":"User created on Evolve"},"statusCode":200,"description":null,"status":"Success"},"call2":{"message":"Unexpected character ('1' (code 49)): was expecting comma to separate Object entries\n at [Source: {\"inviteUserIds\": \"[\"11eeca92-79f1-3170-8427-0242ac110004\"]\",\"senderUserId\": \"11ee7e46-55e9-56b0-876a-0242ac110003\"}; line: 1, column: 23]","status":"Failed"}}.
Attaching the JSON for reference. Kindly let me know what I'm doing wrong.
{
"accountIdPath": "call1.message.uuid",
"call": [
{
"name": "call1",
"connection": "acctAuth",
"showResponse": true,
"url": "https://xyz/user-management/v1/users",
"httpMethod": "POST",
"httpParams": "{\"firstName\":\"${user.preferedFirstName}\",\"lastName\":\"${user.customproperty2}\",\"externalIdentity\":\"${user.email}\",\"emailAddress\":\"${user.email}\",\"role\":\"${user.customproperty15}\",\"teamid\":\"${user.customproperty17}\",\"country\":\"${user.country}\",\"hireDate\":\"${user.startdate.toString().substring(0,10)}\"}",
"httpHeaders": {
"Authorization": "${access_token}",
"Accept": "application/json"
},
"httpContentType": "application/json",
"successResponses": {
"statusCode": [
200,
201
]
}
},
{
"name": "call2",
"connection": "acctAuth",
"showResponse": true,
"url": "https://xyz/user-management/v1/users/invite",
"httpMethod": "POST",
"httpParams": "{\"inviteUserIds\": \"[\"${response.call1.message.uuid}\"]\",\"senderUserId\": \"11ee7e46-55e9-56b0-876a-0242ac110003\"}",
"httpHeaders": {
"Authorization": "${access_token}",
"Accept": "application/json"
},
"httpContentType": "application/json",
"successResponses": {
"statusCode": [
200,
201
]
}
}
]
}
Solved! Go to Solution.
02/13/2024 10:03 AM
HI @SowmithriV , just a guess , can you try :
"httpParams": "{\"inviteUserIds\": \"${response.call1.message.uuid}\",\"senderUserId\": \"11ee7e46-55e9-56b0-876a-0242ac110003\"}"
Please enable showLogs true in config json and share logs if this doesn't work.
Thanks, Amit
If helped, please ACCEPT SOLUTION to close thread and for others to know that it worked.
02/13/2024 10:09 AM
Thanks for the input @Amit_Malik. The tricky part was to represent the userID in array [] with valid JSON syntax. I was able to figure it out myself.
Below Syntax worked for me,
"httpParams": "{\"inviteUserIds\": [\"${response.call1.message.uuid}\"],\"senderUserId\": \"11ee7e46-55e9-56b0-876a-0242ac110003\"}",