How to Bypass Salesforce Flows Using Custom Permissions
Bypass Salesforce Flows during a data migration without deactivating your automation. When you’re importing records into Salesforce, record-triggered Flows can run automatically and perform actions that may not be appropriate for your migration data.
In this tutorial, you’ll learn how to create a permission-based Flow bypass using a Custom Permission and Permission Set. This allows you to keep the Flow active for regular users while preventing it from running for the specific user performing the data migration.
🎯 What You’ll Learn
By the end of this tutorial, you’ll know how to:
- 🔐 Create a Custom Permission called
Bypass Flows - 🛡️ Create a Permission Set and add the Custom Permission
- 👤 Assign the Permission Set to your migration user
- ⚙️ Modify a record-triggered Flow to check for the bypass permission
- 🚫 Prevent the Flow from running for users with the bypass permission
- 🧪 Test the Flow to confirm the bypass works correctly
The goal is simple: keep your Salesforce Flow active while giving your migration user a controlled way to bypass it during data imports.
⚠️ Why Bypass a Salesforce Flow During Data Migration?
When you're importing new data into Salesforce, you don't always want your record-triggered Flows to run. A Flow that is useful for everyday Salesforce activity can sometimes create unwanted automation during a data load.
In the tutorial example, there is an active Flow that runs when a record's status changes to Active. When that condition is met, the Flow automatically sets the Client Start Date to today's date.
The Flow is active and automation runs normally.
Normally, this is exactly what we want. But during a migration, the user importing records may need to prevent that automation from running.
Instead of deactivating the Flow, we'll add an additional condition that checks whether the running user has the Bypass Flows permission. If the user does not have the permission and the record meets the normal entry criteria, the Flow runs. If the user does have the permission, the Flow is bypassed.
🔐 How to Set Up the Salesforce Flow Bypass
The setup has four main parts. First, we'll create the permission, then connect it to a Permission Set, assign that Permission Set to the migration user, and finally use the permission inside the Flow.
Create a Custom Permission Called "Bypass Flows"
The first step is to create the Custom Permission that Salesforce will use to identify users who should be allowed to bypass the Flow.
In Salesforce, go to the area for Custom Permissions and create a new permission.
Create a "Bypass Flows" Permission Set
Once the Custom Permission is created, create a new Permission Set. Give it the same logical name:
For this setup, you do not need to assign a license type. The Permission Set will simply provide a controlled way to give the appropriate user access to the Custom Permission.
Add the Custom Permission to the Permission Set
Open the new Bypass Flows Permission Set and scroll down to the Custom Permissions section.
Modify the Custom Permissions section so you can add the Bypass Flows permission you created in Step 1, then save the Permission Set.
Assign the Permission Set to Your User
From the Bypass Flows Permission Set, open Manage Assignments and choose Add Assignment.
Select the user who will be performing the migration and click Assign.
Your migration user now has the Bypass Flows permission. The next step is to modify the Flow so it can recognize that permission.
Best Practices When You Bypass Salesforce Flows
A Flow bypass gives you control during a data migration, but it should be used carefully. The goal is not to permanently turn automation off — it's to create a controlled exception for the user performing the migration.
Keep the Flow Active
Don't deactivate the Flow just because you don't want it to run during an import. The bypass allows the Flow to remain active while preventing it from running for the designated migration user.
Limit the Permission
Assign the Bypass Flows Permission Set only to the user who actually needs to perform the migration. Avoid giving regular users unnecessary bypass access.
Test Before Importing
Test the Flow with a user who has the bypass permission and another user who does not. This confirms that the automation behaves differently for each user as intended.
Check the Entry Criteria
When modifying the Flow, make sure the original business condition still works. The bypass should be added to the logic without accidentally changing when the Flow normally runs.
Use a Dedicated Migration User
When possible, use a dedicated user for your data-loading process. This makes it easier to identify which records were imported with automation bypassed.
Review the Imported Data
Bypassing a Flow does not automatically make the imported records correct. Review the results afterward and confirm that any information normally created or updated by the Flow is handled appropriately.
✅ Migration-Ready Checklist
Before you start the data import, check each item below.
Can You Build the Salesforce Flow Bypass?
Before moving on, test your understanding of the Flow entry criteria. The goal is simple: the Flow should run when the record meets the normal condition, but not when the running user has the Bypass Flows permission.
🎯 Your challenge: Which condition belongs in the blank so that users with the bypass permission do not trigger the Flow?
Status = "Active",
??? Choose below ???
)
💡 The Flow should run only when the user does NOT have that permission.
If the record has Status = Active AND the running user does not have the Bypass Flows permission, the Flow runs.
AND(
Status = "Active",
NOT($Permission.Bypass_Flows)
)
🎯 Will the Salesforce Flow Run?
You've built the Bypass Flows permission. Now test whether you understand how the bypass actually works.
Nice work!
Frequently Asked Questions About Bypassing Salesforce Flows
Need a quick answer? Open a question below to understand how a Custom Permission, Permission Set, and Flow entry criteria work together to bypass automation for specific users.
Once the permission is assigned, modify the Flow's entry criteria so the Flow can recognize whether the current user should bypass it.
After the migration, you can also remove the Permission Set from the user when the bypass is no longer required.
Once the migration is complete, you can remove the Bypass Flows Permission Set from the migration user.
🚀 Ready to Go Beyond Flow Bypasses?
You've learned how to keep a Salesforce Flow active while giving a specific user a controlled way to bypass it. Now take the next step and build stronger skills in Salesforce administration, automation, and data migration.
Explore Salesforce Masterclass →
One Response