Hello Salesforce Thinkers, In this blog, we will learn about process builder in salesforce.
Q.1 What is process builder in salesforce?
Process Builder is a process automation feature that is similar to standard workflow but with more powerful functionality and a drag-and-drop visual interface.
Process Builder helps you automate your business processes.
With the help of process builder, we can create the whole process in one place rather than using different workflow rules.
Q.2 Why Process Builder?
Process builder is more flexible in comparison to workflow.
Workflow rule can’t update child record, Post to Chatter, auto submits the record in the Approval process, invoke an apex or call flows.
Navigation to process builder
Setup–> Build–> Create–> Workflow and approvals–> Process Builder
Let’s create a new process

- Click The New Button
- Enter process Name
- Enter a description of the process
- Then select, The process starts when
A record changes
A record change process starts when a record is created or updated.
A platform event occurs
An event process starts when a platform event message is received.
It’s invoked by another process
An invocable process starts when something else, like another process, invokes it.
Every process consists of a trigger, at least one criteria node, and at least one action.
Trigger: Identify When the Process Should Run
Criteria: Determine Whether or Not to Execute Actions
Actions: What the Process Should Do which consist of immediate or scheduled actions. Only record change and processes support scheduled actions.

- Choose Object and Specify When to Start the Process
- Then add criteria to evaluate the process.
- Click on Add criteria, enter criteria name, select the executing actions,
Conditions are met
Formula evaluates to true
No criteria—just execute the actions!
To add more conditions click on Add Row.
Set the condition
All of the conditions are met (AND)
Any of the conditions are met (OR)
Customize the logic
Now Select the action which you want to perform
Process builder Actions
Apex
To invoke an Apex class that exists in the Org. Ideal for getting complex calculations done or to trigger another code based business process.
Create a Record
To create a new record of any related or unrelated object.
Email alert
To invoke an email alert configured in the Org. The email alert must also be configured on the same object as the process being defined.
Flows
To invoke a visual Workflow that is already defined in the Org. Ideal for performing operations that includes getting a user input/deleting records /updating un-related records etc.
Post to chatter
To make a post onto chatter. Process Builder Chatter action can be configured to post the message to a User, a Chatter group /or in context of the record Chatter feed.
Quick Actions
To invoke a Quick Action that is defined in the Org. Can be used to invoke quick actions that create a record update a record logs a call.
Both Global and object level actions can be invoked.
Submit for Approval
To submit the record in context for approval.
Process builder gives the option to choose which approval process to use and who to submit it as.
Processes
Can be used to select an invocable Process Builder process. Helpful for when there are many repeated steps.
Update Records
To update the record or related records of the specific record in context.
we can schedule the action by set schedule button which has time and date to select.
Example:—
Create an Order record when Opportunity is Closed won and amount > $5000.

Select The Criteria Opportunity Stage Name equals to closed won and
Opportunity Amount is greater than $5000.

Add an Action, create an Order record.

Check for it, create an opportunity Record, it will automatically create an order record according to the requirement.
This is the Lightning Process Builder.