and more in a single search tool across platforms. Read the announcement here. |
01/19/2023 07:57 PM
We are using Identity Lifecycle -> Email generation and looking to add conditions to generate an email only for certain users. Is it possible to add conditions in email generation so it only generates for few conditions and then do nothing on other conditions? What is the syntax for if/elseif in email generation logic?
if (user.customproperty1='Employee') {
email generation logic for employees
} else if (user.customproperty1='Contractor') {
email generation logic for contractors
} else {
do nothing
}
01/19/2023 08:20 PM
if(users.employeetype='Contractor',concat(left(lower(users.firstname),1),".",lower(users.lastname),".con@rushi.com"),concat(left(lower(users.firstname),1),".",lower(users.lastname),"@rushi.com"))#if(users.employeetype='Contractor',concat(left(lower(users.firstname),2),".",lower(users.lastname),".con@rushi.com"),concat(left(lower(users.firstname),2),".",lower(users.lastname),"@rushi.com"))#if(users.employeetype='Contractor',concat(left(lower(users.firstname),3),".",lower(users.lastname),".con@rushi.com"),concat(left(lower(users.firstname),3),".",lower(users.lastname),"@rushi.com"))
01/20/2023 04:50 AM
Is there a way to avoid email generation for a specific employee type? I am looking for a syntax to for an 'else' block that does nothing. OR, Do I need to list all types that are eligible for email generation, so that way if a type is missing it does not generate the email?
01/20/2023 06:35 AM
You can write an Advance query mentioning the conditions. You can use case statements in SQL to achieve that along with an else condition.
OR
For users imported through csv or via a target (Oracle, Workday etc), you can restrict email generation for all users during import and further via User Update rule you can mention the condition which will generate users' email for a selected kind after import.
For users created via form, email generation can only be restricted via an Advanced SQL query
01/20/2023 06:46 AM
It depends right, If you have different logic to generate for different type of users then you may have to list all and omit the one that you don't need.
Otherwise you can try using case when condition in advanced query
01/20/2023 12:11 PM
You can mention else as ''