You are using an older browser that might negatively affect how this site is displayed. Please update to a modern browser to have a better experience. Sorry for the inconvenience!

Build Reusable Processes


Introduction:

Build Reusable Processes is a concept in which we can create a process that can invoke another process using process builder. Using this technique, we can save our time considerably by invoking the other process inside our own process to reuse the sections which are already available instead of creating new sections. We can call this “invocable” process in multiple processes or in multiple action groups of the same process.

When we want to invoke a process that belongs to different object, it should have a common unique Id in both the processes. For example, in the account and case objects, the accountId field is unique to account and used by the case.

Steps to Invoke a Process: 

Below are the steps used to invoke a process by another process through Process Builder. These steps explain when a case is created, its corresponding contact’s description field will get populated from its Account’s description.

Step 1: 

1.Click Setup → Create → Workflow & Approvals → Process Builder.

Step 2: 

1.Specify your process name.

2.Choose the option called “It’s invoked by another process” from a dropdown when we need to invoke a process inside another process.

3.Click Save.

Step 3: 

  1. Choose object.
  2.  Specify the entry criteria. Here, I have selected No criteria-just update the records option.
  3. Choose action which you want. Here I’m creating a process builder on contact, I have selected Update Records action.
  4. Specify your action name.
  5. Here, I have set value for contact description field. This field is updated with its accounts description field.
  6. Click Save.

Step 4: 

  1. Now, let’s create another process which uses invocable process. Specify your process name.
  2. Choose the option “A Record Change” from a dropdown.
  3. Click Save.
  4. Create a process on the Case object.
  5. Then create a criterion for this process. Here, I have declared Case origin equals to Email.
  6. Specify action. While creating action, select Processes from action type.

7.After selecting a Processes under Action type, we can select the invocable process under process dropdown as shown in the below screenshot.

8.Select the invocable process which is available in your org, and select which process you need to invoke.

9.Here, I have selected Contact Invoke Process.

10.Click Save.

Result :

When a case is created, its corresponding Account’s description will be populated in the contact’s description field.

Considerations: 

  1. The invoked process (or processes) under a process will be counted towards the process count and subjected to other applicable limits also.
  2. If you have any invocable process under a process, it will be considered as a single transaction. So, the DML operation inside both (invoked process and the process that invokes it) processes will be counted in a single transaction which might result in exceeding DML limits.
  3. You must pay attention when you are adding object to the invocable process because your selection determines the possibility of using the invoked process by the other processes.

References: 

  1. https://releasenotes.docs.salesforce.com/en-us/winter17/release-notes/rn_forcecom_process_in_process.htm
  2. https://www.linkedin.com/pulse/process-builder-enhancement-salesforce-winter-17-release-bagal