When an admin has to change logic after launch, build it in Flow, because the admin can open the flow, read each step and adjust a threshold without a code release. Keep Apex for logic that needs developer control, such as complex transaction handling and callouts.
What the decision actually turns on
Teams often start this choice by asking which tool can do more. That question matters less after go-live than a plainer one: who will read this rule, who will change it, and who will answer for it when it misbehaves? The answers to those three questions usually settle placement before anyone compares features.
Admin-maintained logic has a particular profile. It changes on business timing rather than engineering timing. A discount threshold moves when finance revises the pricing policy. A routing rule for regional accounts changes when a territory is split. A required field on a case changes when a compliance team adds a new category. None of these changes is large, but each one is frequent, and each one needs someone to make it quickly and correctly without waiting for a development cycle.
Logic that rarely changes, depends on many systems, or must behave the same way under heavy volume belongs to a different profile. It needs developer tests, version control and a reviewer who understands the code path.
Map each rule to an owner before choosing a tool
Start with an inventory of the rules that will exist after launch, not the rules in the original design. Many projects describe logic as a single feature, such as lead scoring or order approval, and that description hides several rules with different owners. Break each feature into rules, then record three details for each rule.
- Owner of the business decision. The person who decides what the rule should do, such as a sales operations lead or a finance controller.
- Expected change rate. A rough sense of how often the rule will change in the first year. Monthly changes point toward admin-maintained tooling. Changes tied to a release calendar point toward developer-owned code.
- Failure cost. What happens if the rule runs wrong for a day. A misrouted lead is recoverable. A miscalculated invoice line may not be.
Keep the three answers on one row per rule in the design record. The placement usually follows from the owner and the change rate, and the failure cost decides how much testing the rule needs before each change goes live.
Signs that logic belongs in Flow
Flow fits logic that an admin should be able to open, explain and edit in the same sitting. The signs below point that way. You do not need all of them. Three or four usually make the case.
- The rule reads field values and updates records on the same object or a closely related object.
- The business owner wants to see the decision path in plain steps, so a reviewer can confirm the logic without reading code.
- The thresholds, labels or routing targets change on a business schedule, and the team wants those changes made without a full code release.
- The rule has a small number of branches, and each branch maps to a clear business outcome.
- The rule creates tasks, sends internal notifications or sets fields that an admin already reports on.
Pay attention to the admins who will inherit the rule. If they already build reports and page layouts without help, they are likely to maintain a flow well once it has clear names and a short description. If they rely on a developer for each change, the training plan matters as much as the placement decision.
Signs that logic belongs in Apex
Apex fits logic that needs developer control over structure, performance and testing. Its strengths show up when the rule has to be written as code that other code calls, or when the logic has to handle data shapes that a declarative tool would struggle to express clearly.
- The logic must be called from several entry points, such as a page, an integration and a batch process, and each entry point needs the same result.
- The rule calls an external service and must handle retries, timeouts and partial failures in code.
- The rule processes large sets of records in bulk, and the team needs to design the bulk behavior deliberately rather than rely on defaults.
- The rule needs unit tests that run as part of a release pipeline and fail the build when behavior changes.
- The rule contains calculations that a finance or engineering reviewer must read line by line, and the team wants source control history for each change.
Apex also suits logic that other developers will extend, because a class with a clear interface and tests gives the next developer a safe place to add behavior.
Logic that spans both tools
Many real rules sit on the boundary. A common shape is a flow that gathers inputs and decides which path to take, with a developer-built component that performs a heavy calculation or calls an external system. Splitting this way lets the admin keep control of the decision and the developer keep control of the work. The handoff needs a clear contract: the inputs the flow passes, the outputs it expects back, and what happens when the code component returns an error.
Avoid splitting a single decision across both tools without a written owner for each half. When the admin changes a threshold in the flow and the developer changes the calculation in code, nobody may be able to explain the combined result. Record which side owns each step in the design notes, and name the reviewer for changes to either side.
A step-by-step process for placing a rule
The process below works for one rule at a time. A simple rule takes a short review, and a rule that touches financial or customer-facing results needs a fuller design review. Run the process during design, and run it again when a rule changes hands.
- Write the rule in one sentence. Use the business words the owner uses. If the sentence needs the word and more than twice, split the rule.
- Name the owner and the reviewer. The owner decides the outcome. The reviewer checks the logic before it goes live. For admin-maintained rules, these two people are often different roles on the same team.
- Estimate the change rate. Write down how often the owner expects to change the rule in the first six months.
- Score the rule against the signs above. Count how many Flow signs and how many Apex signs the rule shows. A tie is a signal to split the rule rather than to pick a side.
- Choose the tool and record the reason. One sentence in the design record is enough, such as: the rule changes monthly and the owner needs to read the path.
- Define the test cases. Write the expected result for each branch before building. This step applies to both tools and gives the reviewer a fixed list to check.
- Confirm the change path. Decide who may edit the rule after launch, where the change is tested first, and how the change is recorded.
Teams that skip the change path step usually find out during the first urgent fix, when an admin edits a production rule without a test.
Setting up the handoff between admins and developers
The placement decision holds up when people on each side can read the other side’s work. Admins need enough visibility into Apex to know what a rule does, and developers need enough visibility into flows to know which decisions the admin will change. Agree on that visibility before the first build.
Write a short description for each rule that names the owner, the reviewer and the expected change path. Keep it in the record the team already reads, and update it when ownership changes.
Plan release checks for each rule. A declarative rule still needs a sandbox test after a change to the surrounding configuration, and an Apex rule needs its test suite to pass before promotion. Before each sandbox test, work through the release notes review checklist for sandbox testing, since a change in one area can alter how a rule in another area behaves.
If the team has no developer for the Apex side, a dedicated Salesforce delivery team is one way to cover that gap, with admins keeping ownership of the declarative rules. Teams that want a wider view of Salesforce work can start from the Salesforce services page.
For help planning this work, see Salesforce implementation.
Questions about placing and maintaining admin-maintained rules
Should an Apex rule move to Flow when the business starts changing it often?
Check whether the frequent change is to a threshold, a label or a routing target. Those values can often move into a declarative rule while the calculation stays in code. Move one piece at a time and test each one.
How many branches should one flow hold before the team splits it?
There is no fixed count. Ask a reviewer who did not build the flow to trace one path from input to outcome. If the trace takes a while, or the reviewer needs the builder’s help, split the flow into smaller rules with one owner each.
Can an admin team maintain logic without reading code?
Yes, for declarative rules that stay within the admin’s skill set. The Apex side still needs a developer reviewer for each change, even when an admin submits the request.
What should an admin check before editing a rule for the first time?
Compare the live behavior with the design record, and confirm which tests exist and still pass. Make the first change in a sandbox and have the reviewer check the result before it moves forward.