Real requirements, real surprises
Design flows from the trigger outwards, keep them bulk-safe, and explain surprises with the rule behind them: re-entry, missing prior values, loops and faults.
- ScenariosTasks, counts and reminders.
- PuzzlesDouble runs, empty prior values and limits.
- FixesEntry conditions, fault paths and before-save.
Most Flow interviews end with real requirements and “why does this happen?” puzzles. Each answer below gives the flow design (with a diagram where it helps) or the rule behind the surprise.
1. When an Opportunity is Closed Won, create a project and three onboarding tasks.
After-save record-triggered flow on Opportunity
- EntryStageName = Closed Won, only when updated to meet the condition
- Create ProjectLinked to the Opportunity and Account
- AssignmentBuild 3 tasks in a collection (kick-off, setup, review)
- Create RecordsOne DML for all tasks
- Fault pathLog the error and notify the admin
2. Count open Cases on each Account (a lookup, so no roll-up summary).
A record-triggered flow on Case (create, update, delete) that, for the affected Account, runs a Get Records of open Cases for that Account, counts them with an Assignment (Equals Count) and updates the Account. When the Case moves to a different Account, also recount the old Account using $Record__Prior.AccountId.
3. Remind the owner three days before an Opportunity's close date.
A record-triggered flow with a scheduled path set to 3 days before the Close Date field, with entry conditions for open opportunities. The path sends a notification or email. If the close date changes, the schedule adjusts.
4. Why does my after-save flow run twice on one save?
Usually because something in the same transaction updated the record again — the flow itself, another flow, a workflow field update or an Apex trigger — and the record re-entered the save cycle. Add entry conditions (“only when updated to meet the condition”), compare with $Record__Prior, and move same-record updates to a before-save flow.
5. Why does “Too many SOQL queries: 101” appear only during data loads?
A Get Records sits inside a loop or the flow is not bulk-safe; with one record it works, but a 200-record load runs the query 200 times in one transaction. Move data elements out of loops and use collections.
6. Why is $Record__Prior empty in my flow?
The flow is triggered on create (there is no previous version) or configured for “created or updated” and the current run is a create. Check with a Decision whether the record is new (ISNEW() in a formula) before comparing prior values.
7. Why did my screen flow create the record twice?
The user pressed Previous and then Next again after a Create Records element, running it a second time. Create records at the end of the flow, or store the created Id and skip creation if it already exists.
8. A validation rule blocks the flow's update and users see a generic error. Fix it.
Add a fault path on the Update Records element: on a screen flow show {!$Flow.FaultMessage} in friendly words; on a record-triggered flow, log it and use a custom error element to show a clear message on the record. Also check whether the flow should set the missing field first.
Remember
Key points
- Recount old and new parents
Use $Record__Prior for moves.
- Scheduled paths for reminders
Relative to date fields.
- Re-entry causes double runs
Guard with entry conditions.
- Create at the end of screen flows
Avoid duplicates on Previous.
Interview drill
Follow-up questions
What the interviewer asks after your first answer. Turn on practice mode, answer each one aloud, then reveal.
-
1 How do you stop a record-triggered flow during a data migration? Intermediate
Add an entry condition or Decision that checks a custom permission or hierarchy custom setting assigned to the migration user.
-
2 Can a before-save flow use $Record__Prior? Intermediate
Yes, in update-triggered before-save flows, to compare old and new values.
-
3 How do you send a different email to VIP customers? Basic
Add a Decision on the customer tier and use different text templates or email templates per outcome.
-
4 Why does Get Records return only the first record? Basic
“Only the first record” is selected in its settings; choose “All records” to get a collection.
-
5 How would you prevent deleting an Account that has open Opportunities? Intermediate
Use a before-delete record-triggered flow with a Custom Error element when open opportunities exist (or an Apex trigger with addError).
-
6 What happens to running scheduled paths when a flow is deactivated? Advanced
Already-scheduled actions for that version still run unless you delete them from the Paused and Failed Flow Interviews / Time-Based Workflow list.