 Hello friends. I'm Sanjay Gupta. I welcome you on Sanjay Gupta Tech School. So in this video, I'm going to demonstrate how you can call Apex class to process builder in Salesforce. Before start, if you want to watch more Salesforce training videos, you can go to description of this video. And you will find links of various playlists related to Salesforce video. So you can follow them as well. So first of all, I'm going to explain the class that will be called through process builder. So whenever you want to call any class through process builder, so you have to use adverte invocable method annotation before the method. So here name of classes account action method name is update account name. It will be receiving list of IDs into IDs variable. Then this is list of account that will be updated after some processing. And here I have applied a query which will be querying name of accounts based on this list of ID. Those will be queried into accounts list. Then I'm creating this and updating name with a test. This test will be appended at the end of this name. And then this account will be added into this account to be added. Sorry, account to be upgraded list. Then after completion of this loop, all the accounts will be updated. So now this apex class will be triggered through the process builder. So now I'm going to create a process through process builder so that process will be executing on account whenever a record changes. So what I want to do whenever I want to create an account record, I want to add a test or you can say I want to append test in the name of account. So I am selecting only when a record is created option saving this then for criteria and writing always run because I don't want to choose any condition. But if you want to apply any condition so that you can decide whether to call the picks or not. So you can do that as well. But I'm choosing no criteria because I want to execute that apex class always whenever a countercord is created. Then add action, select apex, then here you can type action name call apex to update account name. Then here you can see that apex last name is populated automatically. So in a particular class wherever you have at the rate invocable method annotation, those classes will be available here so that you can pass parameters into those. So if we read this help text so it says the apex last must have an invocable method. So it is having that's why it is available here. Then if I click on add rules so whatever the input variables are available in that method that will be populated here automatically. So here it is having only one parameter so one argument can be passed. If we have comma separated multiple variables here so then we can click on add rules so that we can pass multiple values. So right now I'm passing record ID of this current record through which this process is initiated. So account ID will be passed. And if you have more than one parameters then click on add and pass another argument as well. So right now we don't have so I clicked on save. So this way this process is created, which will call apex class whenever account record is created and it will be appending test in the account name. So it is activated now. So I'm moving to account tabs, trying to create new account records. So let's say account name is ACC and I'm clicking on save. So just after account creation you will see, yeah, here you can see space test is appended automatically with account name because that is available in this class. So this way you can do any other operation as well. So whenever you want to call it takes class through process so use this annotation invocable method and that is written as at the rate invocable method. And you can call that apex here and pass the required variables as an argument that will be received through parameters those are defined in the apex class. So this way I hope you understood how we can call it takes class through a process builder in Salesforce. If you want to watch more Salesforce or process builder related videos, go to the description of this video and you will find various links of Salesforce playlist. So follow them and learn Salesforce. Thank you for watching this video.