ServiceNow Assignment Rules Demystified | Boosting ServiceNow Productivity with Assignment Rules
[Music] hello and welcome back to another exciting episode on Southeast now okay in today's tutorial we will be we'll talk about assignment rules and servicenow and how they can save your work okay so what is assignment rule in service now assignment rules are we to automatically assign work items such as incident or task to the right person or group imagine you are a superhero or with a superpower to automatically assign task to the right person or group that's what a cement will do in service now then you must be thinking what are the benefits of it right okay now let's talk about the benefits of assignment rule the first and the foremost thing is efficiency with assignment rule tasks can be automatically assigned to the right person or group which says times and effort this means you can spend more time sipping coffee and less time manually assigning tasks right the second thing is consistency assignment rules ensure that the Tasker assign consistent consistently based on predefined criteria so you don't have to worry about assigning a task to the wrong person or wrong group okay by mistake the third one is accountability with assignment rules you can track who is responsible for a particular task with increase accountability so if someone goes something goes wrong you can you know who to blame right okay so this is all about service now assignment root and now let's jump into the demo and we'll see how exactly it works practically why I'm creating this tutorial first of all let's understand these things out so as I'm working with some organization right okay where we get a tons of requirement around the assignment assignment rules right so whenever this kind of requirement comes for example if we came we came up with the requirement that if the category is Hardware then you have to assign this particular task to a certain group this is a behavior we want to implement okay so the developers first and foremost jump into line script or business rules okay and creates unwanted customization on the platform so what I want instead of moving to the customization option first see if there are some configuration provided by service now okay on a system on a platform debit which you can use for example assignment root is one of the such thing right you don't have to write business rule or client script to get this job done you can do it via assignment rule with ease the deficiency right so let's get started so in order to create an assignment rule what do you have to just go to this of filter Navigator and search for assignment and under system policy the rules model you will have assignment right so this is assignment rules so these are all the out of the box rule present on the system so let's create one role on the incident table only okay so what I will do I will simply do in C instant why I always land up to incident right a lot of people have this question but I also have I also share the same question right so we have incident open so for an instance let's create a new incident okay and we want to define a criteria that whenever a category is Hardware okay and subcategory is for an instance CPU or disk okay then we want to assign it to the database group so this is what we have to do okay whenever the category is Hardware the subcategories task and configuration item for example let's take do your computers no do we have what we have CPU or let's make Hardware should be there the configuration item no let's say computers okay if we have computers okay then we have class as computer then we have to assign it to the database group now you don't have to write client frame of business because the same what you can do you can simply jump on to the assignment rule create a new one yeah and you can give it a name or we can give it a name as data base assignment and you can create it on any table okay any table task external table you can insert a problem change anything you can do it so you can applies to incident table it got selected and now you can simply give category is what this decided database right let's consider database and subcategory subcategory is for an instance disk okay then we want to assign it to which group database right and let's take configuration item or configuration item we want class right so we can do show related field in that we can go for configuration item fields and in that we have we want plus right classes is computers computers computers computers computers I should have choose something but okay so when our categories this subcategory is disk and class is computer we have to assign it to the database done you don't have to write a single line of code for this okay and you can simply save it on so if I go back to the incident form if I reload it out just to vanish all the values if it allows me to do so okay I will reload the form leave and now if I select color I will give evil tutor or let's take anything okay system administrator only for now category I will say select database subcategory I will select as what we selected it was data software I guess let me check once because I think there are some rules applied over you so with database what's coming so database and subcategory is let's take db2 I will change the database and I will change the to db2 and I will save it up so why it's showing like that because we have a dependency of category of subcategory based on category right so it has nothing to do with this so and I will give test assignment rule and it will not get populated on on change right okay we have to save it out so if I save this out now it should fill out the assignment group so it worked no why no because configuration item we missed right so we have to select some configuration item which is a flash computer so we'll select that and if I save this now the assignment group should get populated perfect so in this way you can use assignment group okay to assign certain things to certain group or to the assigned to also okay for instance you have the you have the option to select the users also okay if you want to assign it to a certain user out now there is one more thing called Script right now you're mostly thinking why script so consider scenario you have the same kind of logic right okay so for instance you have if you have configuration out of a then you have to assign it to group a if you have configuration at a B then you have to assign to group b c c and so on right so will you create if there are thousand configuration items so will you create 1000 uh thousand uh semi note for it no right that's where the script comes into existence right so for instance uh if you want to play around the same rights if you want to play around if if statement or switch you can Define anything out right if you have multiple use cases multiple iterations or you can say permutation combinations for assignment truth you can Define it in this particular script so let's create one more example okay so I will um go back so I will go to assignment oh my bad so we'll again go back to assignment assignment okay and let's create one more and this time what we want to do if a configuration item is what we can say okay let's try something out what we can do to do urgency okay perfect so let's make a condition if the impact is high that urgency is high okay then or we can say in simple words we can say if the priority is critical then we have to assign it to the lazy group because we want the lazy people to work on right so we will assign it to the lazy group okay lazy group else we will as we will assign it to some different group okay just one instance so let's do that impact High urgency let's add all the attributes ideally you can add priority only but okay and we will give it name as punish DC Group we don't want lazy people right right Financial is the group we can make it a criteria like impact hi sorry why it's happening with me this time I have this keyboard only impact is hi and urgency is hi then we want we're not to assign to this time okay given over here so what you have to do if if you have to just use basic JavaScript current dot get value and of get value of what is the backend name of impact WCC and equal to equal to something and we'll add the same thing can't dot get value this is for impact an agency okay I don't remember the value then we have to assign it to we can do current or we can simply copy it out right current dot assignment group will not go with display value because then it can create inconsistency right because we may change the name of the group at the latter point of time right and it will disturb the flow so we don't want this so if we get current dot assignment group and I will make it proper I dot set value this is wrong okay don't go like this make it crop set value of assignment group will be we have to pass the society you can also store the society into certain property and use but I will not do it at this particular point of time and the same thing we will do else current dot assignment group equal to this so let's get the value first is impact and urgency so impact is one second name is impact how is coming I am using SN utils okay I think most of the people will be using a Singleton so impact and its urgency right and one one so let's do that impact is one and then we have urgency is impact and urgency is one then what we have to do we have to assign it to this particular group right so we will open this record in new tab and we will copy this is ID for the same okay and we'll come over here and we will put it as this semicolon and this thing else if it's not in fact an urgency is not high then let's assign it to some different group so maybe service desk I think there's a group called Services right Okay so we will open the record for the scene this card and we'll do we will get the society for it and we'll hard code it out perfect right so let's so what we have done if current dot impact is high and urgency High then we are assigning to the lazy group because we want to punish them out else we will assign it to the service desk right so I will just save this out and then we will go to uh incident I will just do let's see drag Dot come on sorry and now let's make it system administrator only I will make in fact High urgency hi I will give finish meant for lazy group and if I save this out then the semi group should get populated too to the DC Group right is taking some time policy people system also became lazy right it should not take this much of time try that dot list so you can see the assignment group got popular lazy group when the impact is high and agencies let's try to change it out okay so if I make it medium so it not works only on insertion it works on update also so if I save this out now and I will give it test if I save this out if it will take some time I don't know it didn't get changed oh it works on in session this isn't learning from yours so this is how it works okay so hope you like this particular tutorial out always try to go with configuration rather than going for customization wherever it's possible okay uh this is all for today's tutorial if you liked it out please subscribe to my channel so that you will get notified when my upcoming videos till then stay safe stay happy and have a nice day thank you
https://www.youtube.com/watch?v=xUKWyXNLSwA