 Hello. I'm Sanjay Gupta. I welcome you on Sanjay Gupta Tech School. In this video, I'm going to demonstrate a scenario related to screen flow. So let's understand the requirement now, which I'm going to demonstrate in this video. So we will be creating an opportunity on account through flow and we need to send a custom notification to account owner. So here, before starting the flow, we need to create a custom notification. So in setup, you can search for custom notification. Now here, click on new. So here you need to write the custom notification name. So I'm naming it as demo notification supported for both and save. Now I'm just copying this API name, and I'm going to create new flow. So first of all, I'm going to get that custom notification in the flow. So I'm going to select get record element. So get custom notification. So this way, here I selected custom notification type as object and provided this condition. So how many records one and how to store record data automatically store all the fields right. So now you can click on done. Now the requirement says we need to create an opportunity on account so I'm going to have a screen. So here I need to have opportunity information. So quickly I'm placing these components. So first will be name. Then we need to provide date. So here I'm labeling it as close date. And then pick list so that we can have the stage. So what choice set here I'm providing API name as stays name. Then here I need to select opportunity, then pick list. Then stays name and done. So this way opportunity information will be received through this screen. Now I need to link this opportunity to account. So I'm going to click this record ID variable. Sorry, I need to select text as data type and available for input and done. After that, I just need to have create record elements so I need to create opportunity, how many records to create one, then you separate resources and literal values, then here I need to select opportunity. So I need to map name with opportunity name. Then I need to map close date with close date. I need to map stays name with stays pick list, right, and then I need to populate on tidy with record ID. So this way opportunity record will be created. Right. So we just get the custom notification then the screen for opportunity information, then create opportunity. Now, I need to send custom notification to account owner. So I need account owner ID. So for that I need to use get record element. So here I'm writing label as get account details. So here you need to search for account. Then here ID equals record ID and leave everything as is and click on done. So account information will be available. Now after that you can have one action. So here you can search for custom notification and you can select this option send custom notification. Here you can provide the loop label as a notification. Here we need to provide the custom notification type ID. So we already received that. So custom notification ID. Then you need to have notification body and title. So for body and creating new resource as text template. So here I'm writing as notification body and plain text. So I'm just writing notification body. So as per your requirement you can have any other message and you can insert resources as well. Right. So I'm just clicking on done so it will be available here. Then I need to create a title. So again I'm going to select text template. So title. And then I'm clicking on done. Then here we need to provide recipient ID. So we have account details. So I'm just selecting account owner ID. Okay, so basically this ID. We need to wrap in a collection variable then it will be available. So I'm just clicking on cancel and I will be recreating it. So before that I'm going to create new resource as of type variable. So naming it as IDs data type is text along multiple and done. So before that I'm just using assignment variable. Assign owner ID. So here I'm going to use this that variable adding account owner ID. And then I'm going to create that action. So here we need to use this notification ID, then notification body, then title, and here we can provide IDs. Okay, and these are optional parameters if you want to set you can otherwise you can take more. So here I just need to click on done. Then I'm just clicking on save. So send custom. Mission on. I'm saving it activating it. Now I'm just moving to account record. And I'm going to place that flow. So I'm editing the page. So here I'm just replacing this flow. So if you if you're placing this flow for the first time so here from left hand side you can just drag and drop it. And you just need to select your flow from here. So it is send custom notifications I'm selecting it, enabling this checkbox so that the account record ID will be passed. I'm saving it. Moving back. So now I need to create account. Sorry opportunity and then I need to see the notification. So I'm creating OPP 501 here you can see we have two opportunities so one more will be created. Okay, so it is showing some error so let me just see what is coming. So it is showing like you can't send a custom notification without a navigation target specify either a target ID or target base reference on the send custom notification action. Okay, so we need to jump here. So we need to provide the target ID. So, let me set account ideas that target ID clicked on done save as so I created new version, and I'm refreshing the page. Still it is showing the error. Okay, so we need to identify like what we need to pass in the target ID so what you can do search on the Google custom notification flow Salesforce so you will find this flow notification. So here basically you will find the properties. So it is asking for target ID so target ID is optional the record ID for the target record of the notification. Specify either target ID or a target base reference this parameter accepts single value parameter type, but it is optional so let me just read this, where it is failing. I have this this this this, but it is saying you can't send custom notification without a navigation target. Okay, so we provided navigation target as record ID still it is failing, but here it is saying like it is optional. Basically, what happened so I just saved it as a new version but I didn't activate it. So I'm just activating it and moving here and refreshing the page again. So whatever you do, save as and create new version so don't forget to activate the flow. So I clicked on next now you can see there is no error opportunity 501 is created. Right and at top right corner you can see this bell icon is receiving a notification, because account owner is the current logged in user. So that's why that user is not getting a notification so notification title and notification body. So this way, through screen flow, you can send a notification to the user. Right. So, this was the requirement like how to send custom notification to user when you do certain operation through screen flow.