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.
1.Click Setup → Create → Workflow & Approvals → Process Builder.
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.
- Choose object.
- Specify the entry criteria. Here, I have selected No criteria-just update the records option.
- Choose action which you want. Here I’m creating a process builder on contact, I have selected Update Records action.
- Specify your action name.
- Here, I have set value for contact description field. This field is updated with its accounts description field.
- Click Save.
- Now, let’s create another process which uses invocable process. Specify your process name.
- Choose the option “A Record Change” from a dropdown.
- Click Save.
- Create a process on the Case object.
- Then create a criterion for this process. Here, I have declared Case origin equals to Email.
- 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.
When a case is created, its corresponding Account’s description will be populated in the contact’s description field.
- The invoked process (or processes) under a process will be counted towards the process count and subjected to other applicable limits also.
- 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.
- 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.