Salesforce Order of Execution
Understanding the order for reliable automation.
Salesforce is predictable β not random
"It was working just a moment ago." If you work with Salesforce, you probably recognize this thought. A validation suddenly fires even though the value seems correct. An automation doesn't do what you expect. Or an integration sends data that's just slightly off.
At moments like these, Salesforce feels unpredictable. As if the system randomly decides what it will and won't accept. But that's not the case. Salesforce always follows the same sequence β with every change, every new record, every update.
π‘ The good news
Once you understand that sequence, a lot of Salesforce behavior suddenly becomes explainable. You don't need to be able to build it yourself β but knowing there's a sequence already helps enormously in understanding what's happening.
What do we mean by 'order of execution'?
When you change something in Salesforce β update a field, create a new record, or data comes in through an integration β Salesforce doesn't execute everything at once. The system works with a fixed plan: first this, then that, and only then something else.
That plan is called the order of execution. It determines which checks, corrections and follow-up actions are executed in which order. And that order always applies β whether you're manually filling in a field, or an automation is updating a thousand records at once.
This applies to:
- β’Manual changes by users
- β’Automations (flows)
- β’Validation rules
- β’Integrations with other systems
Salesforce doesn't work in one go, but in sequential steps. Those steps determine what happens when β and that's exactly where the confusion often arises.
Think of a conveyor belt
Imagine a factory with a conveyor belt. A product comes in, passes through various stations, and eventually comes out finished. Each station has its own task: check, adjust, approve, package.
Salesforce works the same way. Data comes in, passes through a series of checkpoints, gets adjusted if needed, and only then is permanently saved. After saving, follow-up actions sometimes occur.
β οΈ The importance of timing
If something arrives too late on the belt, it misses its moment. A correction that comes after the validation doesn't help anymore if the validation has already rejected it. This explains many 'inexplicable' errors.
This conveyor belt metaphor helps understand why the sequence matters so much. Each station has its own place β and you can't just change the order.
The big steps β without technical details
The exact Salesforce sequence has dozens of steps. But for understanding, you don't need technical depth. It's about the big picture:
Salesforce receives new or changed data
A user clicks 'Save', an integration sends data, or an automation makes a change. At this moment Salesforce knows: something is coming in that needs to be processed.
Initial checks and basic rules
Salesforce checks whether required fields are filled in, whether the data has the correct format, and whether the user even has permission to make this change.
Corrections before save
Some automations are allowed to modify data before it's saved. Think of automatically filling a field, standardizing values, or linking to another record.
Saving the record
After all preparatory steps, the record is actually saved to the database. Until this point, changes are not yet final.
Actions and follow-up steps after save
Only after the record is saved can certain follow-up actions take place: sending an email, informing another system, or updating related records.
Why this sequence matters so much
This fixed sequence explains many situations that seem strange at first glance. A few examples in plain language:
Errors that come 'too late'
An automation adjusts a value, but the validation had already rejected it. Result: error message, even though the correction would have solved the problem.
Fixes that don't work
You try to fix something with an automation, but Salesforce was already further in the sequence. The correction comes too late β the moment has passed.
Automations that clash
Two automations work on the same record, but are executed at different moments. One overwrites what the other just adjusted.
Integrations with 'wrong' data
An external system receives data, but a correction that came later wasn't sent along. The sequence determines what's visible when.
The sequence is always technically correct β but functionally it can feel like something's wrong. That difference is important to recognize.
How this relates to flows
When you work with Salesforce, you often hear about 'flows' β the automations used to automate processes. What many people don't know is that flows can run at different moments:
These can modify data before it's saved. They sit early in the sequence.
These perform follow-up actions after the record is already saved. They can no longer modify the record itself without starting a new round.
Since Spring '22, you can configure the order of multiple flows of the same type (Before Save or After Save) with Flow Trigger Order (1-2000). This lets you determine which flow runs first. This doesn't change the best practice of having 1 master flow per trigger type.
This distinction isn't a preference or setting β it's part of the fixed sequence. Whoever builds a flow needs to know at what moment that flow runs. For you as a product owner or process owner, it's mainly important to know this distinction exists, so you can ask the right questions to your consultant or admin.
What your organization gains from this
You don't need to memorize the sequence. You also don't need to be able to build flows yourself. But knowing there's a fixed sequence β and understanding what that roughly means β provides immediate benefits:
You recognize patterns in error messages and unexpected behavior.
You can ask targeted questions: "When exactly does this flow run?"
You understand why some solutions are more complex than they seem.
You make more conscious choices about automation and integrations.
Understanding is already a win. You don't need to be able to build it to understand it.
Understanding before solution
Many problems that surface in Salesforce aren't bugs. They're the result of assumptions about sequence that don't hold. A validation that comes too early. An automation that runs too late. An integration that sends data before the correction is applied.
Whoever recognizes the sequence can better analyze where a problem comes from. And whoever understands the sequence makes better choices β whether it's about a new process, an adjustment to existing automation, or the question of whether something is even possible.
"Salesforce isn't illogical β it just follows a fixed sequence you need to learn to recognize."
Further reading
Want to understand more about how automation in Salesforce works? Check out our article about flows, or get in touch for a conversation about your specific situation.
Behavior you don't understand in Salesforce?
We help you find the cause and choose the right solution β without having to build it yourself.
