Declarative Tools for Automation – Process builder

Declarative Tools for Automation – Process builder

On December 27, 2021, Posted by , In Salesforce Admin, With Comments Off on Declarative Tools for Automation – Process builder

Process Builder is another automation tool along with workflows (also considered as an enhanced version of workflows in some aspects) to automate the business processes. It provides you with a very powerful and user-friendly visual representation of the flow process as you build it. Like workflows, one can also create tasks, send emails and create/update records. It supports mainly three types of processes:

  1. Record Changes as this covers the record being created.
  2. When a platform message is received, an event process gets started.
  3. Another process start/invokes it from the invocable process.

Each process includes criteria (set of conditions) and actions (create/update record, send email, task creation etc).

With the assistance of Process Builder, we are able to do the subsequent actions:

  1. Create a record of any object(standard/Custom).
  2. Modify any related record—not just the current record or its parent
  3. Use a quick action to make a record, update a record, or log a call of any object type.
  4. Invoke a process within another process
  5. Launch a flow—you can’t schedule this action with workflow
  6. Send an email with the assistance of email alerts.
  7. Send a custom notification
  8. Post to Chatter
  9. Submit a record for approval
  10. Invoke apex classes

There are four steps to form a process builder:

  1. Define process properties
  2. Define evaluation criteria
  3. Define process criteria
  4. Add actions

Define Process Properties

  1. Click Setup.
  2. Within the Quick Find box, type Process Builder.
  3. Select Process Builder, then click New Button.
  4. Fill the name of the Process.
  5. As a best practice, always input a description (for defining the purpose)
  6. we are able to choose when to start out the method. Options are within the below image.

Define evaluation criteria

  1. Click on the Add Object node to start selecting the evaluation criteria.
  2. Select the any object (Account in below image) from the dropdown list.
  3. You’ll be able to choose when to start out the method i.e.
    1. Only if record is made
    2. When a record is made or edited
  4. You can also choose to run it multiple time if record is updated in advanced options
  5. Click Save.

Define process criteria

  1. Click the Add Criteria node to start defining the method criteria.
  2. Enter the Name of the criteria.
  3. you’ll choose the standards for executing the actions i.e. When this criterion will run:
    1. When conditions are met.
    2. Formula sets to true, means You’ll be able to create your own formula like formula field and use that.
    3. you’ll be able to choose “No criteria met – just execute the actions”.
  4. Set conditions as per the business requirements.
  5. You can choose how these conditions will be combined i.e.
    1. All the specified conditions are met.
    2. Any condition is met.
    3. Customize the logic using AND and OR.
  6. Click Save.

Add actions

We can define two forms of actions in process builder:

  1. Immediate Actions – These actions will run immediately as soon as the criteria is met.
  2. Scheduled Actions – These actions will execute at a specified date and time that you just have defined while creating the time based action.

As mentioned earlier we will use multiple actions as a component of the process builder. So, you can choose any one from them as per business needs.

If we elect to make a record then it will pop up the object selection box (refer to below image).

After adding the actions successfully, we just have to activate the process builder. Once the process builder is activated it’ll run when the desired object’s record is formed or edited w.r.t. the conditions specified in evaluation criteria.

NOTE:

  1. To edit anything within the process builder you initially must deactivate the method builder, only then you’ll edit the method builder. After editing, if you click on “Activate” then it’ll be activated as a replacement version and therefore the older version is automatically deactivated. 
  2. You can ignore the fields which are required on page layouts, but the fields which are employed in custom validation rules or required in Field Level Security, you need to specify the fields as process builder obeys the validation rules in situ.
  3. Also, add the null checks properly, because it will throw an exception if we try to reference the sector which is not having value.
Comments are closed.