Process Builder in Salesforce

Do you want to create a record for any object from a workflow? Do you want to call your Apex class from a workflow? Do you want to automatically submit a record for approval without pressing “Submit for Approval” button or without writing a trigger? The answer is Process Builder.

Do you want to create a record for any object from a workflow? Do you want to call your Apex class from a workflow? Do you want to automatically submit a record for approval without pressing “Submit for Approval” button or without writing a trigger? The answer is Process Builder.

Salesforce introduced a powerful feature to meet all above requirements, and it is called Process Builder.

Now, let’s discuss what the process builder is and how to use it.

What is Process Builder?

Process builder is used to automate more complex business process just by a few point and click actions. It provides a user – friendly representation for building a process in Salesforce.

Fig 1. Process Builder UI

1. Button Bar

Use the button bar to collapse and expand actions, clone the process and activate/deactive the process.

2. Canvas

Canvas is a main workplace for the process

3. Add Objects

The records that the process should evaluate

4. Criteria nodes

Entry criteria node includes conditions that are used to evaluate the records.

5. Actions.

If the criteria met for the record that starts the process, the actions start immediately or at a scheduled time.

Process Builder is the next version of a workflow tool. You can implement all the workflow actions except outbound message, using Process Builder. Also, Process Builder provides some additional features to accomplish complex flows. Process builder features:

1. Create a Record​

  • Creates a record by manually entering values or by using the values of related records.

2. Update any related record

  • Updates one or more records—that are related to the record that started the process—by manually entering values or by using the values from related records.

3. Quick Actions

  • Create a record, update a record, or log a call by using an object-specific or global action that you or another administrator created for your organization

4. Launch a Flow

  • Launches a flow from your process to automate complex business processes—creates flows to perform logic and enables events trigger the flows via processes—without writing code.

5. Send an Email

  • Easily send an email from a process by using an email alert. Email alerts are configured outside of the Process Builder and contain the standard text, list of recipients, and template for the email.

6. Post to Chatter

  • Post to the feed of a user, a Chatter group, or the record that started the process.

7. Submit for Approval

  • Submit the record that started the process for approval.

8. Apex

  • Now, you can call an Apex from process builder for a particular scenario without going for trigger and Visualforce.
  • And also that Apex should have @invokeablemethod.

Let’s discuss above features now:

If an Opportunity is closed Won, Create a Contract Record and Submit this record for manager review. If theOpportunity is Closed Lost, Send an Email notification to VP.

In this scenario, the following actions will take place:

  1. Create a New Record
  2. Submit for Approval
  3. Email Alert.

Please follow the below steps to accomplish the scenario.

  1. Click Setup -> Create -> Workflow & Approvals -> Process Builder
  2. Click [New] Button.
  1. Fill in the Name and Description fields and Submit [Save] button.
  1. Click [+ Add Objects] in the flow chart and Select Opportunity Object.
  1. Click the [Save] button.
  2. Click [+ Add Criteria] in the flow chart and Enter the evaluation criteria.
  1. Click the [Save] button.
  2. Now, you can define actions that are executed when criteria are met. You can add upto 10 immeidate actions and 10 scheduled actions.
  3. Click [+ Add Action] in Immediation Actions.
  4. Select Action Type as “Create a Record” and Select Object as “Contract” from the drop down and set the values for Object variables. Then, Click [Save].
  1. Click [+ Add Action] and
    1. Select Action Type as “Submit for Approval from dropdown.
    2. Enter the value for Action Name
    3. Object is “Opportunity” by default because the process is created for the Opportunity object.
    4. Select Approval Process as “Default Apporval Process or Specific Apporval Process”. If you select the “Specific Apporval Process”, you should enter your exiting opportunity approval process name in the next text box.
    5. If you want skip the entry criteria for approval process , you can check the checkbox or you can leave it as unchecked.
    6. Select Submitter from the dropdown. Submitter may be “Current User (or) User field from the record (or) Other User”. If you select “Other User”, you have to enter username in the next textbox.
    7. Submission Comments is optional.
    8. Click the [Save] button.

So far, The process is completed for Opportunity Closed Won. Suppose, if the Opportunity’s Stage is Closed Lost, you need to Add criteria in the “Else” part and create Email Notification Action.

Now, the Flow is:

Likewise, based on your business requirements, you can create your flow and action using the Process builder. You can select one of these actions for the “Action Type” dropdown.

Process Builder Limitations.

  1. Process Builder and process are supported only in English.
  2. If you create processes for existing triggers and workflows, you should inactivate or delete those workflows and triggers first. Otherwise, it will show unexpected exception when the process runs.
  3. Actions are executed in the order in which they were specified in the process builder, and you can’t change it.
  4. If any one action fails, entire process will fail and an error will be displayed.
  5. If an object is deleted, all the processes associated with that object also deleted.
  6. Process builder can’t be included in ChangeSet.

For more information please refer this link.

Summary

Process builder is used to to automate your organization’s repetitive work or business processes, and it reduces number of workflows and triggers in your Salesforce organization.

About MST

At MST Solutions our cornerstone is to adapt, engage and create solutions which guarantee the success of our clients. The talent of our team and experiences in varied business verticals gives us an advantage over other competitors.

Recent Articles

Work with us.

Our people aren’t just employees, they are key to the success of our business. We recognize the strengths of each individual and allow them time and resources to further develop those skills, crafting a culture of leaders who are passionate about where they are going within our organization.