With Email Templates in SailPoint IDN, I know the content of email templates can be conditionally changed - that is having variables and conditionals to change the nature of the content.
Emails template notifications can also be turned off so they do not send by adding #stop or a similar command to the subject line.
However, what I would like to know is, is there a way to conditionally stop emails in some way? For example having email notifications sent to normal users, but executive users do not receive the same notification.
@colin_mckibben any thoughts on this?
I’m not aware of any built-in mechanism for conditionally disabling email notifications. However, the Workflows tool that we are building (currently in beta), supports conditions and emails, so this use case should be easy to accomplish once Workflows goes live.
@colin_mckibben - I see your point, however, I feel with workflows we’ll be able to add sending emails easily. I don’t see how we will be able to stop the emails. Any thoughts or details on how you envision this solution?
I did some testing on my end and I was able to conditionally stop emails from being sent on a per template basis. I accomplished this by adding an if
condition in the subject of the template. If the condition evaluates to true
, then it will insert the #stop
variable so the email is not sent. If the condition is false
, then the #stop
variable won’t be inserted into the subject, and the email will be sent. Here is what I put in the subject:
#if(true)#stop#end A user has been granted ${accessProfileName} via a role request
Since the subject can contain if-else logic, you should be able to conditionally send the email using the global and local variables available to each email template, which you can find here. In your case, you want to use an identity attribute that will tell you if the identity the email is being sent to is an executive. You can try something like #if( $user.title == 'Director' || $user.title == 'Executive')#stop#end
. The properties available on a given $user
are dependent on the identity profile attributes that are mapped.
I definitely hope that happens sooner rather than later. I know a lot of use-cases that IDN would be great for, but which are not possible. It’s another good step toward migrating most of SailPoint to SaaS solutions.
A post was split to a new topic: How to find custom email template