Single flow per object
One record-triggered flow per object per timing (one before-save, one after-save) that delegates to named, ordered subflows, giving you deterministic order of execution instead of automations racing each other.
WhenOnce an object carries more than a couple of automations, or the moment you see intermittent save bugs that only reproduce under bulk load. Retrofit it on any object with stacked flows, workflow rules, and process builders.
- Pattern
- One before-save flow per object for same-record field writes (fast, no DML cost).
- One after-save flow per object for cross-object writes, callouts, and async work.
- Named subflows called in an explicit sequence, one per business concern (routing, stamping, rollups).
- Entry criteria on every subflow so it runs only when its trigger conditions are met.
- A recursion guard (transaction-scoped flag or a field-change entry check) so a flow does not re-fire on its own write.
BenchmarkAverage save CPU time: stay well under the 10,000 ms synchronous Apex CPU limit, with practitioner headroom below ~5,000 ms. Source: Salesforce Apex Developer Guide, per-transaction governor limits.
A giant undecomposed flow is as unmaintainable as the sprawl it replaced, and before-save runs before the record exists in the database, so misplaced logic either fails silently or forces a redesign.