Automate Simple Business Processes with Process Builder
- List the types of processes that you can build in Process Builder.
- Define the key components used to create a process.
- Build a process that updates the addresses for an account's contacts when the account’s address is updated.
Get Started with Process Builder
Process Builder is a point-and-click tool that lets you easily automate if/then business processes and see a graphical representation of your process as you build.
The Components of a Process
Here’s an example of a simple process.
Trigger: Identify When the Process Should Run
The trigger identifies when the process should run. For record change processes, the trigger determines which object and which of the following changes the process should pay attention to.
- Only when a record is created
- Anytime a record is created or edited
Criteria: Determine Whether or Not to Execute Actions
While a process gets one trigger, you can add as many criteria nodes as your heart desires. Each criteria node controls whether or not the process executes the associated actions. If the record doesn’t meet the criteria, the process skips those actions and moves on to the next criteria node in the process.
In each criteria node, you can:
- Set filter conditions.
- Enter a custom formula. Like in validation rules, the formula must resolve to true or false.
- Opt out of criteria and always execute the associated actions.
Actions: What the Process Should Do
When a criteria node evaluates to true, the process executes the associated actions or waits to execute them at a scheduled time.
- Each immediate action is executed as soon as the criteria evaluates to true.
- Each scheduled action is executed at the specified time, such as 10 days before the record’s close date or 2 days from now. At the specified time, Salesforce makes sure that the associated criteria node still evaluates to true. If so, the scheduled
action is executed. You can schedule actions based on either:
- A specific date/time field on the record that started the process. For example, a month before an account's service contract expires.
- The time that the process ran. For example, 3 days from now.
Regardless of when the actions execute, here are some of the things you can do with a process action.
- Create records.
- Update the record that started the process or any related record.
- Submit that record for approval.
- Update one or more related records.
- Send emails using a specified email template.
- Post to a Chatter feed.
If you need more than what’s available in Process Builder, build an autolaunched flow or an Apex class to fill that gap. Then call the flow or Apex from the process.
||Process Starts When
||A record is created or edited
||It’s called by another process
||A platform event message is received
To keep things simple, this unit focuses on the most common process type: Record Change.
The button bar (1) lets you manage the process or view the list of all processes.
The canvas (2) is the main workspace for a process. On the canvas, you define:
- The trigger (3)
- One or more criteria nodes (4)
One or more actions (5) in an action group (6)
Build a Process
Here’s a common use case: If an opportunity is created or updated (trigger) and it’s high-value and closed won (criteria), then create a draft contract (immediate action). Six days after the opportunity closes (schedule), create a follow–up task for the account owner (scheduled action).
- From Setup, enter Process Builder in the Quick Find box, select Process Builder, and then click New.
- Name the process Closed Won Opportunities. The API name updates to Closed_Won_Opportunities when you tab out of the Name field.
- For the description, enter If a high-value opportunity is closed and won, create a draft contract and a follow-up task for the account owner.
- Configure the process to start when a record changes.
- Click Save.
Add a Trigger
- Click Add Object.
- For Object, enter Opp to filter the list of options and select Opportunity.
- Select when a record is created or edited.
- Click Save.
- Click Add Criteria.
- Name the criteria Closed Won and High-Value.
- Leave Conditions are met selected.
- Check whether the opportunity has been closed and won.
- For Field (1), choose Opportunity | Stage, and click Choose.
- For Operator (2), leave Equals selected.
- For Type (3), leave Picklist selected.
- For Value (4), select Closed Won.
- With another condition, check whether the opportunity is high value.
- Click Add Row.
- For Field (1), choose Opportunity | Amount, and click Choose.
- For Operator (2), select Greater than.
- For Type (3), leave Currency selected.
- For Value (4), enter 250,000.
- Be sure All conditions are met is selected.
- Click Advanced and select Yes. When you select this option, the process ignores record changes that aren’t relevant to your defined criteria. For example, if the opportunity’s description is updated, the process won’t execute the associated actions.
- Click Save.
Add a Schedule
- Under Scheduled Actions, click Set Schedule.
- Set the schedule for 6 days after the opportunity closes.
- Click Save.
Now let’s define the actions that execute when the criteria are met. We need an immediate action that creates a draft contract and a scheduled action that creates a task for the account’s owner.
- Under Immediate Actions, click Add Action.
- For the action type, select Create a Record.
- Name the action Create Draft Contract.
- For Record Type, select Contract. When you select the object that you want to create a record for, Process Builder displays rows for the required fields.
- To associate the contract with the opportunity’s account, set Account ID.
- For Type, select Field Reference.
- For Value, select Opportunity | Account ID and then click Choose. Tip: When you select a value without an arrow next to it, you're selecting a field. To use fields on related
records, click a value with an arrow next to it.
- Make sure that the new contract is a draft. In the Value for Status, select Draft from the dropdown list.
- Click Save.
- Under the schedule we created earlier (6 Days After Close Date), click Add Action.
- For Action Type, select Create a Record.
- Name it Follow-up Task.
- For Record Type, select Task.
- Set the task's field values.
Assigned to ID
Opportunity > Account ID > Owner ID
- Click Save.
Success! You’ve created a process that automatically manages your high-value business opportunities.
To start using this process, just activate it.
Tell Me More...
You can expand this process to include more criteria and actions. If the first criteria node that you defined doesn’t evaluate to true, the process can then check whether a high-value opportunity is closed and lost, or whether a quote was given, with more actions based on those conditions. The possibilities are endless!