 Hello, everyone. I'm Sanjay Gupta. I welcome you on Sanjay Gupta Tech School. In this video, I'm going to demonstrate a scenario based on schedule triggered. Let's understand the requirement to implement schedule triggered flow. So we need to copy account billing address to related contact mailing address. Right. So this is the requirement that I'm going to implement with the help of schedule triggered flow. So here I'm going to create a flow. So I'm selecting schedule triggered flow, click on create. So here I need to set this date and time. So I will be setting it later as per the current date and time. So right now let's say frequencies once so once you want to copy whatever address is available in the billing address fields on account to your related contact. Right. So what we can do, we can just have update record element. So we need to update contacts. Now here we need to specify the condition so we can have account ID equals here dollar record is not available. So to have that current record. So we just need to specify this object so that for which record this flow is running that info that reports information will be available. And the information will be available in the dollar record variable. So you can have this account. And here you can specify the conditions like billing city is null falls. Then we have billing country is null falls. Then billing state is null falls. Then billing street is null falls and zip code. So actually billing addresses having all these five information if like they are not null. All together, then only we want to run this flow so this is my requirement in your case it may be different so accordingly you can modify this condition. In my case like if billing city country, state, street and post report all are having some values that only I need to run this. So I clicked on done. Now if I choose update record. So I can choose contact and account ID equals now we have this dollar record dot ID. Right. So the contact record whose account ID is equals to this records account ID that contact report will be updated and we need to assign values like this. Dollar record dot billing city. Then mailing country. We having dollar record dot billing country and mailing state. Dollar record dot billing state, then mailing street. Dollar record dot billing street, then mailing postal code. So this way, all the fields are mapped and you can click on done. So if your frequency is one in that case this is correct because your account information will be copied to the related content. But if you somehow run your flow on daily basis, if you run your flow on daily basis. So what will happen like same records will be processed daily that you don't want to do. Right. So what we can do, we can just create a field checkbox field on account like rather account billing information is copied to contact mailing information or not. So if that checkbox is checked, then those records won't be queried in this flow. If that checkbox is unchecked then only that record those records will be varied in this flow. So we can do that. So before moving to there. I'm just saving it. Okay, so we just need to set. So right now I'm selecting random date and time and frequency. I'm just saving it. I'm not activating it. So before that I'm moving to object manager account fields and relationships new. I'm going to create a checkbox field naming it as address copied. So initially this falls. Right. So this field is created now I just need to refresh my flow so that I will be having that newly created field in the flow. So now here in the condition I'm going to put that as well. So address copied equals to false. If it is false, it means we need to copy account billing information to contact mailing information otherwise not. And after copying we need to update account record as well. So if we can read the reports where checkbox was unchecked now after update, we need to check that checkbox. So address copied equals to true and done. So this way now this flow is ready to use. Right. So what we can do we can just activate this flow. But here we need to set the date and time so frequency let's suppose daily. So today's or as per the update so what I can do. I'm just opening this opportunity record and I'm just changing some field here. And I'm going to save it. So here you can see last modified the time date 57 times 1029. So it is correct time I'm going to change to 1031 clicking on done save and activate. Now if I go to schedule jobs. So I will find one entry there so here you can see update account address to contact it is scheduled scheduled at 1030. Next schedule one is 1031. So now all the account wherever account address billing address is populated. Those will be copied to the related contacts mailing address. So what we can do we can just move here. So here you can see we have these reports so I'm just having that field as well. So the address copied so only those reports will be having it's true or wherever addresses copied so you can see our flow executed so I'm just refreshing this page. So it is executed and scheduled for next run. So it started on 57. Next schedule run is 467. And here also you can see like wherever billing information billing state is available. So only those records are having this checkbox check. Right here it is not checked so maybe on this record, all five address fields are not populated. So if I go here. So you can see postal code billing countries blank so that's why this address is not copied to the content. So this depends on the requirement like in your requirement if you want to copy whatever information is available so you can set the entry criteria accordingly. Right, so now if I open any of the record and go to the contact. So you will find the same address in the billing information. So sorry mailing information so here you can see mailing information is available. So if I go to this account details. So the same address is available so this way, like after executing this flow you can verify the data. Don't forget to create that field checkbox will because it is important now next day when this flow will be running so wherever this checkbox is checked. So those records won't be processed unnecessarily. So this is how you can copy account billing address to related contacts mailing address.