Process Builder is an automation tool provided by Salesforce. You can automate various actions like sending an email automatically creating and updating a record or starting a new process and so on. So today's session is all about understanding what is process builder in Salesforce and how it can be helpful. But before we get started, I would like to address the agenda for today's session. So we'll start the session by understanding What exactly is process builder next will understand on what criterias or under what conditions are these automated actions performed moving on.
We'll talk about the various actions that can be performed using process builder and finally conclude a session with the demo part where we'll see how we can automate actions using process builder. It is going to be an interesting demo. So do watch this video till the very end and guess if you like our video do not forget to subscribe and hit the notification bell to never miss an update from the edureka channel. Also, if you're looking for an online training certification in Salesforce check out the link given in the description box below now moving on to the first topic. What is process builder in Salesforce now process builder is a point-and-click tool that lets you easily automate business processes and see a graphical representation of your process as you build them.
So to explain this in simple terms process builder lets you automate certain actions when a criteria or a particular condition is met and process builders are designed in a graphical representation. Now there is also workflow in Salesforce, which is also used for automating actions. So the question here is what to use for automating actions or when to use process builder. Well workflows can be used for only one condition. It is like an if statement if the criteria is met only then the actions are performed as the actions are not performed and also in workflow.
You can automate only four actions, but in process builder, it's like a multiple if statement. So the first criteria is met in the first set of actions are performed, but if the criteria is false. it checks for the next criteria and if that criteria is true, then the next set of actions are performed just think of process builder as an enhancement of workflow. Now each process in process builder will consist of three main components.
First is trigger second. We have criteria and third is actions first is trigger now a trigger basically identifies when the process should run this usually happens in three condition one when a record is created or edited next when a platform event message is received. And next when another process invokes this process next coming to criteria a process will have at least one criteria node which decides the condition under which the actions are executed and next we have at least one automated actions and next a process will have at least one automated actions the actions could be immediate actions or time-triggered actions. So I guess you have some idea about what is process builder in Salesforce.
Now, let us move on to the next topic and understand. And what are the evaluation criteria for process builder now criteria is basically the condition on which the automated actions are executed. So each criteria nodes controls whether the process executes the associated actions or no also, there can be multiple criteria nodes. Like I mentioned before if the criteria is true then only the set of actions are executed as if it is false the process checks for another criteria.
So if any other criteria is met then it executes that set of actions which are associated to that criteria. Now when we talk about criteria in each criteria node, you can filter the condition according to your convenience or even enter a custom formula. For example in validation rules the formulas could be either true or to be false. Now you will see all this when I'm doing the demo it will give you a better understanding.
Also this criteria is not compulsory. You can opt out of criteria and always execute the associated actions. So every time a process is triggered the set of actions are automatically executed.
without any criteria or conditions. So this was about the evaluation criteria and Salesforce process builder. Now, let us move on to our next topic and see what are the automated actions that can be performed using process builder.
So firstly, there are two types of process builder actions which vary with the time these actions are executed first is immediate actions and the next is a time-triggered action. Now as both of the names suggest the immediate actions are the actions performed right after the criteria has met and next time-triggered actions are the actions that are performed after the time interval. You can set a time when you want this actions to run and after the particular time is done it checks for the criteria and if the criteria has met then it performs the automated actions.
For example, you can automate a process which will send an email 30 minutes after an account is created and then it will send the email to the recipient after 30 minutes itself. So these were the variation of actions based on the time they run in now, let us see what are the automated actions that can be performed using process build on the first action is you can create a record you can automate a process which will automatically create a new record. So when the criteria is met process builder allows you to create new records and set certain field values for the new record.
The process builder creates a record by manually entering values or by using the value of any related records. So this was the first action that is to create a record next we have updating of records you can update one or more records that are related to the record that started the process. You can update the record with manually entered values or by using the values from related records. Now one major benefits of using process builder instead of workflow is that we can update records of both parents or child records. Whether it's in workflows.
we can only update parents object from the child the next action that can be performed using process builders. You can perform some quick actions now quick actions is basically performing some particular action when the criteria is met it is determining the details of an assignment given to a specific user by an automated process. You can select some quick actions like log a call or maybe send an email or updating a record which can be given to a particular user.
Also, you can send notification email to that assignee when a task is automatically assigned. Just to give an example for this if opportunity is closing in a few days and its amount is too high and you can automate actions using process builder so that an employee can look into that matter. So this was the third action in process builder. Now the fourth action is you can invoke another process now one process can be used to trigger another process.
So when a particular criteria is met you can set an automated action that will trigger another process. So for this action, you need to always choose process type as it is invoked. by another process.
The fifth action is you can launch a flow now flow is an application in Salesforce that automate complex business problem just to explain this in simple terms. It collects all the data and then does something with that data. It can be used to build code like logic without using a programming language so you can launch a flow using process builder in Salesforce. So this was about the automating flow action in Salesforce. The next action is you can send an email alert.
You can automate a process builder to send an email. to one or more recipient when a criteria is met. For example, when there is a large deal and you can send an email about the information of the deal to your manager.
So instead of manually sending the email, you can automate this email actions. So every time there is a large deal, a email will be sent to your manager. So in this way, you will save a lot of time. Now in order to send an email alert, you need to first set an email template.
Now the email template will basically contain what will be the body of the email? What will be the subject of the email and to whom will it go to? Also, you can send custom notification to any user using process builder the next action that can be performed using process builders. You can post something to chatter now process builder post to chatter action helps you post information to any user or group data field within Salesforce. Now for those of you who don't know what chatter is chatter is basically Salesforce real-time collaboration application and lets user to work together talk to each other and share information chatter lets you collaborate on sales opportunities.
service cases campaign and projects with embedded app and custom actions. It is basically a place where you can share all the information and talk to each of your colleagues. So when you post a chatter using process builder the post will appear in the chapter field as the person who triggered the process had returned it.
We can also reference group or topics and much field and when I say you can also refer it means you can add the person name and tell him like congratulation or well done something like that. Now moving on to our next action that can be performed in process builder. You can submit a record for approval with process builder.
You can send a record to anybody for an approval. So when the criteria is met and it needs approval from some higher authority, you can just automate such actions and send that record so it can be approved. For example, when you have to take an approval for some record every week, we can just automate that action instead of manually doing it every week.
Also, remember that only the records that started the process will be submitted. You cannot submit. any other related records for approval.
Now process builder can also be used for another action that is to trigger an Apex code. You can use the Salesforce process builder to invoke Apex code you have written within Salesforce. Apex can be anything from custom logic to save a record to complex business processes and to invoke an Apex class in process builder. We have to use the aura enabled attribute now a very important point to remember here is if you create a process to replace any workflow rule ensure that you delete those workflow rule.
when you activate the equivalent process otherwise both workflow rule and the process fires and causes unexpected results such as overwriting records or redundant email messages do the same if you create processes to replace any apex trigger as well. So this was about the various actions that can be performed using process builder in Salesforce. Now, let us move on to a final topic, which is the demo part.
So for a demo, we are going to create a process in which will check for two conditions. The first condition is when the high value opportunity is close one, which basically means the customer has decided to buy a product and the next condition is when a high value opportunity is closed lost. which means the customer is not willing to buy your product. So when the opportunity is closed one will automate some actions like first with create a contract for the deal, which is very important next will notify an user about the deal by sending an email. So we are performing three process builder actions over here.
We are creating a new record. We are posting to chatter and we're sending an email. Now the second condition is if the opportunity is closed loss, then we'll send a mail to the user which could be anyone in real-time scenario.
Like it could be the sales manager or the vice president of the sales or someone to look into the matter. So based on these conditions, we're going to create a process builder now. So let's get started.
So for a demo, we're going to log into a Salesforce console. So for that, we'll just search for developer.salesforce.com. So here you can just click on sign up.
Now if you're new to Salesforce, it is very simple to create your first Salesforce account. All you have to do is enter a few details like your name, your email address, your job role. your company working for your country your postal code and you have to set a username for your account and after that just click on sign me up then you'll receive an email in which you'll have a link and your username and when you click on the link it'll ask you to set a password and after all the process is done you can just log into a salesforce account but as i already have my account i'll just log in so for people who are new to salesforce this is what the salesforce console would look like Now for going to process builder will just search for process build over here. Here, we'll just select it. Here you can read about how to create your process builder.
You have to select your object. You have to define your criteria and you have to select your actions. All these are mentioned in the theory section. Now to create a new process builder. I'll just click on new we have to name a process.
So let us just name it process demo and the API name is automatically selected as process demo. Now if you want you can describe your process builder. Now I would describe it as demo process builder and next is a very important step. You have to select when the process will start you have three condition over here when a record changes or when a platform event message is received or when it is invoked by another process builder.
So for our demo, we are going to select a record change. So every time a record changes this set of actions will be executed to click on save now. You see the process builder is more like a graphical representation.
It's like a flow chart. We have to select an object on which the automation will happen. Then we have to select a criteria and if it is false, it will stop. But if it is true, it will do some automated actions.
You can also time schedule any actions to be performed after a particular time and after all the actions are performed the process builder will stop. So for our demo our object is going to be opportunity. So we can just search for opportunity here. It is will select it and it will ask when you want the process to start when a record is created or whenever a record is created or edited.
So for a demo will just select only when a record is created because we're not going to update anything now. So click on save now. It's a time to add criteria.
So we have two criterias over here one when the opportunity is closed one and the other one is when the opportunity is closed loss. So let us first automate action for opportunity closed one. So for that we'll click on add criteria. You have to name a criteria will just name it as criteria one. Now here we can select what is the criteria for executing actions when the conditions are met.
or when the formula evaluates to be true or you can just skip this criteria and just execute the actions. So we're going to set conditions. So for our demo, we're going to check for condition. So let it just be conditional met.
So now we have to set our conditions now as the opportunity should be close one. We have to select that as a condition. So here we'll search for stage.
So we'll select stage now if stage equals closed one, the type will be picklist itself and the value is closed one. So if our opportunity is close one and the deal amount is greater than a particular amount then only the set of actions will be executed. So in order to set another condition with this click on add row now here will select amount amount will choose this and amount should be equal to or greater than so will select greater than or equal to the type will be currency. And now let us set this as 100,000 and after this it'll ask if you want both the condition to be true. then only execute the actions or if only one of the condition is true, then you can execute the action.
So we'll select and operator if both the condition are true only then a process builder will execute the actions. So click on save now a criteria is also added. Now it's time for us to add our actions. So we're going to add immediate actions.
So for that we click on add action. So we have to select what action do you want to perform? So for our first action, we're going to create a record now. We're basically going to create a contract.
Now we're creating a contract because for a large deal having a contract is compulsory it acts as a document proof. So now we have to name our action. So let us just name it action one. and then select the record type.
So here we can search for contract here it is and now we have to set the field values for contract now for field value. We will select account ID because account ID will be present on the contract that this account has a deal of more than 100,000. We'll go to field reference. The type would be field reference and now we'll just select the account ID select the account ID and we'll choose this.
Now this account ID will be present on a contract next will make this as draft and then just click on save now every time an opportunity is closed one and the amount is greater than 100,000 and contract will be automatically created. So I'll just click on save and here is the first action. So our next action is to send an email. So click on add action email alerts will name our action as action to know if there is already an existing email alert. We can select it.
But as of now, we do not have any existing email alerts. So let us just create one also when I'm creating this, you know, all of us are in the same page. Now, let us first create a new email alert.
Now what is email alert? Now email alert is nothing but who the message should be sent to what should be the subject and body of the email. So we have to decide all that in email alerts. So we have to add a description for the email. So let's just say opportunity opportunity deal is greater than one.
100,000 now we need to give a unique name to that. So our unique name is automatically selected. So let it just be that now we have to select the object and here it will be obviously opportunity.
So select opportunity and now we have to create an email template. Now an email template is basically what should be the body and subject of the email. So now let me show you how you can create an email template.
We just go back you can create it in classic user interface also, but I'm just going to create it in the lightning user interface. So open any of this link in the new tab now here just search for email template and open this in a new tab. Now here you can create a new email template.
So just go to new email template name the email template. So we'll just name it opportunity closed one. If you want to add in a description you can do that and you have to select in which folder it will be saved in. It could be either private or public.
We'll just make it public for now. And now here the subject of the email would be opportunity. close one and a body of the email would be so a body of the email would be an opportunity whose amount was greater than 100,000 is one.
Thank you. I will save this and an email template for opportunity close one is created. Now we have to create one more email template.
If the opportunity is close one now this one you have to notify to the manager or in this case, just to me that the opportunity was closed lost. So now let us create one more email template. So this would be opportunity close lost and will save this also in the public email template and the subject would be again opportunity close lost and the body of this email would be hey an opportunity whose amount was greater than 100,000 was lost. We're going to make no much changes in both the email and we'll just click on save now both our email template is created. Now what you have to do is just select an email template over here.
Just refresh this again and see our email templates. Here we have the two new email templates. So now here we'll just select our email template. Now all the classic user interface email templates will be present over here. But as we have created in the lightning experience, we just click on lightning over here and as this is for close one will select this one next.
You have to select the recipient type now to be for the user itself. Now we have to select Who do you want this email to be sent to now? I'll select my email ID. I added it now if you want you can send this email to five other email addresses. So as of now, I do not want to send it to anybody else next to have to select from whose email ID you want the email to be sent.
So it will be current user email ID itself and we click on save now our email alert is being created. So we go back to process builder and now we'll just type for that or unique name was opportunity deal is greater than 100,000. So I'll just select that and click on save. We have added two actions. Now the last action is to post to chatter.
So we'll go to add action go to post to chatter and we'll just name it action 3 and let us post it to user. Now if you have a group you can also post this message to the group. Now we'll just select for user search for user and I'll just send it to myself.
Now here will be the message which will be posted to chatter. We just say good job. If you want to add any field to the message, you can do that as well. For example, if you want to add the account ID you can do that.
So let it just be short and sweet. Good job and we'll save this now. Remember only the opportunity is closed one and the amount is greater than hundred thousand all these three actions will be executed else it will become false and check for the next criteria.
Our next criteria would be opportunity close lost. So for that we'll just name this criteria as criteria 2 and it will be the same when condition are met now we have to select the condition now the field again would be stage. equals pick list here will select close loss.
Then we'll add another row search for amount if it is greater than or equal to 100,000 next the condition would be that all the condition are met. So click on save now. We're going to send an email. So I'll just select on email alerts and this will be action for now. We have to create a new email alert, but we have already created an email template.
So we'll just create one email alert will name it opportunity deal. is lost and the unique name will be again opportunity deal is lost. Now here we'll just select the email template which we have created before the go to lightning again opportunity close lost recipient type again is user will send this email to me again.
Everything else will be the same and we'll just click on save. We forgot to select the object. So it would be opportunity again and we click on save now our email alert is created.
So just go back and just search for opportunity deal is lost. and we click on save now here we have designed a process builder. Now opportunity is the object next.
We have selected two criterias. The first criteria is when the opportunity deal is close one and the amount is greater than hundred thousand and next criteria when the opportunity deal is close lost, but the amount is same which is greater than hundred thousand here. We are performing three actions and here one.
So the last step is to activate this. So click on activate click confirm and a process builder. is a being activated.
Now, let us check if the process builder works for that will just go to sales console. So I'll just search for opportunities. Now, let us create two new opportunity one, which is closed one and the other one is closed lost.
So we'll just name this opportunity name as test opportunity one and now we have to select the amount. Let it be 110,000. Now the closed date will just select any random date. We just give it at 31st. Now we have to link an account name to this.
So we'll just select one account name from here. We'll just go with Burlington textile crop of America. You're just selected any account over here. Now, this is the important part. You have to select a stage.
So first, let us select close one. Now nothing else seems mandatory to will just click on save now. Our opportunity was created.
So now let us see if a contact was created or no. So we'll just search for contact over here. Here it is.
Now if you do not find contact over here, you can go to edit now here you will find contract. So we'll just select contract from here and you see a contact was being created. This is the contract number. This is the account name.
The contact has been made on and date when it was created. Now, let us also check for the email here. You see we have got an email here an opportunity whose amount was greater than 100,000 is one.
So this was two of the actions. So let us see if it was posted to chatter or no, but that let us go to chatter and here two minutes ago. Good job. So this was for the first criteria. So now let us check for the second criteria.
So for that, let us create another opportunity. The amount would be again greater. Let's make it 120,000 opportunity will name it as test opportunity to the close date again. We'll just select any random date will again associate this opportunity with it. Burlington textile cops of America and the stage here would be closed lost and we click on save now our opportunity was created.
Now, let us check our email now here you see we have got another email saying that an opportunity or the amount was greater than 100,000 was lost. Now you see how easy it is to create a process builder in Salesforce and how effective it is to automate any action in Salesforce and with this we have come to the end of the session. I hope it was helpful.
Do leave a valuable thoughts in the comment section below. Happy learning. I hope you have enjoyed listening to this video.
Please be kind enough to like it and you can comment any of your doubts and queries and we will reply them at the earliest. Do look out for more videos in our playlist and subscribe to Edureka channel to learn more. Happy learning!