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

Email Generation rule by advance query (If duplicate firstname and lastname found then increment)

Som9800
New Contributor
New Contributor

Hi Team,

our current email generation rule is configured based on internal and external users.

If user is internal then concat firstname and last name after that @internal.abc.com.

If user is external then concat firstname and last name after that @external.abc.com.

Sample query:

--------------------

case when (users.employeeType='Internal') THEN concat(users.firstname,'.',users.lastname,'@access2quadrupel.com') ELSE concat(users.firstname,'.',users.lastname,'@external.access2quadrupel.com') END

BUT we are having one more requirement where if firstname and lastname are already present then the email generate rule should create another email with increment values.

 Example: sam.doe1@domain.com , sam.doe2@domain.com , sam.doe3@domain.com.

 

Kindly help on this

Thanks,

Saumya

 

 

 

1 REPLY 1

rushikeshvartak
All-Star
All-Star

Sample logi c

case when (users.employeeType='Internal') THEN concat(users.firstname,'.',users.lastname,'@access2quadrupel.com')
	when (users.employeeType='Internal') and (username=concat(users.firstname,'.',users.lastname,'@access2quadrupel.com'))THEN concat(users.firstname,'.',users.lastname,'1@access2quadrupel.com')
	when (users.employeeType='Internal') and (username=concat(users.firstname,'.',users.lastname,'@1access2quadrupel.com'))THEN concat(users.firstname,'.',users.lastname,'2@access2quadrupel.com')
	when (users.employeeType='External') THEN  concat(users.firstname,'.',users.lastname,'@external.access2quadrupel.com') 
	when (users.employeeType='External') and (username=concat(users.firstname,'.',users.lastname,'@external.access2quadrupel.com'))THEN concat(users.firstname,'.',users.lastname,'1@access2quadrupel.com')
	when (users.employeeType='External') and (username=concat(users.firstname,'.',users.lastname,'@1external.access2quadrupel.com'))THEN concat(users.firstname,'.',users.lastname,'2@access2quadrupel.com')
	END

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