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
No ratings
SB
Saviynt Employee
Saviynt Employee

Use Case

How to escape special characters of user attributes used for email generation rule.

If there are special characters in the user attributes used for email generation, the following can be done to escape them in order to configure the email without those special characters.


A few such scenarios have been mentioned below:

  • When the user attribute has a space in the name. eg - Firstname= Mario Rivero
  • When the user attribute uses an apostrophe, eg - FirstName = J'ose
  • When the user attribute has an additional '.' , eg - FirstName = Jr. Stallion

 

Pre-requisites
NA

Applicable Version(s)

All

Solution

This can be done by replacing the required special character in the email generation rule.

Admin -> Global Configurations -> Identity LifeCycle -> Email Generation Rule -> Edit Rule -> Advanced Config -> Modify the SQL query to replace the special character as per requirement as shown in the example below.

Note:

In the example shown below, the email creation format is "firstname_lastname@email.com". With the first replace function, we're removing spaces from the users first name, in the second we're removing an apostrophe from the users first name and finally the dot.

concat(replace(replace(replace(users.firstname,' ',''),'''',''),'.',''),'_',replace(replace(replace(users.lastname,' ',''),'''',''),'.',''),'@email.com')


In case the email creation rule format was only "fisrstname@email.com", and the requirement was to only remove any additional spaces, the SQL query would be as follows: concat(replace(users.firstname,' ',''),'@email.com')

For special characters like single quotes, do not forget to escape it appropriately in the replace function.

Comments
rushikeshvartak
All-Star
All-Star

can we use dataset function?

SB
Saviynt Employee
Saviynt Employee

@rushikeshvartak I have not used dataset function in email rule but you can certainly give it a try.

Version history
Last update:
‎08/06/2023 08:43 PM
Updated by:
Saviynt Employee
Contributors