Ever Needed to Select Multiple Picklist Values in Process Builder? How About via a Single Condition?!

Ever Needed to Select Multiple Picklist Values in Process Builder? How About via a Single Condition?!

Last Updated on February 10, 2022 by Rakesh Gupta

Process Builder is one of the most powerful tools provided by Salesforce to implement business requirements declaratively. Till date, we have created many processes to fulfill business requirements. I have created 100+ processes just for my blog posts!

Process Builder helps businesses to save time, as well as money, by implementing solutions quickly. Implementation of Process Builder is straightforward – you create a Process; tests it; and then, use Change Set to deploy it to Production.  The best part is, you do not have to write test classes for your Processes or Flows. 

But there are few limitations of Process Builder vis-a-vis Workflow! Yup! You read that right! Workflow has an upper hand when defining Rule Criteria!

Let me unravel this mystery by offering an example: As a System Administrator, you receive a requirement to auto-create a Quote record whenever Opportunity Stage is Proposal/Price Quote or Negotiation/Review

To achieve the above business requirement, through a Workflow Rule, you may do something similar to as shown in the following screenshot: 

But to achieve the same requirement through Process Builder, you may do something similar to as shown in the following screenshot:  

If you created processes using Process Builder before then, you know how I set two values for Stage picklist. But, for those, who are relatively new to Process Builder, let me walk you through the process step-by-step. Workflow Rule allows you to select multiple values for a picklist. If you look at the Workflow Rule screenshotI have chosen (defined) both the picklist value in a single line using commas (,). 

But if you try to achieve the same thing using the Process Builder, it will not work. Unlike Workflow rules, one cannot develop a rule criteria to select multiple picklist values, in a single stroke, using Process Builder! For the detailed explanation, please refer to the following article published by Salesforce – CONTAINS with multiple comma separated values does not trigger a Process Builder or a Flow.

The solution suggested by Salesforce (is the same as I have used in Process Builder screenshotis good for the simple business use case. But what about a complicated requirement where you need to take other things into consideration (like Amount > $1000 and Close Date > Today) while defining process criteria? 

Ugh!! what a nightmare – Prone to errors and a whopping headache!

For, in the aforementioned scenarios, you will be using multiple AND/OR statement, as I did in the preceding screenshot – (1 AND 3 AND 4 ) OR (2 AND 3 AND 4 ).

Thanks to highly talented users of automationchampion.com blog for their constructive feedbacks and, especially, for challenging me to come up with a streamlined solution for the aforementioned problem. Well, challenge accepted!

In this article, I am going to share my tricks to solve the above business use case using a simple formula. Let us start with a business use case.

Business Use Case

Edward Backhouse is working as System administrator at GurukulOnCloudAt GurukulOnCloud they are using Process Builder to streamline Sales Processes. Today, Edward received a requirement to auto-create a Quote record – as soon as an Opportunity meets the following conditions: 

  • Stage = Proposal/Price Quote or Negotiation/Review
  • Amount > 1,000
  • Close Date > Today

Solution for the above business requirement

There are a few possible solutions for the above business scenario, but we’ll use Process Builder to solve the above business requirementBefore trying to understand the technical aspect of the solution, let us spend some time to understand the Case formula in Salesforce and how to use it. 

  1. To create a new process from scratch, click on the New Button available on Process Management page. A popup will appear where you have to enter the Name (Use Auto create a quote as the name)API Name and Description as shown in the screenshot below:
  2. Once you are done, click on the Save button.
  3. Click on the Object node to add object and then select the Opportunity object. For the entry criteria, select when a record is created or edited, as shown in the screenshot below:

    Evaluation Criteria
    Evaluation Criteria
  4. Once you are done, click on the Save button.
  5. The next task is to add Process Criteria, so that process will only fire when it meets the stated criteria. To do this click on Add Criteria, enter NameType of action and set filter conditions, and follow the instructions below
    1. For Criteria for Executing Actions, select Conditions are met
    2. Set conditions – 
      1. [Opportunity].Amount Greater than Currency $1000
      2. [Opportunity].CloseDate Greater than Formula Today()
      3. [Opportunity].Stage Equals Formula 
        1. CASE([Opportunity].StageName ,
          “Proposal/Price Quote”, “Proposal/Price Quote”,
          “Negotiation/Review”, “Negotiation/Review”,
          At the end, process criteria will look like the following screenshot: 
  6. Once you are done, click on the Save button.
  7. Now we have to add an Immediate action to the Process to create a quotation record. Click on Add Action (Under Immediate actions), Select the type of action (In our case Create a Record), and then fill the values into fields to define the action – as shown in the following screenshot:
  8. Once you are done, click on the Save button. 
  9. In the end, your Process will look like the following screenshot:
  10. Do not forget to activate the Process by clicking on the Activate button.

It’s time to test this feature

Next time, when Opportunity records are created, or updated, by the user, the process we created (Using Process Builder) will fire and check the criteria. If it meets the stated criteria then, the Process will create a Quote record, as shown in the following video 

I hope you can learnt from the blog about how to select multiple picklist values using Process Builder!! Yes, go ahead! Show off your newly acquired skills to your friends, colleagues and families!

Jokes apart, mastering these skills will enhance your productivity and propel you to try various permutations and combinations to incorporate automation in your day-to-day processes and procedures.

Please feel free to add constructive comments, insights – and yes, challenges too! – to the blog. Good Luck in your Journey towards becoming a Salesforce Ninja!

Note: – I am grateful to Resco.net and Smartcloud.io for sponsoring my blog.

Technical Editor and Proofreader: - Munira Majmundar
Have feedback, suggestions for posts, or need more information about Salesforce online training offered by me? Say hello, and leave a message!

Leave a Reply

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