Announcing the SAVIYNT KNOWLEDGE EXCHANGE unifying the Saviynt forums, documentation, training, and more in a single search tool across platforms. Click HERE to read the Announcement.

Manager - User Import without username

Naveen_Talanos
Regular Contributor
Regular Contributor

Hi Experts,

Please help

My source of truth is DB where I do not have username but users are uniquely identified by EmployeeID. The relation between user and Manager is also with EmployeeID.

I have to generate username in Saviynt (that is another problem, for now I am using OOTB username generation rule).

Now, when I am importing users, since username is generated in Saviynt, users are not getting linked to their managers. To solve this I wrote PREPROCESSOR as below:

{
"ADDITIONALTABLES": {
"USERS": "SELECT username,employeeid from USERS "
},
"COMPUTEDCOLUMNS": [
"MANAGER"
],
"TABLEINDEXES": {
"currentusers": [
"username",
"employeeid"
]
},
"PREPROCESSQUERIES": [
"UPDATE NEWUSERDATA SET NEWUSERDATA.MANAGER=(select CURRENTUSERS.USERNAME from CURRENTUSERS where CURRENTUSERS.EMPLOYEEID = NEWUSERDATA.CUSTOMPROPERTY10)"
]
}

*CUSTOMPROPERTY10 has Manager's Employee number for user

This Preprocessor is working well and assigning manager correctly but the problem is coming when Manager is a new user and he/she is assigned as manager to existing users. So when the import runs, since this "new" manager user is not yet in "CURRENTUSERS" table, the manager field of existing users is cleared. 

Only when the full import job runs second time the manager is assigned correctly as by this run the "new manager" is already created. If I run incremental import this change is never picked up the second time. 

Could you please help and advise how can I assign manager when there is no username in source?

And if my PREPROCESSOR is correct then how can I mitigate the scenario where manager of existing user is cleared when manager is new employee.

Regards,

Naveen

2 REPLIES 2

ManishAcharya
Saviynt Employee
Saviynt Employee

Please try this:

"UPDATE NEWUSERDATA SET NEWUSERDATA.OWNER=(select CURRENTUSERS.USERNAME from CURRENTUSERS where CURRENTUSERS.EMPLOYEEID = NEWUSERDATA.CUSTOMPROPERTY10)"

rushikeshvartak
All-Star
All-Star

Whenever you update owner field of users saviynt automatically find manager and mapped to user


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