function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Guillaume MorinGuillaume Morin 

Dynamic Email Alert Recipients

Hi,

I am trying to see if there is a way to have Dynamic Email Alert Recipients configured in SFDC. I know about the Related Contact, Users, etc but none of these can actually do what i'm looking for.

Here's the situation.
Email Alert is triggered from a Case
If the Role of the User triggering the EA is A, then recipients needs to be A1-A2-A3-Z
If the Role of the User triggerins is B, then recipients needs to be B1-B2-B3-Z

Right now it seems the only way I can do this is to create 2 separate sets of WF and EA and then assign the recipients for each EA. Since the Email Template is the same and all the other factors on the WF are the same, I was wondering if there was any way I could have a formula (or similar) that would dynamically update the recipients based on the User Role. Such automatization would probably save me 75% of all my WF and EA.

PS: User Role and Recipients are not direct subordinates

Thanks

Bill
SonamSonam (Salesforce Developers) 
There is a way to get email field to be the recipient of the EA, however, this will again be just one email address.

As I understand you need multiple recipients, I don't think there is a way out except having two WF - create two public groups -  A1-A2-A3-Z/B1-B2-B3-Z and then send out the eamil alert accordingly.