Announcing the Saviynt Knowledge Exchange unifying the Saviynt forums, documentation, training,
and more in a single search tool across platforms. Read the announcement here.

Email Generation Failing using Advanced Config

ssrnitish
New Contributor III
New Contributor III

Hi All,

we are trying to generate Email for New users using the "Email Generation Rule" configuration present in Global configuration.

Email Generation logic : systemUserName@domain

If we are using Basic config as below, then email is getting generated successfully for new users during import.

ssrnitish_0-1678789457282.png

 

But if we are using Advanced config, email generation is not working. We tried with below various approaches but none of them is working. (Note: We are using Advanced config since we need to calculate email domain based upon locationnumber)

Approach 1: CASE WHEN (users.locationnumber in ('8301','8401')) THEN concat(users.systemUserName,'@domain1.COM') ELSE concat(users.systemUserName,'@domain2.COM') END

======================================

Approach 2: CASE when (users.locationnumber = '8301' or users.locationnumber = '8401') THEN concat(users.systemUserName,'@domain1.COM') ELSE concat(users.systemUserName,'@domain2.COM') END
======================================

Approach 3: CASE when users.locationnumber = '8301' THEN concat(users.systemUserName,'@domain1.COM') when users.locationnumber = '8401' THEN concat(users.systemUserName,'@domain1.COM') ELSE concat(users.systemUserName,'@domain2.COM') END
======================================

Approach 4: concat(users.systemUserName,'@domain.COM')

 

In debug logs, we can see below message with "All rules exausted".

2023-03-09T20:40:35+01:00-ecm-{"log":"2023-03-09 19:40:34,558 [http-nio-8080-exec-113] DEBUG services.WorkflowService - All rules exausted. Unable to generate email\n","stream":"stdout","time":"2023-03-09T19:40:34.558143408Z"}

Note: Instead of systemUserName, if we are using other user attributes like firstname,lastname etc in the Advanced config, then the email is getting generated. We noticed this issue only if we are using systemUserName

Any help would be much appreciated.

 

Thanks,

Nitish

8 REPLIES 8

ParitaSavla
Saviynt Employee
Saviynt Employee

If the system is not able to generate a unique email based on all the rules defined it would throw the message of all rules exhausted. 

Based on all the rules defined, can you check if the email that should have been generated is already present for another user? If yes, thats when you will see that a all rules are exhausted and Saviynt is unable to generate a unique email.

Also, another check would be that if Saviynt is generating a systemusername then a unique value is generated for that as well. 

ssrnitish
New Contributor III
New Contributor III

Hi @ParitaSavla ,

There is no existing email present in the EIC with the  one that is going to be generated. 

Also, systemUserName is getting generated and it is unique.

As i said earlier, if we are using systemUserName in the basic config, then email generation is working, but if we are using the same logic with concat(users.systemUserName,'@domain.COM'), then it is not working.

 

ssrnitish
New Contributor III
New Contributor III

Hi All,

Can anyone help suggest on above issue?

Thanks,

Nitish

Sheba
New Contributor III
New Contributor III

Hi,

Please try this way
case when((users.location) = ('8301')) then concat(users.firstname,substring('.',1,1),users.lastname,'@domain.com') end # case when((users.location) = ('8320')) then concat(users.firstname,substring('.',1,1),users.lastname,'1@domain.com') end # case when((users.location) = ('8340')) then concat(users.firstname,substring('.',1,1),users.lastname,'2@domain.com') end

also make sure to escape " .,@- " in the basic configuration

ssrnitish
New Contributor III
New Contributor III

Hi @Sheba ,

We are able to generate Email if we are using other user attributes like firstname, lastname etc.. But if we are using systemUserName, then Email is not getting generated though systemUserName is unique.

But if we are using the systemUserName in basic config instead of Advanced config, it is working successfully.

 

Thanks,

Nitish

Sheba
New Contributor III
New Contributor III

can you please share the advanced config you are using here.

jbaskaran
Regular Contributor
Regular Contributor

HI

If its still on can you pls try this

concat(users.systemusername, "@", "domainname.com")

musthak
New Contributor
New Contributor

Hi 

is it possible to autoincrement in advanced query ?