Saviynt unveils its cutting-edge Intelligence Suite products to revolutionize Identity Security!
Click HERE to see how Saviynt Intelligence is transforming the industry.
Saviynt Copilot Icon

Create contractor ID using user form and bulk upload

Shubhamjain27
Regular Contributor II
Regular Contributor II

Hi Everyone,

We have a requirement where we need to create contractor IDs whenever a new contractor is onboarded using Saviynt user form or user bulk upload.

Format - CO<5 digits> eg: CO00001

We can have one dynamic attribute and map to user Employee ID but this will only work when done through user form.

Below are the questions:

1. How we can create contractor ID for the users uploaded through csv file

2. If we submit request using user form and it is under pending approval. And then if we submit a new request using user form, is it going to use the same contractor ID for the request pending approval or increment to it?

Any answers would be appreciated

4 REPLIES 4

rushikeshvartak
All-Star
All-Star

You can import using User Management - Upload User Account which will follow Workflow.

rushikeshvartak_0-1716485512118.png

1. How we can create contractor ID for the users uploaded through csv file - As mentioned above

2. If we submit request using user form and it is under pending approval. And then if we submit a new request using user form, is it going to use the same contractor ID for the request pending approval or increment to it?  Its based on workflow configured in global configuration

 

 


Regards,
Rushikesh Vartak
If this helped you move forward, click 'Kudos'. If it solved your query, select 'Accept As Solution'.

Apologies! I missed to add the question properly:

1. How we can upload users through csv and have contractor ID populated automatically. It can be done through pre-processor but do you have a sample pre-processor for the same? Contractor ID format is CO00001

https://forums.saviynt.com/t5/saviynt-knowledge-base/how-to-auto-increment-user-id-in-username-gener...


Regards,
Rushikesh Vartak
If this helped you move forward, click 'Kudos'. If it solved your query, select 'Accept As Solution'.

Working with the pre-processor. Below is the JSON:

{
"ADDITIONALTABLES": {
"USERS": "SELECT userkey,employeeid,username from users",
"REQUEST_ACCESS_ATTRS": "select attribute_value,attribute_name from REQUEST_ACCESS_ATTRS where attribute_name = 'employeeid' and attribute_value like 'CO0%'"
},
"COMPUTEDCOLUMNS": [
"employeeid",
"attribute_value"
],
"PREPROCESSQUERIES": [
"UPDATE NEWUSERDATA SET employeeid=(select concat('CO',case when (length(greatest(max(substring(raa.attribute_value,3,length(raa.attribute_value)))+1 , MAX(substring(u.employeeid, 3, length(u.employeeid)))+1)) = 1) then concat('0000', CONVERT(greatest(max(substring(raa.attribute_value,3,length(raa.attribute_value)))+1 , MAX(substring(u.employeeid, 3, length(u.employeeid)))+1),CHAR)) when (length(greatest(max(substring(raa.attribute_value,3,length(raa.attribute_value)))+1 , MAX(substring(u.employeeid, 3, length(u.employeeid)))+1)) = 2) then concat('000', CONVERT(greatest(max(substring(raa.attribute_value,3,length(raa.attribute_value)))+1 , MAX(substring(u.employeeid, 3, length(u.employeeid)))+1),CHAR)) when (length(greatest(max(substring(raa.attribute_value,3,length(raa.attribute_value)))+1 , MAX(substring(u.employeeid, 3, length(u.employeeid)))+1)) = 3) then concat('00', CONVERT(greatest(max(substring(raa.attribute_value,3,length(raa.attribute_value)))+1 , MAX(substring(u.employeeid, 3, length(u.employeeid)))+1),CHAR)) when (length(greatest(max(substring(raa.attribute_value,3,length(raa.attribute_value)))+1 , MAX(substring(u.employeeid, 3, length(u.employeeid)))+1)) = 4) then concat('0', CONVERT(greatest(max(substring(raa.attribute_value,3,length(raa.attribute_value)))+1 , MAX(substring(u.employeeid, 3, length(u.employeeid)))+1),CHAR)) END) AS ID from CURRENTREQUEST_ACCESS_ATTRS raa,CURRENTUSERS u where u.employeeid like 'CO0%' and length(u.employeeid) = 7)"
]
}