logo

NJP

#5 How to trigger approvals in ServiceNow with Flow Designer | ServiceNow Flow Designer Training

Import · Mar 08, 2021 · video

[Music] please subscribe to my channel and click on the bell icon to get the regular updates of my channel and do not forget to like comment and share hello everyone welcome back to sas word service now this is part of servicenow flow designer training you must be getting some requirements related to approvals in which you have to trigger approval so that somebody can approve it for some brackets how exactly you can achieve these requirements today in servicenow so servicenow provides a feature of workflow in which you can add approval activities and you can achieve this functionality however in order to achieve complex functionalities sometimes you have to write code as well but how can you achieve these functionalities without writing a code and the solution is flow designer so in this video you will learn how you can trigger and manage approvals with flow designer without writing a single code in service now this is my personal developer instance and i have already opened flow designer in another tab now i will click on this new button to create a flow so that i can show you that how you can use approval actions so i will click on this flow and then i will provide a name so demo dot action dot flow or maybe demo dot flow dot approval action approval dot action and i will click on submit so this will create the flow now here as you know we have two sections trigger and actions and here i will mention created the table i will select incident for now normally you don't send approvals for incident but in this case i will select it just to show you the demo but it's totally up to you as per your requirement you can select any table basically where you want to trigger the approvals so i will just select incident here and then i can just provide condition so i don't want to trigger this uh approval for for every incident which we will create maybe i will provide uh like short description or maybe category i think category will be better because if somebody is creating a category is i think we can just put maybe in query and i can just put maybe sub category as well if we put sub category um we have a lot of options here so maybe i can put i can put internal application so if somebody is selecting category as inquiry or help and sub category is internal application then it should trigger an approval that's a requirement then i will click on done just for trigger so here whenever this condition will be matched this will trigger this flow now i will come to actions in order to add that action so what i want now in order to trigger any uh approval you definitely have to trigger that particular activity basically approval activity from that record like you do in workflows now how you do in in flow designer so you just click here you click on action here you have this action that's called as ask for approval so if i click on this this will show me some input fields where i have to provide the input to trigger this approval so here it is asking me to select the racket which record for which racket i need to trigger this trigger this approval so i cannot select direct racket i just need to click on this data pill and i can just select this to your records and that will be incident racket so i will select this because it is basically referencing the society whatever racket will be created over here it will be mentioned in this particular field as an input now here we already have table selected automatically selected so you don't have to provide it then we have approval field now which particular field now this normally if you would select a table from i think task table where exactly you will find this approval field you will see that it will automatically select it but if you will select any custom table where you don't have that kind of field then you have to select that field from here that which particular field shows the status so here whether it's approved or rejected so in that case you can see it says approval field so i will select approval it is automatically selected so i'm not touching it then we have journal feed basically which shows the history and i will i will keep as is so i'm not going to change this as well then once you're done with this you will see rules so here you can select who like who are the people who should approve it so you can see here approve i can select here when who approves it so here you can see the approval rule so i can just put anyone approves it and it's up to you it's as per your requirement so i can select anyone approves it and then you can select who should approve it who is the approval so that you can select it from here it's a similar kind of configuration which you see also in in approval and workflow approval activity so in that case you can select a single user you can select a group and you can also select like manual approvers so what i will do i will maybe send this for approval maybe to assignment group so how exactly i can select it so i will select this data pill go to the racket which will be created i will go to the record here but i cannot select the racket directly because i have to select the field which is basically uh which will basically get those approvals up so i will just select here and i can select assignment group because approvals can be sent to groups as well in servicenow so i have selected this and i can just click on done but just give me is i think i can just you can see here due date now if you want a due date as well like approve and you can just mention if pending buy so that is also the due date can also you can mention here but if you don't want that's totally okay and you can just click on done now what this will do this will basically trigger the approval but let's say racket gets approved what exactly you want to do so this action will definitely help you to to trigger the approvals but once racket is approved what do you want to do next in that case you can select another action so what i will do you can select here if now when you will select this if logic you can directly select here ask for approval and here you can select approval state what exactly the approval state would be and then you can uh basically follow the further flow so here i will select if approval state is approved so here we put the condition anyone approves it that means even one user will approve it the whole racket will be treated as approved and what exactly you should do if it is approved what action you should take okay that's fine if it is approved till here it will update the state that okay this racket is approved what what next that you can mention over here that if it is approved then maybe you can do you can create another incident so for that maybe i will i will just select create task and i can select the same table and i can just select the value and value will be maybe i will do i can i can put the parent incident so i will i will keep this particular incident parent so here i can put this one so i'm going to create a child incident overall and i can provide a short description sort of description as test child and then i can put here let's say i will put caller and i can also copy the collar as well with the same same same racket which will be created over here let's say this one and then i can just a short description caller i i think maybe we can put assignment group as well if we want yes i can put assignment group and maybe i will just put application development and that's it we're not going to copy category and subcategory because i'm just creating this child incident that's it so here it will create the task and i can just click on done now if this condition will be matched it will like that means if it is approved then it will create task else not now if you want to create more logic i think you can just click on this flow logic and you have a lot of other options for logic but we have a separate section for flow logic as well in which you will learn about logics in details so now i'm done with this so i can just create the task if it is approved and i can just click on save and i can just activate this so this flow is saved and i'm going to activate this now you have to remember one thing that in order to trigger this flow the condition should match which is mentioned in this flow that is category is in query help and sub category is internal application so what i will do now i will just directly go to incident and i will create a new incident so that i can see this flow executed and i will select the caller apple tutor here i will mention test and here i can select the sub category as internal application and i can just assign it to application development so this ticket will be assigned to application development and if you remember this has to trigger approval approval to this group that's what you have selected in the flow so i can just save it and if i will click on save this will create the incident and assign it to this in this particular group and if i come over here and if i click on executions you will see that this has started executing as of now it's still running i will close this and i will okay this shows in progress and that's a magic that's a power of flow designer you can see the whole execution details and you can see where exactly uh where where what is the status of our flow so you can see the incident got created first and that's a record we have you can see one zero zero this one seven and we have the same racket here then it's sent for approval and if i click here yes ed basically sent this particular racket for approval how would i know that so i can just go here uh i think i can just refresh and if i will reload my incident i can see that that we have all these people that means this record has been sent for approval now how exactly these approvals are populated here because of assignment group because all these people are part of this group that's the reason they have got this approval for this particular record now if i come over here this will continue to show as waiting why because it has to be approved for next action to be processed so in order to go to this action or this logic to execute and then this action you have to approve it or reject it so what we will do we will approve it so i will just approve it so i have admin access i can just approve it for now so it is approved and you can see now others are still showing as requested and if i i think i think ideally you can just convert these rackets to not that i think not required because it still says requested but overall this particular racket should be approved overall so how exactly we will come to know about that so i will i will just go to here execution rafal refresh it absolutely you can see that that this particular evaluation this flow logic evaluation it became true because system basically the user approved that particular record like the up whatever approval that user got basically he approved it one of the user approved it and once it is approved so our next action was if it is approved then create a child ticket how would i come to know whether it created a child incident or not let's see that i will reload it and absolutely you can see here that we have got this new incident created automatically i didn't write even a single code and i was able to send for approval so the user approved it and i was also able to create another racket that's a another action basically create task action and we will talk about in details in further for the videos and we can see if i open this incident you will see that i have got the short description as test child that's what we mentioned as an input and it is also assigned to application development i think we didn't touch category but we touched caller so if you remember we we basically copied the same caller from parent incident and you can see the same parent incident over here from which we have created this child incident so that's how you can use the power of flow designer in servicenow platform and deliver different requirements you get from your customers and clients and if you are a process owner then or or a developer you can definitely utilize even even if you're not a developer you're just a process owner and if you still want to use flow designer you can use it and achieve functionalities however servicenow still has provided another feature that is process automation which is specifically for process owners but the concept is still same what we have in flow designer so i hope you like this video so please subscribe to my channel like the video and share my videos thank you and have a great day

View original source

https://www.youtube.com/watch?v=8l9T2f4u3qs