Process Builder and after-save flows in the late save window
Key Takeaway
Processes built with Process Builder run just before after-save flows. If an after-save flow updates the record that triggered it, the record is saved again. A process set to evaluate a record multiple times in a single save operation can then reevaluate that record using its most recent values.
When a record is saved, Salesforce runs its automation in a fixed sequence called the order of execution. Late in that sequence, after the record is saved to the database but before the changes are committed, processes built with Process Builder run. After-save record-triggered flows run next. Knowing where these two tools sit lets you predict which automation runs first, what runs again, and what an automation can no longer stop.
Where processes and after-save flows run
Processes built with Process Builder and after-save flows both run late in the order of execution. The late steps run in this order:
- Salesforce saves the record to the database, but doesn't commit it yet.
- After triggers run.
- Assignment rules run.
- Auto-response rules run.
- Workflow rules run.
- Escalation rules run.
- Processes built with Process Builder run. Flows launched by workflow rules (flow trigger workflow actions pilot) run in the same step. The order between the two isn't guaranteed.
- After-save flows run.
- Entitlement rules run.
- Roll-up summary calculations run on the parent record, then on the grandparent record.
After-save flows also run before Criteria Based Sharing evaluation and before the final commit of all DML operations.
Asynchronous paths in record-triggered flows run after the commit as post-commit logic, along with sending email and queued asynchronous Apex.