Hands on 8 – executing multiple criteria of a process

Since the Summer 2016 release of Process Builder, it has become possible to choose what happens after your process executes a specific action group. Should the process stop, or should it continue to evaluate the next criteria in the process? Use this option to efficiently manage multiple business requirements in one process.

It is easy to manage all of your processes for a given object, like a lead, in one place:

Let's look at a business scenario. Suppose that Alice Atwood is working as a system administrator at Universal Containers. She has received a requirement from the management; once a task has successfully closed five days before its due date, auto-update the Eligible for bonus checkbox to true.

There are two possible solutions for the preceding business requirement:

  • Create a new process to solve the business requirement
  • Use an existing process, and add one more criteria to it

We will use the second approach to solve the preceding business requirement. Follow these instructions by using Process Builder to execute multiple criteria in one transaction:

  1. First of all, create an Eligible for bonus custom checkbox field on the Activity object, and make sure that you set the field-level security for the respective profiles.
    1. Navigate to Setup (gear icon) | Setup | PLATFORM TOOLS | Process Automation | Process Builder. Open the Task reminders process that you created to send an email to the assignee. Save it as New Version, because you can't modify the activate process.
      1. The next step is to add one more process criteria to the process. To define the Process Criteria, click on the Add Criteria node; it will open an additional window on the right-hand side of the process canvas screen, where you will have to enter the following details:
        • Criteria Name: Enter a name for the criteria node. Enter Update eligible for bonus as the criteria name.
        • Criteria for Executing Actions: Select the type of criteria that you want to define. You can select either Formula evaluates to true, or Conditions are met (a filter to define the process criteria), or No criteria-just execute the actions! In this case, select Formula evaluates to true.
        • Build Formula: Use this to define the formula using functions and fields. At the end, your formula should look like this: [Task].ActivityDate - TODAY() >=5  && [Task].IsClosed.
        • Under Advanced, select Yes, to execute the actions only when the specified changes are made.

      The preceding steps will look as follows:

      1. Once you are done, click on the Save button.
        1. Once you are done with the process criteria node, the next step is to add an immediate action to update the task field eligible for bonus to true, if the task is closed five days before the due date. For this, we will use the Update Records action, available in Process Builder. Click on Add Action, available under IMMEDIATE ACTIONS; it will open an additional window on the right-hand side of the process canvas screen, where you will have to enter the following details:
          • Action Type: Select the type of action; in this case, select Update Records.
          • Action Name: Enter a name for this action. Enter Update Eligible for bonus to true as the action name.
          • Record Type: Select the record (or records) that you need to update. In this case, select Select the Task record that started your process option.
          • Criteria for Updating Records: Optionally, you can specify conditions to filter the records that you are updating. Select No criteria—just update the records!
          • Set new field values for the records you update: Select the field whose value you want to set. In this case, set the Eligible for bonus field to True.

        It will look as follows:

        1. Once you are done, click on the Save button.
          1. The final step is to activate the process. Click on the Activate button, available on the button bar. Finally, the process will appear, as shown in the following screenshot:

          Still, only one criteria node will execute in one transaction, because the process works on the if...else statement. This means that only one criteria node can be true in a transaction.

          ..................Content has been hidden....................

          You can't read the all page of ebook, please click here login for view all page.
          Reset
          18.216.27.91