On this page
An Opportunity reaches Closed Won. A record-triggered Flow creates an onboarding Project, updates the Opportunity, sends an email, and calls an external provisioning service. During a 200-record data load, some Opportunities receive two Projects, the API receives duplicate requests, and the entire transaction occasionally fails.
“Add a Decision so it runs only once” is not a complete answer. A strong Salesforce Flow interview answer separates same-record work from related-record work, evaluates the old and new record state, designs for a collection of records, controls re-entry, chooses a reliable transaction boundary, and explains how the team will test and observe the automation.
These 12 scenario-based Salesforce Flow interview questions focus on that reasoning. They cover before-save and after-save Flow, entry criteria, $Record__Prior, bulkification, loops, re-entry, Flow Trigger Explorer, asynchronous and scheduled paths, fault handling, testing, and the point where Apex becomes the better tool.
For a broader practice set across Admin, Security, Flow, Apex, Deployment, and Integration, start with 18 scenario-based Salesforce interview questions. If access failures are mixed into the Flow symptoms, use the SFX Salesforce Security and Sharing guide to separate permission problems from automation problems.
A strong Flow interview answer framework
Before dragging an element onto the Flow canvas, answer these questions:
- What event starts the process? Create, update, delete, screen action, schedule, platform event, or another automation?
- Which record state matters? Current value, prior value, a transition into a state, or every edit while a condition remains true?
- What must happen in the original transaction? Same-record field updates, validation, related DML, notification, callout, or work that can wait?
- What is the realistic batch size? The design must work for imports, APIs, integrations, and scheduled jobs—not only one record in the debugger.
- Can the automation trigger itself or another automation again? Map the full chain, including Apex, managed packages, workflows still in migration, and flows on related objects.
- What happens after partial progress or failure? Decide whether work must roll back, be retried, be reconciled, or create a support record.
- How will you prove the behavior? Define positive, negative, bulk, security, failure, and removal tests before activation.
A Flow is not production-ready because the happy path turns green in Debug. It is ready when its transaction behavior, repeat execution, failure handling, and operating evidence are understood.
Salesforce’s current Record-Triggered Automation Decision Guide recommends choosing among Flow, a Flow-and-Apex hybrid, and Apex based on automation density, data volume, dependency sprawl, transaction control, and maintainability.
Save timing and entry conditions
1. You need to set a field on the record being saved. Before-save or after-save Flow?
Strong answer
I start with a before-save record-triggered Flow when the requirement is only to update fields on the triggering record. I assign the value directly to $Record; I do not add an Update Records element for that record.
Before-save is the correct transaction point because Salesforce can include the new value in the original save. It also reduces the risk of starting another save cycle merely to update the same record. Examples include normalizing a source field, stamping a classification, or calculating a simple value before persistence.
I choose after-save when I need the saved record ID, must create or update related records, or need an action that is unavailable before save. I would not answer “before-save is always faster, so use it for everything.” Timing must match the operation.
Salesforce documents the supported before-save behavior and limitations in Before-Save Record-Triggered Flows.
2. A Flow must create a Task when a Lead is created. Which Flow type do you use?
Strong answer
I use an after-save record-triggered Flow optimized for Actions and Related Records. Creating a Task is separate-record DML, so it does not belong in a before-save path.
I define entry conditions at Start—for example, at least one approved contact method exists—rather than starting for every Lead and immediately branching away. I populate the Task with $Record.Id, ownership, due date, and only the fields the business process requires.
I also decide whether duplicate Tasks are possible. If upstream automation can update the Lead again, a create-only trigger avoids that risk. If the requirement includes later updates, I need transition logic or an idempotent lookup key before creating another Task.
Salesforce’s simple after-save Flow example uses the same pattern to create a follow-up Task from a new Lead.
3. What is the difference between “every time updated and meets the conditions” and “only when updated to meet the conditions”?
Strong answer
“Every time” runs after any qualifying update while the record still meets the entry conditions. If an Opportunity is already Closed Won and an unrelated description field changes, the Flow can run again.
“Only when updated to meet” runs on the transition from not meeting the conditions to meeting them. That is usually the safer choice for a one-time business event such as entering Closed Won, becoming High Risk, or first requiring approval.
I choose based on business semantics, not as a generic recursion switch. If the requirement is to recalculate a score whenever relevant inputs change while Status is Active, transition-only behavior would miss valid updates. In that case I use precise changed-field conditions or Decisions so the Flow runs only for inputs that matter.
How Entry Conditions Work explains current transition behavior for AND, OR, custom logic, and formula conditions.
4. How do you detect that Stage changed from Negotiation to Closed Won?
Strong answer
I compare current and prior state. The current Stage is available from $Record.StageName, and the prior value is available from $Record__Prior.StageName in the supported record-triggered context. The condition is not simply “Stage equals Closed Won”; it is “current Stage equals Closed Won and prior Stage did not equal Closed Won.”
I also define create behavior explicitly. A newly created record has no prior saved value. The Is Changed operator does not become true simply because a field has an initial value, so a create-or-update Flow may need a formula that handles new records or separate creation and update flows.
The test plan includes creation directly as Closed Won, a true transition, an edit while already Closed Won, and a reversal followed by another close. The business owner must decide whether reopening and closing again represents a second event.
Salesforce documents that Is Changed compares $Record with $Record__Prior and evaluates false on record creation in Flow Operators.
Bulk safety and re-entry
5. A Flow works for one record but fails during a bulk import. What do you inspect?
Strong answer
I reproduce the failure with a representative multi-record transaction and inspect the full automation chain. I look for Get, Create, Update, Delete, email, subflow, or Apex actions inside loops; queries that retrieve more rows or fields than needed; divergent branches that cause interviews to reach different elements; and multiple automations performing the same work.
For related-record processing, I build a record collection inside the loop and perform one Create or Update Records operation after the loop. I keep entry conditions narrow and query only the data required for the decision.
Salesforce bulkifies many operations across Flow interviews when they reach the same element, but it does not rescue inefficient logic inside one interview. A Create Records element inside a loop still performs an operation per iteration. “Flow bulkifies automatically” is therefore an incomplete interview answer.
The official Flow Bulkification in Transactions guide describes how interviews are grouped at bulkifiable elements and why DML should remain outside loops.
6. How do you update many child records without placing Update Records inside a loop?
Strong answer
I retrieve only the relevant child records, loop through the collection, assign the new values to the current item, add each changed record to a separate collection variable, and pass that collection to one Update Records element after the loop.
I challenge whether the parent update should touch every child at all. If the value can be calculated with a formula field or inherited through the data model, physically copying it creates synchronization work and can produce locking or volume problems. If the children truly need persisted values, I filter the Get Records query and update only records whose value must change.
I verify with zero children, one child, a realistic large set, children the running user cannot edit, and simultaneous parent updates. I also inspect automations on the child object because the collection update can start another chain of flows and triggers.
7. A Flow updates the triggering record and keeps running again. How do you stop recursion?
Strong answer
First, I remove the unnecessary second save: if the Flow only changes the triggering record, I move that work to before-save and assign $Record directly.
If after-save is required, I make the update idempotent and gate it on a meaningful change. For example, update Provisioning_Status__c only when the desired value differs from the current value, and start the Flow only when the business transition occurs. A checkbox called Flow_Has_Run__c can become stale, may need resets, and often hides the real lifecycle rather than modeling it.
Then I map cross-object re-entry. Opportunity updates Project, Project updates Account, and Account updates Opportunity is still recursion even if no single Flow updates itself. Flow Trigger Explorer, debug details, and transaction logs help reveal the complete cycle.
8. Five record-triggered Flows run on Opportunity. How do you control their order?
Strong answer
I first inventory all before-save, after-save, delete, and asynchronous paths for the object in Flow Trigger Explorer. For flows with the same object and trigger type, I set intentional Trigger Order values and document any dependency.
Ordering is not a substitute for modular design. If Flow B silently requires a field written by Flow A, the dependency should be visible in names, descriptions, tests, and the architecture record. If several flows repeatedly query the same data or require tightly coupled branching, consolidation or a Flow-and-Apex pattern may be clearer.
I also remember that the transaction can include Apex triggers and automation on related records. Reordering two flows does not establish a universal order across every automation technology.
Flow Trigger Explorer shows flows for the same object and event and lets administrators manage their relative Trigger Order.
Execution order and asynchronous work
9. Should an external API call run in the immediate path, an asynchronous path, or a scheduled path?
Strong answer
I start with the delivery requirement. If the user must receive the external result before the save completes, synchronous behavior may be required, but it increases latency and couples the Salesforce transaction to the remote system. Most notifications or provisioning requests do not need that coupling.
An asynchronous path runs in a separate transaction after the original record change commits, which is useful for simple work that can happen shortly afterward. A scheduled path is better when the action is tied to a future record-relative time, such as three days before renewal, and should be rescheduled or canceled as qualifying record data changes.
Neither option automatically creates enterprise-grade delivery. For critical integration I define an idempotency key, durable status, retry policy, reconciliation, alerting, authentication through approved credentials, and a recovery queue. At higher volume or reliability needs, a platform event, Change Data Capture, or Apex/integration pattern may be more appropriate than a fire-and-forget Flow callout.
Salesforce documents asynchronous record-triggered paths in Create a Record-Triggered Flow and record-relative behavior in Scheduled Paths.
10. A scheduled reminder fires after the record no longer qualifies. What would you review?
Strong answer
I review the Start configuration, the option for running on updated records, the time-source field, and whether the record stopped meeting the original conditions. I also confirm whether a later update rescheduled the path and whether the path checks current eligibility again before taking the action.
For an important reminder, I add a Decision at execution time. A record may have qualified when the interview was scheduled but become canceled, completed, or reassigned before the scheduled time. The action should validate the current state, not blindly trust an old scheduling event.
I test changes to both the qualifying condition and scheduled date: qualify, disqualify, move the date earlier, move it later, clear the date, delete the record, and re-qualify. I also monitor pending work and daily capacity rather than assuming every scheduled interview runs at the exact requested minute.
Errors, testing, and the Flow-versus-Apex decision
11. What should a good Flow fault path do?
Strong answer
A useful fault path makes the failure visible and preserves enough context to act. I capture the Flow and element, triggering record, running user, time, error category, and $Flow.FaultMessage where appropriate. I show a safe, useful message in an interactive Flow and route background failures to a durable support channel or error record.
I also decide transaction behavior. Handling a fault can allow the Flow to continue or finish instead of producing an unhandled failure, so the design must not accidentally commit half a business operation. In a screen Flow, the Roll Back Records element can cancel pending changes in the current transaction when the later step fails.
I avoid creating an error logger that can fail for the same reason as the original operation—for example, because the user cannot create the log record. Logging also must not expose secrets, sensitive payloads, or full customer data unnecessarily.
Salesforce’s Troubleshooting Flow Run Time Errors recommends descriptive element names, fault connectors, notifications, and testing as different users. Default Flow Error Handling explains what happens when a fault is unhandled.
12. When do you stop building in Flow and move to Apex?
Strong answer
I do not choose based on “clicks versus code.” I compare complexity, volume, transaction control, data structures, error recovery, ownership, and how densely automated the object already is.
Flow is a strong fit for straightforward, low-to-moderate complexity automation that administrators can govern visually. A hybrid is useful when Flow should orchestrate the business path but a bulkified invocable Apex action should perform complex calculation or data manipulation. I prefer Apex when the process needs efficient Maps or Sets, sophisticated deduplication, savepoints or partial-success DML, high-volume processing, or a tightly controlled automation framework.
The trade-off includes maintainability. Moving every non-trivial requirement to Apex creates developer dependency; keeping a deeply nested, query-heavy, high-volume process in Flow creates operational risk. I document the decision and test the public contract between Flow and invocable Apex, including collection inputs, outputs, failures, and security context.
Salesforce Architects compares these capabilities in the Record-Triggered Automation Decision Guide.
Design exercise: Closed Won onboarding
An interviewer gives you this requirement:
- When an Opportunity first becomes Closed Won, stamp the close-transition date.
- Create exactly one onboarding Project.
- Notify the implementation owner.
- Request provisioning from an external system.
- Do not block the sales user’s save if the external system is temporarily unavailable.
- Support UI edits and bulk integrations.
A defensible candidate design is:
| Requirement | Candidate design | Reason and trade-off |
|---|---|---|
| Stamp transition date | Before-save Flow using current and prior Stage | Updates the triggering record without a second DML cycle |
| Create Project | After-save Flow on the transition into Closed Won | Related-record creation requires after-save behavior |
| Prevent duplicate Project | Unique source key on Project plus lookup before create | Transition criteria help, but idempotent data design protects retries and re-entry |
| Notify owner | After-save or asynchronous path based on urgency | Do not slow the sales save for a non-critical notification |
| External provisioning | Durable request/status record, then async integration processing | Separates user save from remote availability and supports retry and reconciliation |
| Bulk support | Narrow entry criteria and collection-safe operations | Must work for API and import transactions, not only UI saves |
| Supportability | Fault record, correlation key, attempt status, and alert | Makes unknown and failed outcomes diagnosable |
I would challenge three shortcuts during the interview:
- A “processed” checkbox is not sufficient idempotency. Two transactions or a retry can race before the checkbox produces the expected protection. A unique business key on the created Project or provisioning request makes the invariant enforceable at the data layer.
- An asynchronous path is not the same as a reliable queue. Critical external work needs durable state, retry ownership, reconciliation, and an idempotency contract.
- A successful single-record Debug run is not a release gate. The design must be exercised with multi-record transactions and the other automation active on Opportunity and Project.
This is a candidate architecture, not a universal template. Exact choices depend on integration volume, licensing, required delivery guarantees, data skew, existing automation, and the team’s ability to operate each component.
Production verification checklist
Use a test matrix that covers behavior, not only element traversal:
| Test | Expected evidence |
|---|---|
| Create an open Opportunity | No close date, Project, or provisioning request |
| Change Negotiation to Closed Won | Date stamped and one Project/request created |
| Edit Description while already Closed Won | No duplicate Project or request |
| Reopen, then close again | Matches the documented business decision for a second close |
| Update a realistic batch | Correct results without query, DML, CPU, lock, or email-volume failure |
| External API is unavailable | Sales save succeeds; request remains observable and recoverable |
| Project creation fails | Fault handling produces actionable evidence without silent partial work |
| Least-privileged sales user runs it | Required actions succeed without granting unnecessary access |
| Deployment activates a new version | Trigger order, active version, and downstream automation are verified |
Before activation:
- Inventory record-triggered flows, Apex triggers, legacy automation, managed-package behavior, and related-object automation.
- Confirm entry conditions, current/prior logic, and create-versus-update behavior.
- Review every loop for queries, DML, email, subflow, and Apex actions.
- Verify Flow Trigger Explorer order and document intentional dependencies.
- Add fault paths where recovery or a useful error message is required.
- Create automated Flow tests for supported synchronous paths and add Apex or integration tests where Flow tests do not cover the behavior.
- Run negative, bulk, permission, failure, retry, and duplicate-prevention tests.
- Deploy inactive where the release process requires it, confirm dependencies, then activate deliberately.
- Monitor error emails, failed interviews, logs, integration status, and business reconciliation after release.
- Keep the previous known-good version and a written remediation plan.
Salesforce documents current automated test support and gaps—including limitations for asynchronous paths—in Automated Flow Testing Limits and Limitations. Design the remaining tests explicitly rather than treating uncovered behavior as verified.
Quick revision sheet
| Interview scenario | Start with | Common weak answer |
|---|---|---|
| Update the triggering record | Before-save and assign $Record |
Use after-save Update Records on the same record |
| Create or update related records | After-save | Force the work into before-save |
| Run once when a state begins | Transition entry criteria | Check only the current value |
| Detect a field transition | $Record and $Record__Prior |
Assume Is Changed is true on creation |
| Process many children | Build a collection, DML after the loop | Update inside the loop |
| Prevent repeated side effects | Idempotent design and meaningful entry conditions | Add an unexplained “has run” checkbox |
| Coordinate multiple flows | Flow Trigger Explorer and explicit dependencies | Depend on accidental order |
| Work can happen after commit | Async path with an operational plan | Treat fire-and-forget as guaranteed delivery |
| Act at a future record-relative time | Scheduled path plus execution-time eligibility check | Trust the old state without rechecking |
| Handle a fault | Decide rollback, recovery, evidence, and notification | Swallow every error and continue |
| Complex or high-volume processing | Evaluate Flow, hybrid, and Apex | Choose based only on no-code preference |
| Prove readiness | Automated, bulk, negative, security, and failure tests | Rely on one Debug run |
The strongest Flow candidates do not memorize element names. They explain what runs, when it runs, what else shares the transaction, what can repeat, how failure changes the outcome, and how the team will prove the result.
If your team needs help reviewing Salesforce automation or preparing for a Flow interview, contact SFX Support or use our Salesforce support assistant.
Sources
- Start an Automation When a Record Is Created or Changed — Salesforce Help
- Before-Save Record-Triggered Flows — Salesforce Help
- How Entry Conditions Work in Record-Triggered Flows — Salesforce Help
- Flow Bulkification in Transactions — Salesforce Help
- Manage Record-Triggered Flows with Flow Trigger Explorer — Salesforce Help
- Scheduled Paths — Salesforce Help
- Troubleshooting Flow Run Time Errors — Salesforce Help
- Automated Flow Testing Limits and Limitations — Salesforce Help
- Record-Triggered Automation Decision Guide — Salesforce Architects
Still working through a Salesforce problem?
Bring the context, the error, or the interview scenario. SFX Support will help you reason through it step by step.