Getting Started with Process Builder – Part 70 (Bypass Process for a Specific User or Profile)

Getting Started with Process Builder – Part 70 (Bypass Process for a Specific User or Profile)

Last Updated on December 3, 2020 by Rakesh Gupta

Big Idea or Enduring Question:

  • How can you bypass a Flow or Process Builder for a specific user tor profile? 

Until now, we have created many processes using Process Builder. It is an easy and fun experience to create processes. These processes will execute as soon as they meet the criteria. There are some situations, however, when a business may want to bypass a process!

Prerequisite

 Please go through this article first and make sure to create it:

  1. Getting Started with Process Builder – Part 47 (@Mention a related user in a Post to Chatter action

Objectives:

This blog post will help us to understand the following

  • Understand how to create a custom permission
  • Understand how to use custom permission to bypass flows or process
  • Understand how to clone an existing process 

Business Use Case

Pamela Kline is working as a System administrator at Universal Containers (UC). She has developed a Process (Getting Started with Process Builder – Part 47 (@Mention a related user in a Post to Chatter action) to auto-post Opportunity details to the UC Internal Announcement Chatter group whenever an Opportunity gets created with an amount greater than $ 100,000; and also, when a related user, Opportunity Approver (Custom field), is @ mentioned in that post.

Pamela has now received a requirement to bypass this process for the system administrator. A system administrator usually creates hundreds of Opportunities every week. And therefore, business users want to avoid too many Chatter Feed generated by the Process that we created in Series 47. 

Automation Champion Approach (I-do):

It is easy to bypass a Process for a single user or a profile – in this case, a system administrator – by adding a condition in your process, as shown in the following screenshot:

But what happens, if the business comes back after a few weeks and requests Pamela to bypass a Process for one more profile and one more user (belonging to a different profile). If this happens, it would create a headache for Pamela – how many times is she going to modify a process to bypass it for different profiles or users?

As if this was not bad enough, let us suppose that after a few months again, Pamela gets yet another requirement to bypass the process for a few more users who belong to different profiles – What a nightmare! Let us bypass this scary scenario itself! And, let us learn how to use custom permission with Process Builder.

Before discussing the solution, let me show you a diagram of a Process Flow at a high level. Please spend a few minutes to go through the following Flow diagram and understand it.

Let’s begin building this automation process.

Guided Practice (We-do):

There are 4 steps to solve Pamela’s business requirement using Process Builder. We must:

  1. Creating a custom permission
  2. Assign custom permission to the system administrator profile  
  3. Clone existing process
  4. Modify process criteria

Step 1: Creating a Custom Permission 

By using custom permissions, you can grant users access to custom apps. In Salesforce, you can use custom permissions to check which users can access certain functionality. Custom permissions let you define access checks that can be assigned to users via permission sets or profiles – similar to how you assign user permissions and other access settings. You can even use custom permission to bypass the validation rule for certain users or profiles. Let us create custom permission to bypass processes. 

  1. Click Setup.
  2. In the User Interface, type Custom Permissions.
  3. Click on the New button.
  4. Enter Label the Name will auto-populate. 
  5. Click Save.

Step 2: Assign Custom Permission to the System Administrator Profile 

  1. Click Setup.
  2. In the User Interface, type Profiles.
  3. Open the System Administrator profile. 
  4. Then navigate to Apps | Custom Permission and click on the Edit button.
  5. Now, assign the Skip process buildercustom permission to the profile.
  6. Click Save.

Step 3: Clone Existing Process 

  1. Click Setup.
  2. In the Quick Find box, type Process Builder.
  3. Select Process Builder, then select the process you have created in part 47.
  4. Click on the Clone button available on the button bar. It will open a popup for you.
  5. Under Save Clone As, select Version of current process option.
  6. Click Save.

Step 4: Modify Process Criteria

Now you can modify the process as per the business requirement. We will add one condition to our process to check whether the user has access to Skip process builder custom permission or not. 

  1. Click on the Amount> 100000 nodes to begin defining the process criteria.
  2. The criteria should execute actions when the Formula evaluates to true.
  3. Build Formula
  4. Add the first criteria [Opportunity].Amount > 100000 
  5. Click Save.

Add another criterion to check custom permission. Now click on the System Variable dialog, It will open a popup where you have to select Permission and then select a custom permission Skip process builder, as shown in the following screenshot: 

Finally, your Process Builder entry criteria should look like the following screenshot:

Almost there! Once everything looks good, click the Activate button. 

Proof of Concept

Now onwards, if an Opportunity gets created with an amount more than 100K, then the process will post a message to Chatter Group UC Internal Announcement. This process will only work when an Opportunity is created by users whose profile does not equal the system administrator (because we have assigned custom permission to these profiles). If you want to bypass a process for a single user, then consider using permission set instead of using the profile.

Formative Assessment:

I want to hear from you!  

What is one thing you learned from this post? How do you envision applying this new knowledge in the real world? 

Let me know by Tweeting me at @automationchamp, or find me on LinkedIn.

Have feedback, suggestions for posts, or need more information about Salesforce online training offered by me? Say hello, and leave a message!

4 thoughts on “Getting Started with Process Builder – Part 70 (Bypass Process for a Specific User or Profile)

  1. Hi Rakesh, where do you actually define that it bypasses Process Builder in this example? I only see a label and name ‘skip process builder’ in screenshot from step 1, that wouldn’t do it just by itself would it? Are you using Apex on the background somewhere?

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.