About Salesforce Process Builder
Using Salesforce’s Process Builder is one of the most powerful tools in an administrator’s arsenal. It allows you to automate your organization’s business processes to save time and prevent user errors. Its use case is very similar to that of Salesforce Workflows, but is a more robust and highly customizable solution.
Process Builder is also the future of Salesforce automation. Salesforce will no longer be enhancing Workflow functionality and expanding its use cases, though they will continue to support your workflow rules if you are currently using any. It is also best practice to avoid mixing processes for an object, Workflows and Process Builder, as the evaluation order cannot be guaranteed, so it is best to choose one solution or the other.
Salesforce Workflow vs Process Builder
In Salesforce, a Workflow allows you to automate standard internal processes and procedures across your Salesforce org. A workflow is comprised of a workflow rule, which is a container for a set of workflow instructions, which is summed up in an if/then statement. Be aware that Salesforce limits the number of total and active rules in your org, the number of time triggers and actions per rule, and it processes a limited number of daily emails and hourly time triggers.
Process Builder is a point-and-click tool that lets you automate if/then business processes while seeing a graphical representation of your process as you build it. Every process consists of a trigger, at least one criteria node, and at least one action. You can configure immediate actions or schedule actions to be executed at a specific time. The Process Builder allows you to have multiple workflows, with their corresponding actions, and allows you to set the exact evaluation order. It also allows you to access fields on any related record, not just the parent record like a Workflow, and it allows you to automate more processes. Unlike a Workflow, Process Builder’s Create a Record can create any record, not just tasks, on any related record. It also has the ability to Post to Chatter and Submit for Approval.
Creating a Process Builder
To create a Process Builder navigate to Setup and in the Quick Find box, in the upper left, type “process”. Then select Process Builder under the Process Automation section.
This will bring you to the Process Builder Home screen. This screen will show you all your created processes, their name, a Description of the process (if provided), what Object it is related to, the Process Type, the last time it was Modified, its Status (active or inactive).
To create a new Process select New, located in the upper right hand of the Process Builder Home screen.
A pop-up will appear to create your new process. This is where you will name your process, add a description if you would like and decide what trigger will start your process.
In most cases you will select “A record changes”, if a record changes at any point and you have a Process for that record, the Process will run, checking to see if any of your criteria have been met.
The second start option is “A platform event message is received”. Platform events are the event messages (or notifications) that your apps send and receive to take further action. You use these platform events to connect business processes in Salesforce and your external sources.
The final option is to select “It’s invoked by another process”. This gives you the ability to reuse processes so that you do not have to redo work. You can invoke processes with objects that share at least one unique ID. For example, in the Account and Case objects, the AccountId field is unique to Account and also used by Case. You can create an invocable process that updates a Case record, then you can invoke it from a process that adds an Account shipping address or updates it.
After pressing save you will be brought to the Process Builder Flow Chart. This is where you build your process.
When on this screen your first step is to choose the Object for which the Process will be used for. For this demonstration we will be creating a simple Process that automatically sends an email when a particular stage is closed. When you choose your Object you will select whether it triggers when a record is “only when a record is created” or “when a record is created or edited”, in this example we selected “when a record is created or edited”, if needed you can also add recursion to the process. Recursion allows for the record to be evaluated up to six times during a single save operation, this will allow other automation updates to occur during the same time if you have multiple.
Next, add the criteria (if/then statement) that triggers the action. Here you will name the criteria, select the criteria for executing, then set the conditions and any logic for the conditions. In our example we chose “Conditions are met” for the criteria and set the conditions as Stage equals “Dealer Commission” AND Stage is changed equal True AND DC Notification Equals False (these are stages and fields associated with our opportunity record type). If you need your action to be scheduled in the future you will need to Press the carrot next to advanced and check “Yes” (this is also available if your process only triggers when created), otherwise Press “Save” to save the criteria and continue.
Now press “Add Action” in the Actions Node. Here is where you will select the action you would like to perform. In our example we will select “Email Alert”, but this is where the power of the Process Builder can be seen. You can update records, trigger custom flows and custom APEX codes, and more.
Name your Action, set any additional criteria if applicable and set the action. Press Save.
From here you can Activate your Process or add another workflow.
If your process has multiple workflows, you can drag and drop them anywhere within your process flow chart to determine what action happens when.
If you have another workflow that you would like evaluated after they first one has completed, press the node “Stop” and select “Evaluate the next criteria” then Save.
After a Process has been activated you must Clone an existing version of the Process in order to Edit/Update it. Then activate the cloned version.
If you click the carrot next to the Process it will show you all versions created and not deleted, as well as, any Actions available (activate/delete) for the process.
To view a process, click on the version you would like to look at, or if the version hierarchy is not showing, just click on the process name.
The Process Builder is a very powerful tool in the automation of your org’s business process. It will automate aspects of your business process to prevent errors, give your users more time and reduce costs.