08/19/2022 06:36 AM
Good morning team! Looking to add a 3rd call into the MultiCall option for a REST based connection but the ${userIdentifier} variable is not populated in the third call (works great in the second call). I tried saving it into a custom variable in the second call to then reference in the third call but no dice.
Any Advice?
This is v2021.
08/19/2022 11:23 AM
Can you share JSON
08/19/2022 11:36 AM
Sure thing, URLs redacted but queryString params left intact.
{
"type": "multiCall",
"call": [
{
"name": "SFCall1",
"connection": "SFAuth",
"url": "https://<redacted>/odata/v2/User?%24filter=userId%20eq%2012001309%20or%20userId%20eq%2012001310",
"httpMethod": "GET",
"httpHeaders": {
"Content-Type": "application/json",
"Authorization": "${access_token}",
"Accept": "application/json"
},
"colsToPropsMap": {
"username": "userId~#~char",
"systemUserName": "empId~#~char",
"firstName": "firstName~#~char",
"preferedFirstName": "nickname~#~char",
"middlename": "mi~#~char",
"lastName": "lastName~#~char",
"employeeid": "empId~#~char",
"employeeType": "custom04~#~char",
"phonenumber": "businessPhone~#~char",
"street": "",
"city": "city~#~char",
"state": "state~#~char",
"country": "country~#~char",
"companyname": "",
"customproperty1": "userId~#~char",
"customproperty2": "empId~#~char",
"customproperty3": "custom04~#~char",
"customproperty4": "firstName~#~char",
"customproperty5": "nickname~#~char",
"customproperty6": "mi~#~char",
"customproperty7": "lastName~#~char",
"customproperty8": "email~#~char",
"customproperty9": "city~#~char",
"customproperty10": "state~#~char",
"customproperty11": "country~#~char",
"customproperty13": "custom07~#~char",
"customproperty14": "department~#~char",
"customproperty15": "jobcode~#~char",
"customproperty16": "location~#~char",
"customproperty18": "businessPhone~#~char",
"customproperty23": "status~#~char"
},
"userResponsePath": "d.results"
},
{
"name": "SFCall2",
"connection": "SFAuth",
"url": "https://<redacted>/odata/v2/EmpJob?%24filter=userId%20eq%20${userIdentifier}",
"httpMethod": "GET",
"httpHeaders": {
"Content-Type": "application/json",
"Authorization": "${access_token}",
"Accept": "application/json"
},
"colsToPropsMap": {
"username": "userId~#~char",
"manager": "managerId~#~char",
"costcenter": "costCenter~#~char",
"customproperty12": "countryOfCompany~#~char",
"customproperty17": "managerId~#~char",
"customproperty25": "costCenter~#~char",
"customproperty26": "contractEndDate~#~epochdate",
"customproperty27": "customString102~#~char"
},
"userResponsePath": "d.results"
},
{
"name": "SFCall3",
"connection": "SFAuth",
"url": "https://<redacted>/odata/v2/EmpEmployment?%24filter=userId%20eq%20${userIdentifier}",
"httpMethod": "GET",
"httpHeaders": {
"Content-Type": "application/json",
"Authorization": "${access_token}",
"Accept": "application/json"
},
"colsToPropsMap": {
"username": "userId~#~char",
"customproperty19": "originalStartDate~#~epochdate",
"customproperty20": "startDate~#~epochdate",
"customproperty21": "endDate~#~epochdate",
"customproperty22": "lastDateWorked~#~epochdate"
},
"userResponsePath": "d.results"
}
]
}
08/19/2022 12:33 PM
from where ${userIdentifier} is get populated?
check if below is useful.
02/23/2023 01:40 AM
Hi Rushi,
The MultiCall in UserImportJson is executing only the first call. It does not execute the second call.
Any inputs?
08/19/2022 12:42 PM
Thanks @rushikeshvartak. ${userIdenifier} is populated automatically by Saviynt as part of the multicall. I do not set it. I tried to set it using the approach in the article but the third call cannot see the variable.
I have looked at that community article but the recommended solution is not helpful in this case
08/20/2022 04:57 AM
What's value of userIdentifier?
Try if you can set value in connection with another variable name & fetch in import json
Connection Json
UserIdentifierConn :"${userIdentifier}"
&
Import json
${connection.userIdentifierConn}
08/20/2022 11:06 AM
@rushikeshvartak , the value of ${userIdentifier} is dynamic. The way multicall works is the first call is run, and then each subsequent call is run for every user. The accountID value is mapped to ${userIdentifier} and then call2 is run. Call2 is run for every user and ${userIdentified} is updated for each call. You cannot set this value in the connectionJSON as it is dynamic.
08/20/2022 06:26 PM
For the time being, I have duplicated the connection and used another multicall in the UserImportJSON to pick up the data I need.
02/23/2023 03:22 AM
Hi @vermilyacd1,
If MultiCall option is not working with the ${userIdentifier} binding variable, have you tried using ${response.SFcall1.message.userId} to be called in the subsequent calls ?