Salesforce flows are constantly getting updated with new features and capabilities in every release. Salesforce flows help you automate complex business processes and manual data entry. It lets you work smarter by making sure the required tasks are accomplished correctly. Record-triggered and Platform event-triggered flows are auto-launched flows in Salesforce that get launched based on the events/conditions mentioned in the Start element that represents the beginning of your flow. They are tied to a single object/platform event.
Record Triggered Flow
Salesforce introduced Record-triggered flows initially in Spring ’20 release as before-save flows. These flows were auto launched on the record’s update and could be used instead of before triggers for simple functionalities.
Slowly with further few releases, Salesforce came with more enhanced Record-triggered flows that can be auto launched when,
- A record is created.
- A record is updated.
- A record is created or updated.
- A record is deleted.
The flow can run Before Save or After Save of the Record.
Record-Triggered Flow Considerations
- There is no bulkification available out of the box in Get-Records action: The get records action does not have the out-of-the-box workaround for the SOQL IN keyword. There are some AppExchange products available as a workaround for this limitation.
- If there are multiple active record-triggered flows on an object configured to run before the record is saved, the order in which the flows are executed is not guaranteed.
- Before-save record-triggered flows, you can only update the record that triggered the flow to run.
- In Before-save record-triggered flows, only the following actions are available: Assignment, Loop, Decision, Collection Sort, and Get records.
- In order of execution, before-save record-triggered flows are executed before the Before trigger.
Platform Event-Triggered Flow
The Summer ’20 release of Salesforce update has given many enhancements to the flows, one being the record-triggered flow. Platform event-triggered flow has also been introduced along with this.
What is Platform Event?
Platform Event is based on an event-driven architecture to communicate within and outside Salesforce. It works on the Publish-Subscribe model that uses a message bus (Salesforce Platform event uses Comet-D as message routing bus) to manage queues of message events and processes and apps listening to them. As a result, platform events are near-real-time integration.
How to Execute a Platform Event-Triggered Flow?
Platform Event-Triggered flows run when an event is received. Platform event-triggered flows cannot be invoked on any other event except after- save on the Platform event.
Platform Event-Triggered Flow Considerations
- When Platform-event triggered flows, paused flow interviews, and processes subscribe to the same platform event, there is no guarantee which subscriber (among these) will process each event message first.
- A flow can receive a batch of event messages at once—a maximum of 2,000 event messages.
- Debug logs for platform-event triggered flows and resumed flow interviews appear under the Automated Process user.
Tip: Triggered flows cannot be launched directly from the flow builder; they need to be launched by changing the appropriate record. Triggered flows are a perfect tool for business logic on record create/update/delete in the admin’s toolbox. Triggered flows need to be considered before considering triggers for the process implementation.
When set up properly, Salesforce flows are one of the most powerful tools in your toolbelt, and each Salesforce flow update brings in updated features and capabilities. We hope you got a basic idea about the power of Salesforce flows and the potential of record-triggered flow and platform event-triggered flow. But if you need more help, reach out to us by signing up at saasguru. We would love to help you in any way we can.