Click HERE to see how Saviynt Intelligence is transforming the industry. |
10/14/2024 08:58 AM
Hi all,
I'm working on a multi-call setup to retrieve employee details from DayForce using a rest connection that involves two API calls. The first call (call1) fetches the XRefCode, which I need to pass into the second call (call2) to retrieve the employee's details.
Problem: The first call works perfectly when run in isolation, returning the correct XRefCode. However, when I set up the multi-call scenario, the second call fails because it doesn't seem to receive the XRefCode from the first call.
The error I'm seeing is: Error while getting User Import Response WebService call failed with responseStatusCode null
Failed url-/${call1.response.Data.XRefCode}.json with Error Message-null
Error In Getting Response In pullObjectsByRest
NullResponseFromTarget
{
"type":"multiCall",
"call":[
{
"name":"call1",
"connection":"userAuth",
"url":"https://URL",
"httpMethod":"GET",
"httpHeaders":{
"Content-Type":"application/json",
"Authorization":"${access_token}"
},
"colsToPropsMap":{
"username":"XRefCode~#~char"
},
"userResponsePath":"Data"
},
{
"name":"call2",
"connection":"userAuth",
"callCondition":"${response.call1.message.Data.size()>0}",
"url":"URL/${call1.response.Data.XRefCode}.json",
"httpMethod":"GET",
"httpHeaders":{
"Authorization":"${access_token}"
},
"colsToPropsMap":{
"username":"EmployeeNumber~#~char",
"employeeid":"EmployeeNumber~#~char",
"firstname":"FirstName~#~char",
"lastname":"LastName~#~char",
"statuskey":"EmploymentStatuses.Items[0].EmploymentStatus.XRefCode~#~char"
},
"userResponsePath":"Data"
}
]
}
Even though call1 returns the XRefCode, the second call is still failing. I'm not sure why the XRefCode isn't being passed properly.
Any suggestions or insights on how to fix this would be greatly appreciated!
10/14/2024 09:42 AM
10/15/2024 02:29 AM
10/14/2024 09:50 AM
@Leofrancis use this
"url":"URL/${response.call1.Data.XRefCode}.json",
10/15/2024 02:29 AM
still the same issue
10/15/2024 02:47 AM
@Leofrancis i believe then it is not supported to reference call1 response in call2 for user import.
10/15/2024 02:58 AM
hello @Leofrancis
Reference from the previous calls is supported only in provisioning JSONs