Concept 2 of 7Lightning Flow

Designing record-triggered flows

Entry conditions, when to run, before vs after save, how many flows per object, trigger order, recursion, fault paths, and coexistence with Apex triggers.

Your confidence:Not rated

Simple explanation

Design decisions for each record-triggered flow

  1. Object and event: created, updated, created or updated, deleted.
  2. Entry conditions: narrow them (for example Status changed to Escalated), and use "only when a record is updated to meet the condition requirements" to avoid re-running on every edit.
  3. Before or after save: same-record field updates β†’ before; anything else β†’ after.
  4. Paths: immediate, scheduled paths, asynchronous path.
  5. Error handling: fault paths on elements that can fail (DML, actions, callouts), logging to a record or platform event.

How many flows per object? Either one flow per object and timing (a "dispatcher" with decision branches and subflows) or several focused flows with trigger order values. Many orgs use several focused flows with tight entry conditions and explicit order, which is easier to maintain than one giant flow.

Coexistence with Apex: agree ownership per object, or use a trigger framework that orders Apex and Flow actions. Before-save flows run before before triggers; after-save flows run after after triggers (simplified).

Real-world analogy

Entry conditions are a bouncer at the door: the stricter the guest list, the fewer people inside to manage. Trigger order is the running order of a show: without it, acts walk on stage at random.

Worked example

Opportunity automation with focused flows:

FlowTimingEntry conditionOrder
Opp – DefaultsBefore saveCreated, or Stage changed10
Opp – Discount approvalAfter saveDiscount changed to > 15%20
Opp – Won handoverAfter save + async pathStage changed to Closed Won30
Opp – Close date reminderScheduled pathOpen and CloseDate in 7 days40

Each after-save flow has fault paths that create an Automation_Error__c record with the flow name, record ID and error message, and an admin alert.

Diagram

Rendering diagram…

Key points

  • Tight entry conditions and run only when updated to meet criteria.
  • Before-save for same-record updates; after-save for everything else.
  • Trigger order values for multiple flows on one object.
  • Fault paths with logging on every element that can fail.
  • Agree Flow vs Apex ownership per object.
  • Use subflows to share logic across flows.

Limits and gotchas

  • Flows bulkify element by element across records in the same transaction, but loops with DML or Get Records inside still hit limits.
  • After-save flows updating the triggering record cause another save (and re-run automation); prefer before-save for that.
  • Recursion: a flow that updates related records whose own flows update the original record can loop; design entry conditions to prevent it.
  • Deactivating and reactivating flows changes versions; deploy carefully.

🎀 How to say this in an interview

Interviewers look for entry conditions, before vs after save, order, fault paths and coexistence with Apex. Show a small table of flows for one object like the example above.

Common follow-ups

One big flow per object or many small ones?

Many small, focused flows with tight entry conditions and explicit trigger order are usually easier to test and change. A single dispatcher flow can work for simple objects, but it grows hard to maintain.

How do you handle errors in record-triggered flows?

Fault paths on DML, actions and callouts that log to an error object or platform event and notify admins. Decide whether the user's save should fail (rollback) or succeed with the error logged.