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.

ImportUserJSON manager

Jillustre
New Contributor III
New Contributor III

Hi,

I have a connection with ImportUserJSON. If I want to fill the Manager field, IT need to be the userkey of the existing user of saviynt correct?

Because we have existing ImportUserJSON made by consultant and for Manager, it set the manager email and because of that I think it cause problem with the user update account each time our job run.

Can someone confirm me that Manager need userkey instead of email?

thanks

11 REPLIES 11

rushikeshvartak
All-Star
All-Star

Manager is always userkey but you can add username as owner field in users. Can you provide more info some missing info in post


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

Jillustre
New Contributor III
New Contributor III

ImportUserJSON

{
"connection":"userAuth",
"url":"",
"httpMethod":"GET",
"httpHeaders":{
"Accept":"application/json",
"Authorization":"${access_token}"
},
"colsToPropsMap":{
"USERNAME":"Email~#~char",
"CITY":"Job.LocationWork.City~#~char",
"COMPANYNAME":"Job.Company.Name~#~char",
"COSTCENTER":"Job.CostCenter~#~char",
"DISPLAYNAME":"Name.Formatted~#~char",
"EMAIL":"Email~#~char",
"EMPLOYEETYPE":"Job.EmploymentStatus.Name~#~char",
"EMPLOYEEID":"EmployeeNumber~#~char",
"FIRSTNAME":"Name.GivenName~#~char",
"JOB_ID":"Job.Id~#~char",
"JOB_FUNCTION":"Job.Title.JobCode~#~char",
"TITLE":"Job.Title.Name~#~char",
"LASTNAME":"Name.FamilyName~#~char",
"LOCATION":"Job.LocationWork.Name~#~char",
"LOCATIONNUMBER":"Job.LocationCode~#~char",
"MANAGER":"Manager.Email~#~char",


},
"errorCode":"400",
"errorCodePath":"errorCode",
"userResponsePath":""
}

I dont think it will map your manager to user. hence use pre processor to correctly map manager for user


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

Jillustre
New Contributor III
New Contributor III

So in the MODIFYUSERDATAJSON I'll add that there correct?

Yes 

https://saviynt.freshdesk.com/support/solutions/articles/43000635111-integration-options-with-the-sa...


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

Jillustre
New Contributor III
New Contributor III

@rushikeshvartak 

I have something like this for the preprocessqueries in ModififyUserDataJson.  I receive an error. Does I miss something? 

 

{
"ADDITIONALTABLES": {
"USERS": "SELECT STATUSKEY,CUSTOMPROPERTY1,MANAGER,OWNER FROM USERS"
},
"COMPUTEDCOLUMNS": [
"STATUSKEY",
"OWNER"
],
"TABLEINDEXES": {
"currentusers": [
"username",
"userkey"
]
},
"PREPROCESSQUERIES": [

"UPDATE NEWUSERDATA SET STATUSKEY = CASE WHEN CUSTOMPROPERTY1='Active' THEN '1' ELSE '0' END",
"UPDATE NEWUSERDATA JOIN CURRENTUSERS ON NEWUSERDATA.OWNER = CURRENTUSERS.USERNAME SET NEWUSERDATA.MANAGER = CURRENTUSERS.USERKEY"
]
}

what is error , just keep status query and check if its working

 

 


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

Jillustre
New Contributor III
New Contributor III

yeah with status it working fine ( thatat was something already there before I add the other update)

error on job history is :
Error - to Import Data correctly: Error in Users
Import - Error while processing data: Unknown
column 'TEMPNEWUSERS_472709.MANAGER' in 'field
list'

"UPDATE NEWUSERDATA JOIN CURRENTUSERS ON NEWUSERDATA.OWNER = CURRENTUSERS.USERNAME SET NEWUSERDATA.OWNER= CURRENTUSERS.USERNAME "

or 

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


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

Jillustre
New Contributor III
New Contributor III

Ok so by setting the Owner field it will set the Manager field?

Jillustre
New Contributor III
New Contributor III

I just try it it and instead of "MANAGER":"Manager.Email~#~char", I place  "OWNER":"Manager.Email~#~char", in ImportUser Json it work. so this is the fix.

@rushikeshvartak thanks