Use traditional automation, such as a Flow or Apex, when the steps and their order are known in advance. Use an agent when a request is open-ended and the system must choose the steps that reach the outcome. Many processes contain both, so split each one into predictable and judgment steps, then assign each part to the right tool.
What separates a fixed workflow from an agent
A Flow or Apex class runs logic that a team wrote in advance. Each branch and handoff was decided ahead of time, which keeps results repeatable and easy to test. An agent works differently. You give it a goal, a set of actions it may call and some instructions, and it chooses the order of those actions as it works. That suits requests that do not fit a tidy tree, at the cost of less certainty about the exact path each run takes.
The real difference is where the decision lives. In a fixed workflow it sits in the build. In an agentic workflow part of it moves to run time, when the agent reads a request and picks its next action. The selection question then becomes how much of the decision you can safely move out of the build.
Test one: can you write the path down in advance?
Describe the process as a sequence of inputs and outputs. If you can draw the branches on one page and each one leads to a known action, a traditional automation is the better choice. Lead routing by territory, approval routing by deal amount and creating a related record after a stage change all fit this pattern. Build patterns for this kind of fixed logic are covered in Salesforce automation workflows.
If the team cannot agree on the branches, or the branch count grows with each real example, you are describing judgment rather than logic. Test an agent on that step instead of adding nodes until the diagram becomes unreadable.
Signs the path is known
- Inputs arrive in a fixed shape, with the same required fields on each record.
- The same condition leads to the same action, and reviewers raise no exceptions.
- A wrong branch produces a visible error that a person can reverse.
- The business rule can be written as one sentence without qualifiers such as “it depends”.
Signs the path is open
- The request is written in free language, such as a customer message, a case description or a rep’s question.
- The right next step depends on content the system must read and interpret.
- Several actions may be needed, and their order changes from case to case.
- An experienced team member would ask a follow-up question before acting.
Test two: how much judgment does each step need?
Steps inside one process differ. Some need a lookup and a yes or no answer. Others need reading, summarizing or weighing evidence. Label each step as deterministic, meaning the same input produces the same output, or interpretive, meaning the output depends on reading language or context. Deterministic steps belong in Flow or Apex. Interpretive steps are where an agent adds value.
Mixing the two inside one step is a common design error. An agent asked to calculate a discount, or a Flow asked to judge whether a free-text complaint is urgent, can look fine in a demonstration and then fail on untested cases. Split the step so that the calculation stays in fixed logic and the reading goes to the agent.
Test three: what happens when the output is wrong?
The cost of an error should set how much freedom the automation receives. A weak draft summary that a rep reads before sending costs little. A wrong update to a closed-won opportunity or a message sent to a customer costs far more. The higher the cost, the more that action should sit behind a deterministic step with explicit checks.
Ask two questions for each action the agent could take. Can it be undone without manual repair? Would someone notice a mistake before it reaches a customer or a financial record? If the answer to either is no, keep the action in a fixed workflow and let the agent propose the change rather than commit it.
A method for mapping a process before you build
Mapping prevents the familiar mistake of building first and sorting out the boundaries afterward. Work through these steps in order.
- List the process from trigger to final record change, one line per step, without naming a tool yet.
- Mark each line with the data it needs and the data it produces.
- Label each step deterministic or interpretive, using the rule from the previous section.
- Group adjacent deterministic steps into one traditional automation, so the agent is called at the interpretive points alone.
- For each interpretive step, write in one sentence what a correct output looks like, and list two cases that should fail.
- Define the actions the agent may call, keeping the list short enough that each action can be tested on its own.
- Set the handoff point, the condition under which the agent stops and passes the case to a person or a fixed flow.
- Run the mapped process against past cases and log each divergence from the expected path.
The last step is the one teams most often skip. Past cases show whether the boundary sits where you assumed, and it often needs at least one move. For help planning this work, see Salesforce implementation.
Where traditional automation should stay in charge
Keep record creation, field updates that feed reporting, approval gates and integrations with strict data formats in deterministic logic. A reviewer should be able to trace why a record changed by reading the logic, not by reconstructing a model’s reasoning after the fact. Integration design matters too: an agent that calls an external system on each request multiplies the paths the integration must handle. The integration architecture you choose sets how many of those paths you manage.
Where an agent earns its place
Agents make sense when the work consists of tasks that vary from case to case and the value lies in choosing the right combination. Examples include triaging a free-text case into the correct queue, or drafting a reply from several linked records. The agent handles reading and selection, while the surrounding process still controls what is written.
A workable pattern is to let the agent recommend and a deterministic step apply. The agent reads the case and proposes a category with a short reason. A Flow checks the category against the allowed list and performs the update, so reviewers see both the recommendation and the reason. The service workflow design for queues and escalations is the natural place to define those allowed categories before an agent is introduced.
Guardrails to set before an agent goes live
Treat an agent like a new team member with a narrow remit. Give it a clear job description, the actions it may take, the data it may read and the conditions that send work back to a person. Write each guardrail down so reviewers can test it.
Checks to write before go-live
- The exact list of actions the agent can call, with the object each action touches.
- The fields it may read and the fields it may write.
- A test set that includes bad input, missing data and a request outside its remit.
- A rule for when the agent stops and hands the case to a person.
- A record of each action the agent took and the record it changed.
Test the guardrails as hard as the normal path. In most builds, the failures that matter come from reasonable requests backed by incomplete data. Check agent behavior on your own org and release before relying on any specific capability, since the product changes between releases.
Common mistakes when teams pick the agent first
A frequent pattern is starting from the tool. Someone sees an agent demonstration and routes all cases through it, which produces a slower process that still needs fixed rules for the steps that did not vary. Start from the process map.
Another mistake is replacing a working automation for its own sake. If the existing flow is reliable, the gain from changing it is small while the testing burden grows. Put agents where people currently read and decide by hand.
A third mistake is skipping the definition of success. Decide what a correct outcome looks like before the build starts, such as the right queue assigned or a case escalated under a stated condition. Without that definition, the team has no basis for judging the agent beyond impressions.
Questions about choosing between agents and flows
Should an agent replace a Flow that already works?
Usually not. A working flow on a stable path gains little from an agent, and the replacement adds testing work. Change it when the team keeps working around the flow for cases it was not built to handle, and those cases recur often enough to measure.
Does a process have to be entirely agentic or entirely fixed?
No. Many processes split into a fixed backbone with a few judgment points. Keep the deterministic steps in traditional automation and call the agent where reading or choosing is needed. The handoff between the two deserves the closest design attention.
How do I explain the choice to a non-technical stakeholder?
Describe it in terms of predictability. A fixed automation gives the same result for the same input, which suits records and approvals. An agent reads open requests and proposes actions, which suits triage and drafting.
What should a reviewer check after an agent changes a record?
Check the recommendation, the stated reason and the record that changed, then compare the outcome with your test set. If the reason does not match the data it cites, treat the case as a defect in the instructions or the action set.
How many test cases are enough before go-live?
No fixed number works as a rule. Cover each branch and each failure mode from your map, including cases with incomplete data. Add a new case whenever a reviewer finds a miss.