Process Builder is tool used for automation, it is a part of Salesforce flow, it even helps to automate business process. The build process builder looks like a graphical representation.
Components of a Process
Process builders mostly consist of these three components:-
- Trigger:- Each process should contain at least one trigger.
- Criteria node
So, to create a successful process, there is a need for a trigger, at least one criteria node, and at least one action. After creation of process, you can configure immediate actions and you can even schedule actions if you want to be executed.
Well the task of trigger is to identify which process and when to run.
The following things to be taken care of when using triggers, it is the trigger which will decide that for record change processes, the process should focus on which changes and on which object.
- Create any record: - When a record is created these triggers will decide the changes.
- Created or edited: - If any record is created or edited then this also happened.
Don't forget to check out: Salesforce Loops in Apex | The Developer Guide
After triggers, Criteria is the second component who will decide Whether or Not to Execute Actions. Well, the main task of criteria is to decide the execution, once any triggers are created, it is up to you to add as many criteria nodes as you wish. One more thing to be taken care of during execution is that the process should full fill criteria to be executed.
In each criteria node, you can:
- You can set filter conditions in these criteria nodes.
- You can even enter a custom formula but the formula used must be turned into true or false.
- Well, you have a choice to opt out of criteria, and the chosen criteria will get executed (the associated actions).
It is always important to know what the Process should do, once it is created. After successful creation of criteria node, and once it is evaluating to true, the associated actions to be execute as per the schedule.
- Once the criteria evaluate to true the related action will get executed.
- All the actions will be executed as per the schedule, as an example if any task is scheduled to be executed after 10 days, then it will get executed after 10 days. But before execution Salesforce makes sure that the associated criteria node still evaluates to true.
When any actions get executed, you can perform these process actions:-
- Create records:- You can create a record once the action gets executed.
- Update:- You can update the record that started the process or even you can update any related record.
- Once execution is done you can submit that record for approval.
- Update one or more related records:- You can update more than one record even related records also.
- It is also possible to send emails using a specified email template.
Here are some conditions when a process starts after using triggers: -
- Record Change: - Process gets start when a record is created or edited.
- Invocable: - This process starts when it is called by another process.
- Platform Event: - This process starts when a platform event message is received.