Creating a master process to call a invocable process

Perform the following steps to create a master process to call the process we just created: 

  1. Navigate to Setup (Gear Icon) | Setup | PLATFORM TOOLS | Process Automation | Process Builder, click on New Button, and enter the following details:
  • Name: Enter the name of the Process. Enter Master process to call invocable process in Name.
  • API Name: This will be autopopulated based on the name.
  • Description: Write some meaningful text so that other developers or administrators can easily understand why this process has been created.
  • This process starts when: Configure the process to start when a record is created or edited. In this case, select A record changes.
  1. Once you are done, click on the Save button; it will redirect you to the process canvas that allows you to create the Process.
    1. After Define Process Properties, the next task is to select the object on which you want to create a process and define the Evaluation Criteria. For this, click on the Add Object node. It will open an additional window on the right-hand side of the process canvas screen, where you have to enter the following details:
    • Object: Start typing and then select the Quote object.
    • Start the process: For Start the process, select when a record is created or edited. This means that the process will fire whenever a record gets created or edited.
    • Recursion - Allow process to evaluate a record multiple times in a single transaction?: Select this checkbox only when you want the process to evaluate the same record up to five times in a single transaction. In this case, leave this box unchecked.
    1. Once you are done, click on the Save button.
      1. After defining the Evaluation Criteria, the next step is to add the Process Criteria. 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 have to enter the following details:
      • Criteria Name: Enter a name for the criteria node. Enter Only for denied quotes as the Criteria Name.
      • Criteria for Executing Actions: Select the type of criteria you want to define. You can select either Formula evaluates to trueConditions are met (a filter to define the process criteria), or No criteria-just execute the actions!. In this case, select Conditions are met.
      • Set Conditions: This field lets you specify which combination of the filter conditions must be true for the process to execute the associated actions. In this case, select [Quotes].Status equals Denied.
      • Conditions: In the conditions section, select All of the conditions are met (AND). This field lets you specify which combination of the filter conditions must be true for the process to execute the associated actions.
      • Under Advanced, select Yes to execute the actions only when specified changes are made.

      It will look like what is shown in the following screenshot:

      1. Once you are done, click on the Save button.
        1. The next step is to add an immediate action to update opportunities to Closed Lost. For this, we will use the Processes action available in Process. Click on Add Action available under IMMEDIATE ACTIONS; it will open an additional window on the right-hand side of process canvas screen, where you have to enter the following details:
        • Action Type: Select the type of action; in this case, select Processes.
        • Action Name: Enter a name for this action. Enter Launch opportunity invocable process as the Action Name.
        • Process: Select the process that you want to execute. In this case, select Update Opportunity StageYou can only select active invocable processes.
        • Set Process VariablesSelect your Process Variable. In this case, map the SObject variable with Opportunity ID.

        It will look like what is shown in the following screenshot:

        1. Once you are done with the process creation, the final step is to activate it. To activate a process, click on the Activate button on the button bar. Finally, the process will appear as shown in this screenshot:

        From the next time, when a user updates the quote status to Denied, both the processes will fire and update the Opportunity Stage to Closed Lost, as shown in the following screenshot:

        Before testing the process, make sure that you have activated the process.

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

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