Click HERE to see how Saviynt Intelligence is transforming the industry. |
10/21/2024 02:42 AM
Hi All,
Im using REST connector to do UserImport, Below is the JSON response snippet from the Target Application. "work_email" holds email address of the manager.
since manager attribute stores Username, May I know what is the recommended step to map Manager?
{
"UserId": "66d9a66ffbc92325412d5",
"manager": {
"id": "66d9a66ffbc92695412d5",
"manager_id": "66c35e075b5885fd83061",
"number": 20,
"work_email": "vivek.r@email.com",
"status": "ACTIVE"
}
}
Solved! Go to Solution.
10/21/2024 03:04 AM
@vivekrajan1 use preprocessor query to fulfill the need.
Using email search for the manager record in saviynt db(query does the work) and map owner/manager field with it.
10/21/2024 03:48 AM
Does this work?
ImportUserJSON:(colsToPropsMap)
"manager":"manager.work_email"
PreProcessor Query:
UPDATE NEWUSERDATA NU SET NU.OWNER = (select USERNAME from CURRENTUSERS CU where CU.EMAIL = NU.MANAGER)
10/21/2024 04:18 AM
@vivekrajan1 have it reference to another customproperty and then change to get the username
Apart from that it looks fine.
10/21/2024 05:49 AM - edited 10/21/2024 05:54 AM
Thank you @NM ,
1 last update, when I try above query, I got below error, upon further checking there were multiple User records with same emailID, after doing a EmailID cleanup, Manager mapping is successful.
Thanks,
Vivek