We are delighted to share our new EIC Delivery Methodology for efficiently managing Saviynt Implementations and delivering quick time to value. CLICK HERE.

Username generation autoincrement not working

TheSaviyntBoy
New Contributor II
New Contributor II

Hi everyone, 

I have a usecase where I have to generate username based on a customproperty of a user. When the user will get imported either via a connection or via CSV file, there will be a value in the customproperty40 of that user. The usecase to generate the username will go like(using advanced config): 

if customproperty40 = abc company name, username: firstname.lastname@abc.com or

if customproperty40 = def company name, username: firstname.lastname@def.com or

if customproperty40 = ghi company name, username: firstname.lastname@ghi.com or

if customproperty40 = jkl company name, username: firstname.lastname@jhl.com or

if customproperty40 = mno company name, username: firstname.lastname@mno.com

 

I am able to achieve this usecase via this query: 

case when (users.customproperty40 = 'abc company name' ) then concat(users.firstname, '.', users.lastname, '@abc.com')
when (users.customproperty40 = 'def company name' ) then CONCAT(users.firstname, '.', users.lastname, '@def.com')
when (users.customproperty40 = 'ghi company name' ) then CONCAT(users.firstname, '.', users.lastname, '@ghi.com')
when (users.customproperty40 = 'jkl company name' ) then CONCAT(users.firstname, '.', users.lastname, '@jkl.com')
when (users.customproperty40 = 'mno company name' ) then CONCAT(users.firstname, '.', users.lastname, '@mno.com') end

 

Now the thing is if an user comes along where the firstname and the lastname of that user is same to an already existing user, the user will not get created, this applies to all the five domains. I want to add autoincrement in such case where if the user has the same first and lastname of the exsiting user then the new user's username be like: 

firstname.lastname1@abc.com or

firstname.lastname1@def.com or 

firstname.lastname1@ghi.com or

firstname.lastname1@jkl.com or

firstname.lastname1@mno.com

 

Can anyone help me achieve this? 

 

Best Regards,

Thank you. 

3 REPLIES 3

Dhruv_Sharma
Saviynt Employee
Saviynt Employee

Hi @TheSaviyntBoy 

Please refer to the below post if it helps resovle your query.

Solved: Username Generation Logic - Saviynt Forums - 2240

Regards,
Dhruv Sharma
If this reply answered your question, please accept it as Solution to help others who may have a similar problem.

hi @Dhruv_Sharma ,

The solution you provided gives the direct approach from UI, but in my case, the system will have to check the value in customproperty40 (the values are: abc, def, ghi, jkl, mno) and then generate the username according to that value such as: firstname.lastname@abc.com and so on.

So I think we can't give a case or if condition to check the value in customproperty40 and generate the domain part of the username using only UI. And after generate the username, we still need to figure out the autoincrement logic in this. So thats the reason I am using advanced config here and want help in autoincrement.

Best Regards.

Hi @TheSaviyntBoy 

Can you try with DB function FN_EIC_SEQGEN('identifier') in your query. Please refer below for details.

Database Functions (saviyntcloud.com)

Regards,

Dhruv Sharma