Click HERE to see how Saviynt Intelligence is transforming the industry. |
12/11/2023 05:44 AM - last edited on 12/11/2023 07:14 AM by Dave
Hi everyone,
I'm trying to use a multicall to import users. My initial call is working just fine. My second call fails with Missing username for the record.
The issue seems to be, that i have not set a username in call2. Unfortunately, the username is not returned in the second call. Is there any way to use the id from call1 (e.g. from the response)?
Or do you have any othe ridea, how I could approach that?
{ "type":"multiCall",
"call":[
{ "name":"call1",
"connection":"acctAuth",
"url":"https://<URL>/v1/people/search",
"httpMethod":"POST",
"httpParams":"{<Application Specific Params>}",
"httpHeaders":{
"Authorization":"${access_token}",
"contentType":"application/json"
},
"httpContentType":"application/json",
"userResponsePath":"employees",
"colsToPropsMap":{
"id":"id~#~char",
"username":"id~#~char",
"systemUserName":"email~#~char"
}
},
{ "name":"call2",
"connection":"acctAuth",
"url":"https://<URL>/v1/people/${userIdentifier}",
"httpMethod":"POST",
"httpParams":"{\"fields\": [\"internal.lifecycleStatus\"], <Application Specific Params>}",
"httpHeaders":{
"Authorization":"${access_token}",
"contentType":"application/json"
},
"httpContentType":"application/json",
"userResponsePath":"internal",
"colsToPropsMap":{
"username": "????",
"customproperty4":"lifecycleStatus~#~char"
}
}]}
I can get all basic info from the initial call (call1), but I need to fetch custom fields after that. This is done, by appending the username (Human Resources ID) the username to the search URL.
The call2 only returns something like and it seems not possible to add the id in the response:
{
"internal": {
"lifecycleStatus": "Employed"
}
}
I already tried to
[This post has been edited by a Moderator to merge two posts.]
Solved! Go to Solution.
12/11/2023 10:08 AM
${call1.message.id}
12/12/2023 02:17 AM
Unfortunately, that didn't work out, as the variable was not resolved in the call.
Gladly, I was able to get the username attribute via API in the call.
Thanks for your help @rushikeshvartak