Hello YouTube family, this is Savi and welcome back to my YouTube channel. So you are very new to this channel. Please do share and subscribe for all the ServiceNow content for free.
So I am back with a new YouTube video where we are going to learn ServiceNow Flow Designer part. So this will be a new series which is called Flow Designer and where we will use Flow designers, how to use the Flow designers, how you can use in catalogs, how to create a notification. So in this particular series of Flow designers, I am going to teach you from very basics till advance how you can use in how you can use Flow Designer in ServiceNow.
So let's get started. So this is my personal developer instance as you know that eight 6573. servicenow.
com so let's get started. So basically 5 Flow Designer is coming into picture in ServiceNow. So basically before flow designer there was a concept called workflow.
OK so in workflow what we used to do if you have seen my catalog item videos you can go back and check that catalog item videos where we created workflow also which is old school. So workflow look like this. Go to the workflow editor and under the workflow editor you will create certain activities and activity has to go through certain stages like approval stage, catalog task.
So these are the list of activities. For example, let's say I'll click on all, let's say Airbus aircraft 320 injured for example. Somebody's creating this catalog workflow.
So in this particular workflow you will notice it is passing through certain activities with certain connector lines with timers and all those activity. And this is part of a dedicated catalog item. Now let's say here it will move to this and then you have to bring this activity from left hand side code section to the right hand side.
So if you have not checked that video, go back and check guys, there's a workflow video especially on the catalog item. We can do that. But from the Kingston release service now has bring low code or you can say no code.
We sometimes coded Flow designer, so they have bring a module called Flow Designer. There you will just drag and drop and your activity will be completed. It is very easy and very convenient as compared to the workflow.
So here you have to attach the connector line to different different activity. There you have only three things which I will show you and based on that three things only your record will be executed. So let me go back close this and just type here Flow Designer and thanks everyone guys for liking the video so much.
I am getting lot of good comments on my YouTube channel that you are really liking this video. So thanks everyone to being part of this ServiceNow family and we'll grow very fast and keep supporting guys. So over here just click on this option called Flow Designer which is under process automation so you can make it favorite so that it will sit on the top of the favorite list open the flow designers look like this.
So you will notice in Flow designer we have few sections, flows, subflows, actions, execution. So we'll talk about everything in details. So we are talking about flow in this particular video.
What is subflow? We'll see in the next video South in this flow, we are going to create a logic similar to what we did on the workflow side. So how to create it?
So you have a new button on the top right. Click on this and justice click on this flow. First you click on this flow, just give the flow name.
So let's say I'm going to put a flow name called Service. Now you to family. OK this is the flow for you.
Make sure that you should follow this proper naming convention. So to follow the proper naming convention. How it goes is flow name should start with your client name.
So let's say it will be something like this client name then- what is all about your flow. So let's say it is for catalog item. You will put the catalog item details over here.
Let's say it is for comic catalog item for example forming catalog. So you can put something like this client name and call me catalog item. But in this case, I'm going to put my client name as YouTube- catalog item is for, let's say go back to my YouTube channel.
So let's go to the YouTube run ServiceNow Ravi YouTube Okay. I'll open my YouTube channel Okay, we'll come down, we'll go to the playlist and under this playlist we'll go to admin part. Okay under the admin part.
So you can see here we have kit a service catalog, Service catalog Best Practices, Service Catalog workflow. So let me see what workflow we have created for which catalog item. So let me skip this ad.
OK, this is created for which catalog item? Comic. OK, so this is for catalog item workflow we created for comic I guess.
Yeah, it's for comic. So now let's say I'm going to create a same kind of a workflow for my catalog item called Comic. OK, so I'm going to book here.
I'll put here comic catalog or you can put a space. Also catalog or_anything is fine. Description, you can put the description about the flow name.
Always remember we should follow the best practice. So here the description is. This is to show how flow designer is working.
dot catalog. So this is for catalog item. Now you can you can check your application.
Obviously I'm going to choose global application because my catalog item is created under the global application. If you have any scoped application you can choose any scoped application. Protection is not needed because I made it not read only to everyone.
Let it be normal run as whoever whoever submit a request the catalog item should execute. The flow should execute on that catalog item. So user who initiate or system user you can choose.
I am going to choose a user who initiate. There is no need of rule just click on submit. Once you click on submit you will notice catalog item flow will be coming up like this YouTube comic catalog item.
So in your catalog item whatever details we have, we will fetch here. But before that in flow designer there are three things you have to keep in your mind. I'll do this for you.
So first thing is your triggered condition. Triggered condition means how ServiceNow will understand this flow is for catalog. How ServiceNow will understand this flow is for record.
How ServiceNow will understand this flow is for any any notifications how ServiceNow will understand because of this trigger condition. So trigger condition means in case of catalog if somebody will click order now the catalog is triggered the request is getting triggered. So you can pause this video and you can answer me this question on which table the catalog workflow is created or the catalog item where the data will go.
On which table you can pause the video and you can comment in the comment section. The answer is requested item table. So when you click on order now a request is getting created which is req request now like your order ID of your Amazon then you have requested item R ITM then you have your service catalog task.
OK so here the trigger condition is your flow miss order now so click on whatever the flow should execute. So this is called triggered condition in action. There are three things what action I'm going to perform, what flow logic I'm going to perform, What's up flow.
So only three things are there in ServiceNow flow designer. First is your triggered condition. Second is after triggered condition what action I'm going to perform?
Create, Update, read and delete. Any operations we can perform Flow logic means if condition else condition for loop condition. So all these conditions are nothing but a logic.
If I select this this should happen. If I select that that should happen. And subflow means if you have already existing flow already created you can use this in this flow that is called subflow.
It's like your sub workflow. If you remember then we created the workflow in the code section. You will notice near the code section.
Let me open it workflow editor. So if I open this workflow editor under the code section you will notice this workflows are there. Now if I click on new and if I create a workflow I can use this workflow.
So this is called subflows which I can use on any other catalog flows. So those are also available under this option called subflows. So we have to add trigger condition.
We have to add action and we have to use flow logic or subflow as per our requirement. So the first condition for our catalog item to add a trigger is how to get the catalog item on the floor. So before that let's open any catalog item.
So how to get to the catalog item you can comment me in the comment section. Maintain items will go under this maintain items. We will find the comic.
OK let me search for comic star comic. Yeah Indian Comic Center. This is my catalog item name Indian Comic Center under this Indian Comic Center.
Currently notice we have a workflow which I will not use. We will create a flow. Now how to get this catalog item on our flow design and trigger condition.
How I will tell my ServiceNow. Hi ServiceNow this is the flow for my catalog. So in that trigger condition click on this and you can see you can do the CRUD operations.
You can add a schedule job, you can call Slas e-mail actions. Now you have this option called service catalog or just type here service catalog. So your trigger condition is service catalog.
It means that whenever a catalog is called on the workflow or sorry on the flow, the trigger condition will be executed means initiate from a ServiceNow service catalog item request. That's what I'm saying you if I am going to place a request let's say if I go to this catalog item, try it. OK for example.
So how ServiceNow will understand that the flow is for this catalog item. ServiceNow will not able to understand current. So I have to tell my ServiceNow in the flow designer.
But hey ServiceNow the request is for service catalog. Just select Service catalog. First of all click on done.
So the trigger condition will be service catalog. Now again ServiceNow will not understand which service catalog item you want to trigger you. You get my point.
The point is they say there are N numbers of catalog item. They say how many are there in my system around 285 catalog items. Now I have started my trigger condition as service catalog.
But how ServiceNow will understand that I have to bring comic service catalog house service number or 4K Electro, HGTV, Electric bill generator or aircraft 320 engine house service number will understand that I have to pick this catalog item. So for that we have to add an action. In the action what I will do?
I will get all the variables of the catalogs. Variables means I hope you know that these are the variables Reader name, Reader address. How I can get the variable?
Simple let's add an action. What is an action based on the trigger condition? What action I'm going to perform?
Let's say if I want to create a record, I have to create an action out of it. If you are creating any record or any table what you are doing? You are creating action, correct?
Creating is an action, Updating is is an action, Deleting is an action correct. So if you notice here if you select service catalog, trigger condition on the right hand side called data picker or data pill. In this case you can see trigger condition is service catalog.
So on which table service catalog is created? On which. So when you click on order now on which table the record is getting created is your requested item.
That's why we have a requested item. Over here under requested item we have all the information about the table action item approvals everything. Let me show you the table first.
So the table name is requested item or you can type the back end name of the table sc_req_item dot list enter it, Yeah let it load it. But there there you go, it will open a table for you. Something like this.
And if I open any record over here, let's open the record, you will notice all the details are present on this service catalog of service catalog on the requested item, Your workflow details, your flow details, your variables details, everything. Which workflow is attached? Everything is present under this.
Our IDC workflow is attached, Approvals task, everything on the ATM table. That's why under the flow designer whenever you choose a triggered condition, automatically requested item is selected over here and we have the UTC time. These other common things which you will get.
Now what action I'm going to perform, get the variables from the catalog item. So go to the action and there you go, we have list of actions in my ServiceNow system. I have lot of module installed, I have spokes installed, I have integration hub installed.
So you will get lot of options over here Jeera and all those. But what I have to go, I have to click on this option called ServiceNow code. Just click on this and justice start searching catalog just type catalog.
Now see you have this option called Get Catalog Variables. So if you are using flow for your catalog, the first step is the trigger condition. Second step is you're getting the catalog variable for your catalog for your flow.
So click on this Get Catalog variable. There you go and will ask you submitted request requested item. Obviously I know that add the catalog record will be catered requested item.
So here drag and drop the submitted requested pill. So what I have to drag and drop obviously the requested item. Why?
Because on service catalog catalog item record will be catered on requested items. So I can click on this option also. This is called data picker or you can say data pill.
You can pick from here. Click on this what is the triggered condition Service catalog just select it. You can see here trigger condition is requested item or you can just drag and drop something like this.
As simple as that. Once you drop it, ServiceNow will ask you that which catalog item you want to choose. Now here ServiceNow will recognize that this flow is for comic catalog.
So I will select my comic or let's say Indian comic. Yeah, Indian comic. There you go.
Once I select Indian comic, all the variables are coming. See, I will select this variable and I will push it to the right which is available to selected section. My work is done.
ServiceNow and ServiceNow is going to understand. Now OK, a person is creating a flow on the service catalog on the catalog item called Indian Comic Center and done. So my work is done and one is created over here.
See Get Catalog variable. Under this catalog variable how many variables are there? Reader Name, Reader address, Reader.
You can see here Reader name, Reader address, Reader age. Choose the cartoon character and the something called Visit the link which is over here. My work is done.
Now after this I will start creating my logic and my logic starts as per my requirement. As for the business analyst, groom a story groom by the business analyst or by the develop by the client. They will ask developer to do certain activities.
OK, so over here let's create a requirement. So let's say if the reader is is 5 to 10 years for example. If the reader is is 5 to 10 years, I want I want to create a catalog task.
Let's make it very simple. For this particular video, how you can create a catalog task from the flow. So let's say if the reader is is 5 to 10 years, let's create a catalog task.
OK or we can do like this. Also if the reader is is 15 year plus, let's move this request to the approval. How we can do all this service now?
So flow design is very simple. We have to create a logic which is nothing but flow logic. Now here action is not needed.
Why? Because first we will check the condition if the catalog variable so-called reader age which is here reader age. If the catalog variable reader age is 15 plus years, let's trigger a approval.
OK so how we can do that? Click on this flow logic. Under the flow logic you will find if condition parallel condition decision call overflow.
All these options are coming up over here which we'll see one by one in the upcoming scenarios. Sorry I'm not making any decision. We'll delete this.
We are making a we are just creating a flow if condition if and what is the condition label if reader ages 15 plus Yes it's just a condition label guys you can give any any anything over here. It's just a label for it. And now the conditions start here.
So what is my condition if reader age is 15 so I can drag and drop as simple as that guy is very simple. So here we don't have to create any code section here we just have to drag drop it or you can do this click on the data pill get catalog variable Reader is simple but I will prefer this reader is is if it is 15 years. OK done.
Then what action I'm going to perform, I will ask for approval. So what action I'm going to perform. So click on the action and the action is click on the code section first always this type approval let's see it is coming or not and you will notice it is coming as ask for approval.
OK, I will ask for approval. Click on the approval. Now again every time this this will be coming up drag and drop the record.
Now again you just go back to whatever we I have told you 10 minutes back on which table requested item is the table on which the flow or workflow is executed correct? So we will bring the requested item option where the requested item option is over here let's drag and drop simple. So see here on the requested item table only we have the approval tab.
So what I should select? Simple I should select what I should be selecting requested item. So here we will be using requested item.
You can see table automatically. All these options are pre filled and what is the rules to select so who is going to approve it. So let's say whoever is requesting, let's say there's an option called requested for Let's say requested For manager should approved.
So able tutor should approve in case of system admin. So here the approval will be triggered as able tutor. How you can do that?
Go to this choose a approval rule so anyone can approve. This is similar to what we did on the workflow part. You can go ahead and check that video.
Anyone can approve means if there are 10 approvals out of 10 anyone can approve it will work. But there's an option called all user approve means every all the 10 users should approve one by one that is called all user approval, all responded and anyone approved. So it means that all has to responded or anyone can approve it.
So we will go with this option called anyone can approve and who is the anyone requested for manager. So there's a catch price. How I will get this option requested for manager apply.
Just pause this video and think how I should get approved when. So we have data pill. Here we have add user.
We are not adding any user manually because if you can add it, let's say I I can add Abraham Lincoln so he will be the approval. But no I don't want to hard code it. What I want is whoever is requesting their manager they should go.
I cannot do this also group. So how I can do that? So on which table requested I flow is there requested item?
OK so I can go to the requested item correct? So I'll go to the requested item, click on this option and now on requested item what options we have? We should search for requested for.
Let's see. Come down, Scroll down, Scroll down, Scroll down, Scroll down, Scroll down. PQR Requested for and under the requested for only we have what we have.
Manager is a reference field correct? I click on I, it should show me manager. Very simple.
We will go to requested for and we can bring the managers from there. So mnop manager drag this put it over here. Very simple just over your cursor.
So trigger condition is Service catalog requested item requested for manager. If you're not comfortable with this guys dragging and dropping, click on the data pill trigger condition is Service catalog requested item. Then we'll go to the requested for OPQRC.
Under the requested for we have my manager. OK that's it Selected It is requested for dot manager. So whoever is requesting it will go there ask for approval.
If approval approves it then it will go to the next stage if rejected. So you have to create another condition over here see odd if it reject same thing I can put bigger condition requested for, requested for and then we need to fetch manager so. So the rule says like this ask for approval if it is approved do this, if it is not approved do this.
So this is my two condition which we can create. Click on done. So ask for approval and click on this option I will check again if it is approved or not.
So again I can use a logic call if if, if if it is approved or if it is approved, if it is approved. OK, if it is approved, so how I can check the condition? So you you will notice guys over here for everything 123 numbers are created.
So I have to check the state of three. OK, let me show you how you can check the state of it. Let me just make it.
Yeah now see we have one, one is catalog variable, second is if condition, third is approved. Now I have to check the state if it is rejected or if it is approved. So if you notice on the RITM table if I go with this approval option right click open the new window or you can click this only you will notice Here we have a state whether it is accepted, rejected, approved.
So this I have to check if it is approved then create a task if it is not approved then reject then do something else. OK so here I have to check the third condition so where is third? Here click on this and see approval state is coming just drag and drop.
Simple very simple. And for this in workflow you you have to create certain script or you can have to perform certain actions over there. But here it is drag and drop.
Now it is if it is approved. Simple if it is approved done. Then create a catalog task again creating this having an action.
So I will create an action. Now ServiceNow code and task create a catalog task, let's create it. So on which table again requested item table so I can drag and drop.
Short description is the task is for delivery team to deliver the comic. Simple. This is my short description of the task.
I'm going to add the value of field so on the task table. Let me show you how task table look like. So right click open the new window and remove it.
Let's open any task, let's say service catalog task. SC okay open any service catalog task. Now this task look like this.
Guys let me show you we'll close this. We'll close. Yeah see state, Priority Assignment Group, Configuration item.
All these are coming on the task also. So here we can put a field. So let's say state, state of the task will be or.
This short description of the task will be. What I want is deliver it to delivery to the. I will put the location over here between these codes and how I can bring the location?
So we have the reader address. We'll click on this reader address, let's say city. I will choose the city.
I'll put me here. See. Deliver to the given address.
Simple. Let's put Assignment group, Assignment Group as delivery. Do we have any delivery?
Yeah. OK, We don't have what else we have. Let's put delivery only.
No issues. You can create Assignment group guys. But let's say I have created this so I have to select again on which catalog item it is.
So it is on Indian comic center simple. And if you notice on catalog task also we have this variable section correct. So how to bring this variable section.
So whatever the catalog item you have selected bring that to the right Simple done. So see from starting trigger condition is service catalog action is getting the catalog variable. If reader is 15 ask for approval if it is approved then get catalog task and after that you can add this also guys annotations like checking.
You can tell your developers or admin or whoever checked. At the last you can give certain information like a help text checking the reader age age. OK sorry yeah something like this.
You can create like this first task. OK yeah now this is called copy. If you click on this a duplicate task is created.
So I don't want to copy just for information I'm telling you. And this is called delete. You can delete it now.
Once this this is done we can update. We can update the RITM table. So once it is close complete let's update the RITM table also.
Let's say when the task is close complete let's update this RITM also to close complete. How I can do that simple click here action and I can go to the ServiceNow code and justice type here update. Now see update record is coming click on the update record.
So what record I'm going to update so I'm going to update table called requested item and what item I'm going to update I'm going to update the state. State as close complete and stage as also complete. It's very simple guys.
It's very simple. If you have any question do let me know in the comment section. I will help you out.
That's it done. Now a simple flow is created. Let me make it little bit of yeah like this a very simple flow is created.
We'll see in complex stories also how this flows are created. For this video I have I am creating a simple flow for a catalog item. So let's see how it work.
And after this you can end the flow. So click on this + and in the action section, flow logic section just type here end and the flow will be ended. It's like it is end.
In the workflow detail you will notice there's a end option. Let me show you. Currently this is my catalog item called Comic Indian Comic Center and that is in Indian Comic Center.
Let's see how this catalog item process engine is there correct under this process engine. We will open the workflow first to show you how this end look like. On workflow side, we click on Process engine.
We'll click on this catalog workflow. Open the workflow. There you go on this workflow you will notice there will be a code activity called End.
See correct on the flow. We also have this activity called Endflow. Simple.
After doing all this, you will click on the save option on the top. Let's save it and activate your flow so that it will be activated and it will start capturing in your update set. So if you click on save only at that time only it will capture your update set.
But but before without activating you cannot run this so you have to activate the flow. So let's activate it saving YouTube comic catalog and I should get a green sign Over here flow activated successfully. Now I will copy this name.
I'll go to my catalog item, whatever I have created, close this. I will remove this workflow. I will pull this flow back OK and just save it.
There you go, my work is done. So let me close everything OK, refresh the page, reload and now let's submit a request. So I'm system admin.
My reader address is let's say India. But do India has city name Yeah Hyderabad for example. Reader is let's say 15 plus.
OK let's click on order now. So once the order is created request will create and then RITM will create. So you will notice first request number should show you over here and under this request number if I open this it will take me to the RITM table.
This all we have discussed in our catalog series come down. You will have this option called flow context and you can see here my approval is able tutor correct now right click approve it. Once I approved what should what should my flow should do.
So my flow should move to the task operation. See let's see see a task is created and open this task and the task is created and assigned to the delivery of courses and I cannot see a short descriptions there. See the task is to deliver the comic correct?
Now let's close this task, close, complete and justice save it. Once it's close complete the RITM should be updated and you can see it is updated. Stage is not coming maybe because complete option is not there.
I will check. So this is how the flow should work. You can click on this flow context to check where how its flow is working and from let let me check whether it is coming up or not.
So flow report not available open context record. So let's see. So it's OK.
If it is not coming we'll go back to our flow and from here we will test it. So before that let me change something over here it stays to be close. OK, complete.
So that's a request complete for example. OK, done it. I will save it.
Yeah, let it save. And meanwhile guys you can go ahead and check all these videos if you want. And thanks for giving so much of support and love to this channel and the more video will come for sure.
I will be busy sometime. That's why I'm not able to put the videos. Just activate this.
So we are going to bring a new series in the upcoming days, last week of November, sorry, first week of November that is on the HRSD series and the plan for item is from January 2024, so not yet decided. Let's see how it goes. So now let's click on this test option.
We'll test it from here. OK, now it is asking me for the item number. So let me give this number only, no issues.
Copy and let's give this number. Run the test. Now why I am doing this guys?
From here you can see each and every step which is getting executed in your flow like this. Click on this. Now see currently it is getting catalog variable evaluated through and it is ask for approval.
So let's see. I'll close this, refresh the page. OK, I what I will do is here I will delete all the approvals first of all.
Now I will test it again. Let's delete this because again it triggered but it's already approved so it's not working. So click on delete.
Fine. Let me delete this task also to show you this demo. OK, OK, let's go back, close this.
Now run test again, processing the flow. OK, all good. Yeah, click on this.
OK, refresh. The page no longer is quiet. OK because the state is closed.
Complete. OK, guys, let me make it open. OK.
So let's see whether it is working or not. Again, because the state is closed, that's why it is evaluated to true. See here it is evaluating to true everything.
That's why it is getting completed. So let me just go back and do it again for you. If not I'll take any other ritm to check this.
OK let it loaded again comic now see it is requested you can see let it loaded see waiting. So waiting. This variable is reader at reader age is 15 you can see 1515 it is coming through.
This is the back end thing which you can check guys where your flow is currently. So you can see evaluated to true means. It means that if the reader is is 15 condition is 15 years, correct?
Now if you check my RITM here I have selected 15 years so reader age is matching it. So it is evaluated to true. Now it is on this stage called waiting for approval and who is the approval able to done?
OK, so let's go back and let's approve it. Right click approve. Once I approve it, you will notice it will move to the next stage which is called create catalog task.
Let me refresh it. See waiting evaluated to so that this task is created. We'll go back and check.
Come down catalog task. There you go. Task is created.
Now if I close complete this task, close task for example, now again it will go back to the next stage. See complete complete. So record is also updated to three and stage is also updated.
All things are updated operation completed. So you can go back and see operation completed and close complete. So this is called your flow guys.
This is how you will create a simple flow in ServiceNow on service catalog. So remember you have a trigger condition, flow condition as trigger condition, action condition and the flow logic condition over here action means what action you are going to perform. It can be create, update, read and delete.
It can be send a notification. It can be scheduling a job OK And this flow logic means if it's conditions for each conditions and flow conditions and subflow means we can use other flow over here. So if I click on subflow see here, it will ask you for other flow.
Let's say if I have to use this flow, I can use this flow over here in my catalog item. Sorry, on my flow designer, it's okay. I don't want to use it, delete it.
So you can create a flow like this. So when we meet in the next video, we will do little bit advance that how you can create a record from ServiceNow. How you can trigger a notifications and how you can use subflows.
So till then thanks everyone. Keep supporting, keep watching. We'll meet in the next video.
Thank you very much. Bye.