SalesforceWizard

Flow debugging interview questions

When a flow fails in production, someone has to find out why. These questions cover the tools and the reasoning interviewers want to hear.

0 of 14 reviewed
On this page (4 sections)The debugging toolsCommon errors and what causes themPreventing failuresA method to say out loud

Most admin and consultant interviews now include a flow that "stopped working". Interviewers are not testing whether you know where the Debug button is. They want to hear a method: where you look first, how you reproduce the problem safely, and how you stop it happening again. This page follows that method, from the tools to real failure scenarios.

The debugging tools

01

What options does the Debug button in Flow Builder give you?

Beginner

What the interviewer is checking: That you know debug runs can change real data, and how to avoid it. Mentioning rollback mode shows care.

Debug runs the flow from the builder and shows every element it went through, the decisions it took and the value of each variable. The options worth naming in an interview:

  • Run the flow as another user, to reproduce permission problems. An admin must first turn on "Let admins debug flows as other users" in Process Automation Settings.
  • Rollback mode for record-triggered and autolaunched flows, so the debug run does not leave changed records behind.
  • Choose the triggering record and, for update triggers, set the old and new field values, so you can test a specific change.
  • Skip the start conditions, to test the logic even when the record would not normally trigger the flow.
02

A flow failed in production. Where do you look first?

Beginner
  1. The flow error email. It names the flow, the element that failed, the error and the values at that moment. Process Automation Settings decide who receives it: the person who last changed the flow, or the Apex exception email recipients.
  2. Paused and Failed Flow Interviews in Setup, which lists failed runs. You can open a failed interview in Flow Builder to see the path it took.
  3. A debug log on the affected user, if you need to see the flow alongside Apex, validation rules and other automation in the same transaction.

Then reproduce it in a sandbox with Debug, using the same record values, before changing anything.

Common mistake: Editing the flow in production to 'try a fix'. Reproduce in a sandbox, fix there, then deploy.

03

How do you see a flow in a debug log?

Intermediate

Set a trace flag on the user who runs the flow, with the Workflow category at FINER or FINEST. The log then shows each flow element as it runs, next to the Apex code, triggers and validation rules in the same transaction. This is the best way to answer "which automation changed this field?" when several tools touch the same object.

For scheduled and asynchronous paths, check which user the path runs as; it is often the Automated Process user, so put the trace flag on that user.

Common mistake: Setting the trace flag on yourself when the flow runs as a different user, then deciding the flow 'did not run' because your log is empty.

04

What is Flow Trigger Explorer?

Beginner

A view that lists every record-triggered flow on an object, grouped by when it runs (created, updated, deleted) and by before-save or after-save, in the order they run. When two flows change the same field, it shows you at a glance which one runs last and wins. You can set the order between flows with the trigger order value on each flow.

05

How do you stop a flow failure from showing users an unhelpful error?

Intermediate

What the interviewer is checking: Whether you design for failure. Senior candidates mention logging failures somewhere the team will see them.

Add fault paths to elements that can fail: Get, Create, Update and Delete Records, and actions such as sending email or calling Apex. On the fault path you can log the error to a custom object, notify the support team, and in a screen flow show the user a clear message.

In a record-triggered flow, the Custom Error element lets you stop the save and show a message on the record page or next to a field, the way a validation rule does.

Common errors and what causes them

06

A flow fails with 'Too many SOQL queries: 101'. What is the likely cause?

Intermediate

A Get Records element inside a Loop. The loop runs once per item, so 150 items mean 150 queries, and the transaction limit is 100. The fix is to query once before the loop, then find the related records in the loop with a Decision or by matching in a collection, and to do one Update or Create after the loop with a record collection.

Also remember that a record-triggered flow shares limits with everything else in the transaction: Apex triggers, other flows and the code that saved the record. A flow can fail because of queries it did not make.

Common mistake: Saying the flow 'has too many records'. Flows handle large volumes fine; queries and DML inside loops are what break them.

07

A record-triggered flow works when users edit one record but fails during a data load. Why?

Advanced

Flows are bulkified for you when they are built well: if 200 records are loaded together, Salesforce groups the flow's Get and Update elements across all 200 records. The grouping breaks when a flow does things per record that cannot be combined, such as Get Records inside a loop, or an invocable Apex action that was not written to handle a list.

Test with a data load of a few hundred records in a sandbox before go-live. Errors that appear only in bulk are almost always queries or DML inside loops, or Apex actions that are not bulk-safe.

08

A flow updates the wrong field value, and you do not know which automation is responsible. How do you trace it?

Intermediate

What the interviewer is checking: A structured approach under uncertainty. Interviewers often follow up with 'and how do you stop it happening again?'

  1. Check the field history (turn on field history tracking if needed) to see when the value changed and which user saved it.
  2. Open Flow Trigger Explorer for the object, and look for flows that update that field.
  3. Search for other automation on the field: Apex triggers, other flows, approval steps, and integrations that use the API.
  4. Run a debug log during the save, and follow the field through the log to see the last thing that set it.
09

Why does a record-triggered flow seem to run twice?

Intermediate

Usually because the record is saved twice in the same transaction. An after-save flow updates the triggering record, or another flow or trigger updates it, and that second save runs the save process again, so automation on the object can run again for the new change. If the flow's conditions still match, its actions repeat.

Fixes:

  • Use a before-save flow to change fields on the triggering record, because it needs no extra update.
  • Choose "Only when a record is updated to meet the condition requirements", so the flow runs only when the condition changes from false to true.
  • Tighten the entry conditions, for example with ISCHANGED on the fields you care about.
10

What is a mixed DML error in a flow, and how do you fix it?

Advanced

It happens when one transaction changes a setup object, such as a User or a permission set assignment, and a normal object, such as an Account. For example, a flow that creates a Contact and then deactivates a User. Move the setup-object work to an asynchronous path in a record-triggered flow, so it runs in its own transaction.

11

A screen flow works for admins but users get an error. What do you check?

Intermediate
  • Whether the users' profile or permission set can run the flow at all.
  • Whether they have access to the objects and fields the flow reads and writes, if the flow runs in user context.
  • Record sharing: a Get Records can return nothing for a user who cannot see the record, and a later element fails on the empty value.

Debug as that user to see exactly where it breaks. Only switch the flow to run in system context if the business really needs users to change records they cannot normally edit, and say so in the flow's description.

Common mistake: Switching the flow to system mode without access as the first fix. It hides the problem and can expose data users should not see.

12

How do you deal with paused or waiting flow interviews that are stuck?

Advanced

Find them in Paused and Failed Flow Interviews. Check why each is waiting: a screen flow paused by a user, or a scheduled path waiting for its time. If the flow logic was wrong, fix and activate a new version; the waiting interviews keep the version they started with, so delete those that should not continue and let the process start again for the affected records.

Preventing failures

13

How do you test a flow before deploying it?

Intermediate

Debug it with each important path: a record that meets the conditions, one that does not, and edge cases such as empty fields. For record-triggered flows, save flow tests in Flow Builder, which set up a triggering record and assert the outcome, so anyone can run them again after a change. Then do a bulk test with a data load in a sandbox, and check the debug log for limits used.

14

What would you put in place so the team hears about flow failures quickly?

Advanced

What the interviewer is checking: Ownership. This question is common in senior admin and consultant interviews, where you run the org, not just build in it.

  • Send flow error emails to a shared mailbox or the Apex exception recipients, not to whoever last edited the flow.
  • Use fault paths that create a log record, and a report or dashboard on those logs that the team checks daily.
  • For important flows, send an alert to the team channel from the fault path.

A method to say out loud

When an interviewer describes a broken flow, answer in this order: find the error (email or failed interviews), reproduce it in a sandbox with Debug, find the cause (limits, access, other automation or data), fix it, and add a fault path or test so it does not happen again. Five steps, in that order, beat a long list of features every time.

Chat on WhatsApp