#Salesforce #Record-Triggered How would you design a Record-Triggered Flow to automatically update a record, send an email notification, and create a follow-up task when an Opportunity reaches the Closed Won stage?
Hi @SAITEJA B Good question! Record-Triggered Flows are a great way to automate business processes in Salesforce without writing Apex code.
1. Recommended Flow Design
Scenario: When an Opportunity moves to Closed Won, update the record, send an email, and create a follow-up Task.
- Create Flow: Setup → Flows → New Flow → Record-Triggered Flow.
- Select Object: Opportunity.
- Entry Condition: Stage = Closed Won.
- Trigger: When a record is created or updated.
- Run Condition: Only when the record meets the entry conditions for the first time.
- Update Record: Update required Opportunity fields.
- Send Email: Use the Send Email action to notify the Opportunity Owner.
- Create Task: Create a follow-up Task assigned to the Opportunity Owner.
2. Important Best Practices
- Use an After-Save Flow for creating Tasks and sending emails.
- Use a Before-Save Flow when only updating fields on the triggering record.
- Avoid unnecessary Get Records and Update Records inside loops.
- Prevent repeated execution using entry conditions.
- Add fault paths and test using Flow Debugger.
3. Official Salesforce Resources
Build this automation in a Developer Org and test what happens when an Opportunity changes from Negotiation to Closed Won.
Key Point:
Use Record-Triggered Flows for business automation without Apex, but always focus on performance, error handling, and avoiding duplicate actions.
Hope this helps! Venkat Yadav | SFDCINDIA