Rule registry · FL-009

Automation bypass mechanism

Checked by the Salesforce Flow scan. Severity medium.

FL-009MediumMaintainability

What it requires. Record-triggered and autolaunched flows must include a bypass mechanism (Custom Metadata flag, Custom Setting flag, or custom permission check) that allows automation to be disabled without deployment, for use during data loads and sandbox seeding.

Why it matters. Without a bypass, bulk data loads – sandbox seeding, migrations, data fixes – trigger all automation on every affected record. A bulk load of 200 Contacts will invoke a Contact record-triggered flow 200 times within the same or consecutive transactions, rapidly consuming SOQL and DML governor limits and potentially causing the entire load job to fail. A bypass allows administrators to disable flows safely without a deployment.

How to fix it. Add a Custom Metadata type (e.g. Flow_Bypass__mdt) with a boolean Active field keyed by flow developer name; at the start of each applicable flow, fetch this record and exit immediately if the bypass is active. A custom permission check (for example an entry condition or Decision on $Permission.Bypass_Flow) is an equally acceptable mechanism, and suits per-user bypass where an integration or data-load user should skip automation that still runs for everyone else.

Source. Salesforce Admins: The Ultimate Guide to Flow Best Practices and Standards – Build a bypass in your flows

Is this rule worth checking?

Votes and comments are published here. We read them, and we publish what we change with the reasoning — a vote does not move a rule on its own.

Every rule we check, every source, and every one we turned down