Click HERE to see how Saviynt Intelligence is transforming the industry. |
05/13/2024 04:36 AM
Hi All,
We are maintaining identities for our client with email generation rule of firstname.lastname@abc.com.
Now client wants to onboard identities from different organization which will be having emails of firstname.lastname@xyz.com.
How this can be handled in Email Generation Rule based on the attribute which we might be using to segregate the identities e.g. any custom property.
We want logic in the manner.
If CP1 = abc then firstname.lastname@abc.com otherwise firstname.lastname@xyz.com.
Regards,
Sanket Bhandhari
05/13/2024 04:45 AM
Hi @SanketBhandhari ,
If the domain is saved in customproperty1. Did you try to configure like below:
If this helps your question, please consider selecting Accept As Solution and hit Kudos
05/13/2024 04:48 AM
Hi Prem,
Thanks for the reply, but we want generate emails with different domains, email generation rule will not be helpful in this.
We need logic for advance query.
Regards,
Sanket Bhandhari
05/13/2024 04:56 AM
Okay. Try below logic in advance config
CASE WHEN users.customproperty1='XYZ' THEN CONCAT(users.firstname,users.lastname,'@',users.customproperty1,'.com') ELSE CONCAT(users.firstname,users.lastname,'@abc.com') END
If this helps your question, please consider selecting Accept As Solution and hit Kudos
05/13/2024 05:19 AM
case when users.customproperty31 = 'abc' THEN concat(users.customproperty47,@abc.com) ELSE concat(users.customproperty47,@xyz.com) END
We are using above logic Prem but it is not working out.
Regards,
Sanket Bhandhari
05/13/2024 05:20 AM
Please share logs
05/13/2024 05:22 AM
05/13/2024 08:44 PM
IF(users.customproperty31 = 'abc', CONCAT(users.customproperty47, '@abc.com'), CONCAT(users.customproperty47, '@xyz.com'))
05/13/2024 11:41 PM
05/13/2024 05:22 AM
Please pass the hardcoded value in quotes.
case when users.customproperty31 = 'abc' THEN concat(users.customproperty47,'@abc.com') ELSE concat(users.customproperty47,'@xyz.com') END
If this helps your question, please consider selecting Accept As Solution and hit Kudos
05/13/2024 05:24 AM
Even with the quotes, it didn't worked.
Regards,
Sanket Bhandhari
05/14/2024 06:16 AM - edited 05/14/2024 06:16 AM
I'm expecting you create these users manually.
I'm pretty confident that this will not work, when you create the User directly from Admin > Identity Repository Users. Why? Because during the initial creation CP1 is not set, but it is rather filled, after the User is already created.
You could try to create a Create User Request form, that already fills CP1 and create the User with that.
If you create the Users on Import you are better off, assigning the email on import, rather than using the email generation rule.
Just my 2 cents, I hope it helps
Cheers 🙂
05/14/2024 07:20 AM
case when users.customproperty31 = 'abc' THEN concat(users.customproperty47,@abc.com) ELSE concat(users.customproperty47,@xyz.com) END
statuskey,firstname,lastname,systemusername,username,customproperty31,customproperty47
If this helps your question, please Accept As Solution and hit Kudos
07/30/2024 02:35 PM
Hello there, we have the same requirement too, i.e. Multiple domains, addition to above, we need to handle the duplicate detection and autoincrement with tan index of 1. I have the following logic in place, but I am getting an email with index 1, even though the user is unique (only one identity), what could be changed to the following logic?
case when ((users.companyname='xyz')
THEN
concat(users.firstname,'.',users.lastname,'@xyz')#
concat(users.firstname,'.',users.lastname,'1','@xyz')#
concat(users.firstname,'.',users.lastname,'2','@xyz'))
ELSE
(concat(users.firstname,'.',users.lastname,'@abc')#
concat(users.firstname,'.',users.lastname,'1','@abc')#
concat(users.firstname, '.',users.lastname,'2','@abc')#
concat(users.firstname,'.',users.lastname,'3','@abc'))
END#
07/30/2024 04:16 PM
Did you checked logs?
07/30/2024 05:35 PM
07/30/2024 07:52 PM
The log indicates an SQL syntax error in the query used within your workflow. The issue lies in the case statement construction. It appears there's an unnecessary THEN keyword causing the syntax error.
Use below code
case
when users.companyname = 'xyz' then
concat(
concat(users.firstname, '.', users.lastname, '@xyz')#
concat(users.firstname, '.', users.lastname, '1', '@xyz')#
concat(users.firstname, '.', users.lastname, '2', '@xyz')
)
else
concat(
concat(users.firstname, '.', users.lastname, '@abc')#
concat(users.firstname, '.', users.lastname, '1', '@abc')#
concat(users.firstname, '.', users.lastname, '2', '@abc')#
concat(users.firstname, '.', users.lastname, '3', '@abc')
)
end#