 Hello everyone. I am Sanjay Gupta. I welcome you on Sanjay Gupta Tech School. In this video, I'm going to demonstrate a scenario based on record trigger flow. Let's understand the requirement for record trigger flow scenario. So I'm going to demonstrate how you can create scheduled path in flow. So the requirement is we need to create a contact once an account is created. This contact will be created immediately on account creation. Then we need to create an opportunity one day after an account record is created. So that will be happened with the help of scheduled path. So now jumping to the org. So I'm going to create this flow for you so that you can understand the working off schedule path. So I'm creating new flow and this option will be available under record trigger flow. So just select it. Now here we need to select the object as account or record is created. We don't want to provide any condition and then actions and related record. So schedule path is available in this option only. If you select fast field update, you won't see any schedule path. So let me select fast field update. So here you are not able to see any schedule path. If I select actions and related record. So you will be able to see this ad scheduled path. So though it is optional. So in general requirement, if you don't want schedule path, you can ignore it. So your flow will run immediately. If you want to have both the parts like run immediately and schedule path. So you can just click on this. Then here create opportunity. Then time source. So all the date fields will be available here. So we just need to select when account is created. Then this is offset number. It works based on this days after days before hours after hours before minutes after minutes before. So you can just read this help text for better understanding. Specify whether the path runs minutes hours or days before or after the selected time source. However, in some cases, a scheduled path interview will not execute until after system resources become available. So if resources are not available, then in that case, it can go beyond this offset as well. So we need to select one day after and the time sources when account is created. Then we have this option that is advanced where we can enter the batch size. So just go through with this help text. So enter the number of records that this path can process at the same time. The default is 200, which is the maximum and the minimum is one. For example, if you specify a batch size of two and seven records are scheduled to be processed in the same time interval flow builder group stamp into four batches. So total seven records are there that sizes to so 222 and one for batches will be created. So set a batch size smaller than 200 to improve performance and to avoid hitting governor limits. Right. So I'm just leaving it as is because I just want to use the default batch size. So I'm not putting any value here. And as per your business requirement, you can just put a particular value state. Right. Now if you want to create one more schedule path, so you can just click on plus and here you can enter one more schedule path. So it depends as per the requirement how many schedule paths you want to create. Okay. So I'm just deleting this one. Now just go through with the text which is written over here as well. So add a schedule path. If you want part of or the entire flow to run sometime after the triggering record is created. Right. That scheduled time can be based on when the report is created or based on a field value in the record. Right. So here you can see these are the values basis on that you can schedule a separate flow interview runs for each schedule path. Path labels appear on the connectors in the canvas. Consider using path labels such as run one day after cases created and run when cases close. So this is the help like you can use. So what we can do we can put it here as well run one day after account is created. Right. So I'm modifying it like this. Okay. And why we did so because on the canvas this label will be displayed. So if I click on done so here you can see this label is available. So this will run immediately and this path will run after one day of account creation. Now for immediate creation, we need to create context. So I'm labeling it as create contact one contact then use separate resources and literal values. So here I need to select the object as contact and I need to set the first name. So I'm just setting account name as first name and account name as last name. So this flow will run when account record is created. So account record information will be available in this global variable that is dollar report. Now here if you want to link your contact with the account so you can pass the record ID as well in the account ID lookup. And click on done. So contact will be created immediately. Now here we need to create the opportunity. Create opportunity. So opportunity name should be equals to record dot name. So account name will be assigned as opportunity name. Then we need to populate state. So I'm providing prospecting. Then we need to put the date. So here I'm putting the close date. So I'm putting as six slash three zero slash two to two zero double two. And then if we want to relate this opportunity with the account, so we need to populate account ID in the account ID lookup. So this account ID lookup is available on the opportunity and from here record dot ID means account ID will be assigned into this variable. So I'm just clicking on done. So this way this record trigger flow is created. Now I'm just clicking on save. So I'm providing the label here. So labeling it as scheduled path clicking on save and activate. Right. Now let's see flow trigger explorer as well. So I'm just selecting when a part is created. Okay, so now let me check one more thing. So nothing is available here. So let me just create one account report and then we will verify those things again. So I'm just clicking on new and creating one account and clicking on save. So under related you can see one contact is created automatically. Now I'm just checking the schedule jobs. Okay. Here we don't have any information. So let's search for time based workflow object equals account and search. So here you can see we have the record name account 1301 and flow name is scheduled path schedule date today 28 six and sorry. So date is 27 six and schedule date like when it will be executing one day after this created date. Right. So this way here you can identify like whether your schedule path is actually scheduled or not. Now let me just refresh and see whether. Okay. So here that information is not available. Okay, so if you want to check whether your this schedule path is actually scheduled or not. So this is the way you can go into time based workflow and here you can see, and for example if you have deleted account reports of this role will be deleted automatically from here. So this way, you can create scheduled paths, and you can create any number of schedule path in your record trigger flow. Okay. And from here also like if you want to open flow trigger explorer so you can open from here so that you can see the order for that particular option.