ServiceNow Guide for Developers | Create Catalog Item | Automate Approval Workflow

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
[Music] hey guys this is god of welcome to SAS word service now this session is about a service now guide for developer we are going to talk about a use case in which if your customer if your client is asking for an approval workflow so for example if client has a form some of the fields as of now they're working manually they are sending some data some some of the data to a team and that team is checking the email checking all the fields now as per the fleece they have this check an excel sheet where all the approvers are mentioned once the check the approver they mark an email to that team or that person that person approves rejects or sometimes they have to remind that person every time make is not everyone will respond to all the emails so these are all the manual actions once they will approve or reject so maybe they approve it then again it goes to yours you you check the task that what kind of tasks we have to do then you provide that access now this is the oral workflow which one of the team is doing manually now how can we automate this complete workflow in ServiceNow and automate this workflow so in this video I am going to create a catalog item and I will have some approval workflow in in it so that you can process this request to that particular team so let's take a look how exactly you can do that this is my personal developer instance now in order to fulfill this requirement now as a developer you have to create a catalog item first so let's go to a service catalog I am in Service Catalog I will go to maintain items I will create a new catalog item and I will give it a name maybe it's called demo approval approval item I can add it to in a catalog if I want if I have a catalog in in my system so maybe I selected technical catalog I can select a category as well so necessary services it's kind of for services right availability it would be dekstop or mobile that I can do item details now what kind of item detail it is so maybe I would say it says finance access request it can be any maybe there is a finance portal so finance I would say portal at finance portal access request if you want to describe something you can describe it here but as of now I will just copy here and it is in description in order to make it searchable you can put some meta tags here so that it can be searched for better searching you can put here then you have process engine now what kind of process engine you want to use do you want to use flow designer now flow designer is a new functionality I hope you guys are aware if you're not that I can also post a new session on flow designer but it's a new functionality which has been developed by ServiceNow it it is out of the box and it is it it gives you I would say more flexibility you don't have to do much of coding outside it's it's really good it's basically for the workflow all you can do lot of things it is similar to the workflow we have but it it's quite I would say easy to develop even business can develop that that's what I can say with flow designer but you can still do scripting in flow designer so but in this particular video we will utilize just workflow I can create another video in which we will utilize flow designer as well but in this video we are going to just talk about workflow here we will select the workflow which I am NOT going to create right now first I will create the catalog item then we will create the workflow and tag that workflow here this is the execution plan which will go default picture do you want to put some picture here for example icon or you want to put a big picture it's it's up to you if you have a finance portal picture you can put it right here so that it will be easy to for the users it's just as part of the user experience I would say then you have mobile what kind of picture you want to show on mobile so it would be similar to desktop or it would be different you can show it right here pricing if it needs any pricing you can mention here if not that's okay then we have portal settings this is something like request method is order or request or it's submit what kind of request method it would be I would say we can put it as submit it says hide Add to Cart okay so we will not have Add to Cart we will hide the quantity because its approval it doesn't need any kind of quantity or something right it doesn't need a delivery time hide add to watch list I think we can hide it hide attachment we are not going to I think mandatory attachment we don't have to put the mandatory attachment as well but this is what we can do okay now I will first save this and just to I think as of now the name we mentioned demo approval item but what I would do I think we can put finance portal requests this will be visible to the user so that they can know okay this is the place where I can put the request for finance portal request or maybe I would say access request great so I will save it again now as part of the requirement you will be getting some of the fields which your business needs or for the end users so that they can fill those details and just submit the form that's what they do so in that case I will create some variable and variable sets now you must be knowing the difference variables are the each fields are the forms but variable sets it's something which you want to use everywhere it's kind of set of the variables so in that case I would like to create variables set that should be there on every form yes so if I will select edit let me see if we have something like that it is showing mobile standard questions comments okay I will cancel it for now and I will create a variable set and this variable set would be requested for so it's a single row variable set or it's multiple row variable set that's what you can decide so ideally it would be single row variable set so variable set new record is who is this or we can say is this request for you now you can put this as a first question that is this request for you and all this is the name of the who is this or I think we will put the name as request Ted for we will put this name and we will also change it request requested underscore for it is one column wide or two column alternate sites I think we will put this because you will understand that why we have this I will click here save now I can create variable in it so I will click on variables first variable I will put that should be let's go with the multiple choice yes we can go with I think we'll go with yes or no and this yes or no I will put is this request for you name automatically is showing I can put 10 as order this is definitely mandatory so you have to select default value we will always select yes so even if you don't put mandatory it is still showing you so that's let's skip and I'm going to save this and I will click on update this is my first variable now I would go for second variable now if I select no then we have to have another variable right where I can select it so that means there have to be reference and name should be who is this request for you can select it here I will mention the cysts user table we will keep all the users if you want to keep active users you can also do that so maybe you'll put active for just this particular form maybe or there might be some other items where you might request for non active users as well so let's keep it for everyone my thing this is not honored in two column container but this is okay for now default value we don't want it should be visible I think everywhere right that's what we want and I will put it now we will not make it mandatory now when it will be mandatory I will show you so this is the question and I will click on submit so we are done now we have only created two variables but as I mentioned that second one is still not mandatory so what if if I click on no and I still need some data right that who is this request for then in that case I have to write a UI policy and that you a policy would be if I go here set request for mandatory mandatory so condition is that if is this request for you is no then you have to work on that and it should be applied everywhere it should be applying catalog to us request items and then you have fairs I save this now I will put the catalog you a policy action but if it is no then what exactly should do so if is this request for you is no then who is this request for will become mandatory and visible that is what we have and I will click on submit and I will show you how exactly it is working so we have created UI policy for this variable set now let's go to our item again so we have this finance portal access request you must have seen that I did not create any update set but when you are developing make sure you are capturing it in update sets because this is I'm just using it for demo so make sure if you want to push it as part of your development make sure you're capturing in your update set now variable set is already tagged here and its order is hundred now let's let's take a look if it is showing on the form or not this is the button you can use let's try it if I click this button right you can see yes is automatically populated and what it says yes okay I think we have to select the right word but that is automatically populated but if I select no this is automatically and it is also mandatory I cannot submit this form because this is mandatory so let me go back to my item now I'm going to create some of the variables in order to show you this form now it can be asked for your requirement from the business it can be multiple fields but I am just utilizing two or three fields just to show you the example of this workflow that's it so in that case I'm going to create some of the variables on the form now so starting with variables and I am going to create variables so we know who is the requester for this we know that so in that case single line text what else you want maybe this approval is dependent on the approval approval location maybe so we will we will have a reference field select the location of access so you're selecting the location of access this should be your location table that should be a CMN location it will show me all the locations I have so I can just like map those locations as part of the workflow and it would ask for the rules so I am done I will this I will just mention the order is 200 this is definitely mandatory you have to put because else you workflow would not work so once you are developing your system and you're developing your catalog item you have to see what all things are really men greatly for the workflow and you have to make them mandatory so I am done with this I am just clicking on submit so our one item is created next I would say just comments comments we will put as non-mandatory because it is something if user wants to fill in so we have you not force user so to fill the comments so maybe we will put it 300 and it says any already we will put justification let's let's put it mandatory for now because we have changed the context now it is justification so I'm making it mandatory and I am clicking on submit so we have created this variable as well so now we have two variables and one variable set and if I click on try it okay I can see that it is select the location of access and I can put the justification now we don't want these things right that's what we talked about but it is still showing me for that hide Add to Cart quest hi delivery time if it is still showing then there is a place there's a property where you can change it I think this particular thing was introduced recently it was not there but we are still getting order now and everything but you can because fix it so I go my catalog item and we have to fix that yes/no again in our variable set so I will go to our variable set is this request for you so the default value we have here it should be capital yes and you will see now you will not get that extra yes so I go to my item open here and take a look if I click on try it yep now we have we don't have that extra yes if I click no I can select the user now as of now we have just created the form so it's not completed yet because once I will submit where it will go for approval that's what we need to know now for example you have their excellent sheet okay so if you want you can import it or if you want to import the data manually you can also do that but in order to go with this approval as part of the location now this kind of logic or or the functionality which you are looking for it totally depends on you whether you want to create a new table or whether you want to have or maybe tacked to the user table or maybe a location table it's up to you but it has to be it shouldn't stick to this one solution if you are adding any field on your location means it should be utilized with every kind of approval you have for the location so make sure you have to decide the architecture before creating these kind of things whether the table or creating a field on these black based tables you have so but then in this case I'm going to create a new table yes so I'm going to create a new table and this would say finance approval matrix now we are not we're not going to extend this table do you like to create module yes I think we would create a module under service catalog so it's a finance approval metrics now what kind of fields you would have so as you know we have to go with location so the first field would be location type would be definitely be reference and reference to what it's go to location second field would be approver so who is the approver here so maybe if in the future you might have multiple approvals so as of now you can still keep like approver one and I will again make it as reference because it will target to your user table and we have sis user so that's it because our approval is based on location only so we will keep this two fields location and approver one now I'm going to click on submit so we have created this table now let us put some data random data I will go to the list of this table I will create new racket selection I will do we have around 426 so I will go with a to see hundred South Charles and approval I will mention apple tutor submit so we have one record again second one it's just a demo so I will show you as per the table we have so I will just create two records so another may be for this one and the approval can be Abraham Lincoln and submit so now we have two records in this table if you want this is the table we have now so we are done with our catalog item we have created a table now we have to work on workflow that's the thing which will process this request so we will go to workflow editor we will type workflow you will get this workflow click on workflow editor if you open in a new tab this is what you have and we will click on new workflow we will give it a name as finance approval finance access approval table we will put request item I'm looking for a request item yes this is the one requested item so as you know as per the hierarchy we have request a quest item and then catalog tasks so we are going to create this workflow on request item that means once request item will be created this workflow will be triggered it will make it as a workflow driven stage order is computed automatically we are not going to make it you users but it is specified I'm going to click on submit once I am doing that now it is going to give me the pain the canvas where I can create the workflow I'm going to delete this I will put it right here now what exactly you want so once the workflow the item is being created for that particular item okay once once request item is created for that item what do you want so you just want to push the workflow right and then with the workflow you want to push the approval so what we will do in that case we will go for let's find approval so we have the approval user know how you will push the approver you can push the approver in this case we have to use scripting you can use users or these fields as well but we don't want to do that because we have to check set approver yeah we will go with scripting now how we will do that because we have to get the data from that table that who is the approver so if I come here and I type answer unser called you face and I do a Glade record the war gr equal to new blight record and I have this table with me and I'm going to put the table and I would put gr dot add query now which field we want to check the field you want to check is you underscore location that's a field we have in this table right so we will go for quiet for the location now what how exactly it will like go with the location so we will have current dot item dot location I hope this is this is the name of the item location variable we created I think we mentioned select the location for access right so it should be some different name we can check that let me show it to you we will exit the full screen and we will go for here we will check our catalog item you have to go to maintain item go here we will check the name so this is what we have yes this is the name of the variable I will copy this I will go to my workflow and that's it so current dot item dot select the location of access that's what we have so now I will put G r dot query if we just want F will not put G r dot next now we will put unser equal to unser dot push what exactly we are going to push we are going to push g r dot u underscore approver I think we can check that tables approval matrix and column name we have as you approver underscore one great so you have one and code so this will push the approver automatically so answer dot push gr dot u approver one that's it we will put wait for anyone to approve when anyone rejects rookies rejects the approval approval column is there's this and that's it that's it for now stage if you want to mentioned let's see request waiting for approval yeah you will click on submit this is done I'm putting it right here now if it's approved then we will go for approval action it will make it set to approved and we will make mock Tosca's approved and it says requests approved I'll go for submit I will put it right here but I will again copy this copy activity I got it right here because we have two things open this I will say set to reject it I will mark task as rejected and I will request stage will be request cancelled update so this would go here this would go here and if the action is approved then we will have a catalogue task then we will have a catalogue task send for fulfil mint and this stage is fulfillment private priority I will I can always keep as like to maybe task value from fulfillment group now which group you want to assign to I can select any girl for now so let's select mmm help desk and then we'll put provide access to user for Finance portal to the mentioned location now we can design this complete workflow with some additional features but that would require more scripting so I want to keep my video short but I will try my best if I can segregate some of the videos and show you the complete exact with the good features which I know I have developed myself and which has worked really great that I will show you but in this case we will just put as of now like this now variable and task what what variables you want to show on task so we want to show who is this request for that's the one you want to show select the location and if we have any justification I think yes we have this justification so I'm going to submit it this would be a sign now you can still play around that whether you want to once this task is done what exactly you want to do that out of the box service now is not giving you that opportunity so I will show you what are the things you have to do some customization before you create your catalog item or maybe you if you're going to implement service catalog in your organization so I will definitely show you what all those things but before that let me show you this approval first so I'm going to tag it to here and I'm going to make it end and this was also going to end or in this case I think you can do one thing that set value we can put some utilities here and you have set value so because now we have to make it as set as canceled so if I say request cancelled state as closed kept and I will put here and then I will end it now is just assigning the task as of now we're not doing anything that what happens when we are completing the catalog task that's what we are not doing it because that's a complete different workflow but I can I will definitely try to dis redesign that that how exactly you can provide like you can create a catalog item with good customer satisfaction with good end-user experience with notifications with some good UI that's what I can do but not in this session basically so we have completed this now you can just validate your workflow once everything is good no issues and now I am going to publish this so it's published finance access approval I will make it as a full screen again now we will go to our catalog right service catalog we have mint I'm sorry we have maintained items we go to Finance portal access and here if you remember we were in on process engine here you have to select your workflow so I selected it I'm going to click on save and now I'm going to try this so if I click on try this is giving me this options so is this request for you I would say yes for now and if I select the location let me select this location because we already have selected approval and I will put justification I want access as I am NUI new joinee said I will click on order now now once you click on order now it will create the request for you first under that request now it says waiting for approval request approved if I go here and if I go at the bottom it is showing the catalog tasks automatically and this is the item we have now it automatically got approved if you want to show the workflow you will see that it saves approved because it didn't find the value that is the reason it didn't find the value and that's the reason it just make it as approved but we can see that why exactly it happened so let me let me check why we got this error now the mistake which we did is if I remember let's go to workflow and I think we do it we have this workflow here I will check out and I do remember now what mistake I did if I go to approval user this is this mistake so this current dot item it should be current dot variables and then the name of the variable if I click on update go to publish and now if I go to my form again so baby maintain item I go to my portal I click on try it I select the location for the justification any justification and click on order now now you can see the difference now it is waiting for approval and it did not get approved automatically if I click here this is the catalog item I have and if I go at the bottom I have the approver same approver able to der now if I approve this if I click on approve it will automatically assign the catalog task you can see I go at the bottom yes it assigned the catalog tasks to assignment group which we mentioned on our workflow so there was little mistake I don't know if I'm doing the scripting after a long time for catalog item maybe but that's the reason I forgot but yes we have to mention current thought variables dot that variable name so this is how you create a catalog item for approval workflow so thanks for watching my video and have a great day
Info
Channel: SAASWITHSERVICENOW
Views: 31,735
Rating: 4.8857141 out of 5
Keywords: servicenow, servicenow guide for developers, catalog item, catalog, servicenow training, servicenow workflow, Automate Approval Workflow
Id: EPOsxq4O1dE
Channel Id: undefined
Length: 47min 1sec (2821 seconds)
Published: Wed May 01 2019
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.