Announcing the Saviynt Knowledge Exchange unifying the Saviynt forums, documentation, training,
and more in a single search tool across platforms. Read the announcement here.

Preprocessor is failing when using multi call API

Sudheer_Kaneti
New Contributor
New Contributor

Hi Team,

We are using Multi call API in Success factor Rest API connection,  the preprocessor which we are using failing when we run user Import Job.

Please find below our user import JSON.

{
"type": "multiCall",
"call": [

{
"name": "call1",
"connection": "userAuth",
"url": "*******",
"httpMethod": "GET",
"httpHeaders": {
"Authorization": "${access_token}",
"Accept": "application/json"
},
"colsToPropsMap": {
"username": "userId~#~char",
"enddate": "endDate~#~epochdate",
"COSTCENTER": "costCenter~#~char",
"customproperty1": "event~#~char"
},
"userResponsePath": "d.results"
},
{
"name": "call2",
"connection": "userAuth",
"showResponse": true,
"url": "**************",
"httpMethod": "GET",
"httpHeaders": {
"Authorization": "${access_token}",
"Accept": "application/json"
},
"statusConfig": {
"active": "t",
"inactive": "f"
},
"userResponsePath": "d.results",
"colsToPropsMap": {
"username": "userId~#~char",
"CUSTOMPROPERTY10": "username~#~char",
"city": "city~#~char",
"statuskey": "status~#~bool",
"location": "location~#~char",
"employeeType": "custom03~#~char",
"employeeclass": "custom02~#~char",
"title": "title~#~char",
"state": "state~#~char",
"phonenumber": "businessPhone~#~char",
"departmentname": "department~#~char",
"country": "country~#~char",
"street": "addressLine2~#~char",
"PREFEREDFIRSTNAME": "nickname~#~char",
"LEAVESTATUS": "custom06~#~char",
"customproperty2": "custom05~#~char",
"displayname": "defaultFullName~#~char",
"MIDDLENAME": "mi~#~char",
"LOCATIONDESC": "custom01~#~char",
"COMPANYNAME": "custom04~#~char",
"employeeid": "empId~#~char",
"startdate": "hireDate~#~epochdate",
"firstname": "firstName~#~char",
"lastname": "lastName~#~char",
"manager": "manager.userId~#~char"
}
}

]
}

 

Please find below Preprocessor query that we are using.

{
"ADDITIONALTABLES": {
"USERS": "SELECT * FROM USERS",
"DATASET_VALUES": "SELECT ATTRIBUTE1, ATTRIBUTE2,ATTRIBUTE3 FROM DATASET_VALUES"
},
"COMPUTEDCOLUMNS": [
"customproperty5",
"customproperty3",
"customproperty4",
"CUSTOMPROPERTY7"

],
"TABLEINDEXES": {
"CURRENTDATASET_VALUES": [
"ATTRIBUTE1",
"ATTRIBUTE2",
"ATTRIBUTE3"
]

},
"PREPROCESSQUERIES": [
"UPDATE NEWUSERDATA SET customproperty5 = concat((substring(companyname,-5,4)),(substring(LOCATIONDESC,-5,4)),(substring(location,-5,4)))",
"UPDATE NEWUSERDATA SET customproperty7 = substring(location,1,(char_length(location)-7))",
"Update NEWUSERDATA left join CURRENTDATASET_VALUES on CURRENTDATASET_VALUES.ATTRIBUTE1 = NEWUSERDATA.customproperty5 set NEWUSERDATA.customproperty3 = CURRENTDATASET_VALUES.ATTRIBUTE2",
"Update NEWUSERDATA left join CURRENTDATASET_VALUES on CURRENTDATASET_VALUES.ATTRIBUTE1 = NEWUSERDATA.customproperty5 set NEWUSERDATA.customproperty4 = CURRENTDATASET_VALUES.ATTRIBUTE3"


]
}

 

We are getting this below error response in the job.

Sudheer_Kaneti_0-1670421606560.png

The preprocessor query is working when we use two different connector instead of multi call API.

Can anyone please advice the solution for this issue.

Thank you,

Sudheer Kaneti

 

 

 

2 REPLIES 2

rushikeshvartak
All-Star
All-Star

Can we switch call 1 & call2


Regards,
Rushikesh Vartak
If you find the response useful, kindly consider selecting Accept As Solution and clicking on the kudos button.

Sudheer_Kaneti
New Contributor
New Contributor

Hi Rushikesh,

In call 1 we are calling EmpJob entity

In call2 we are calling Users entity.

I did switching call 1 and call2  and vice versa. What I have observed is the preprocessor queries are working as expected but call1 (EmpJob) data is not getting imported even I switch calls and run the user import jobs.

Thank you,

Sudheer Kaneti