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

Email not getting generated when property mapping is present

sdey_2023
New Contributor III
New Contributor III

Hi Team,

While trying to perform user Import via DB connector, we have the requirement of generating User email (from Saviynt Email Generation Rule in Global Config) when new users will be imported from HR source and if there is any User having email present in the auth source already, then no email will be generated in Saviynt and the existing email will be populated. 

We have the mapping for email defined under mapper description as below:

<mapfield saviyntproperty="email" sourceproperty="work_email" type="character"></mapfield>

Also, the property, <generateEmail>true</generateEmail> is defined.

If there is any email value present in the auth source "work_email" field, Saviynt is able to import and map it to Email field of the User but the issue is that if there is no email value, Saviynt is considering it as null and not generating the email although if we remove the mapping given above, it is able to generate the email correctly.

Please help to resolve this. Thanks.

1 REPLY 1

shivmano
Regular Contributor III
Regular Contributor III

@sdey_2023 I believe the email generation rule is evaluated after the import completes. Have you tried generating email based on the condition if email exists or not for the user? Perhaps the below case statement for email generation rule? 

case when (users.email is NULL) THEN concat(users.firstname, substring('.',1,1), users.lastname, substring('@domain.com',1,11)) END