Salesforce Asked by EricB on November 8, 2021
We are trying to do something that seems pretty simple – when an opportunity changes stages we want to automatically send an email to a subset of related contacts. That subset is any related contact that has the Role of "Partner". According to SFDC Admin Assist, the email notification feature in Salesforce can only email ALL the related contacts, and cannot filter for specific roles. However, they did say that a Flow would solve the issue (but creating the Flow itself is out of scope for them).
Example of what we need:
Can anyone help get us on the right path?
You can achieve this by using a combination of Process Builder and an Autolaunched Flow.
If the Opportunity Stage is changed, call the Autolaunched Flow from the Process Builder passing the Opportunity Id. (Declare Opportunity_Id as an input variable in flow).
In flow, query for Contacts related to the Opportunity and having Role as 'Partner' (I have created a lookup on Contact to Opportunity and a custom field 'Role' on Contact. You can change these based on your requirements.)
Loop through the queried Contacts, add their email addresses in a flow text collection variable.
Add the Core Action element Send Email and pass the Email Addresses collection variable.
Answered by Prakhar Saxena on November 8, 2021
Get help from others!
Recent Answers
Recent Questions
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP