logo

NJP

ServiceNow Notification | ServiceNow Notification triggers | ServiceNow notification trigger demo

Import · Jan 26, 2022 · video

[Music] hi all and welcome back so in today's tutorial we'll be looking on one more topic in service now okay which is notifications we'll be looking into how we can create a notification and then we will see how we can trigger the notification what are the different ways to trigger the notifications out okay so let's get started okay as you can see on my screen there is a personal instance on okay and whenever you start working on the new instance okay and uh you want to work on the email side so first thing you have to take care is like you have to enable the property so that you can send and receive the emails so let's do that so you can simply type for email properties okay and under system properties okay system properties application there's a module called email properties you can click on that okay and as soon as you click on that you get this configuration there are more a lot of properties okay on top of it you can simply enable enable sending email sending enable email receiving enables okay so you can simply check both the check boxes and you can save it out so now you are enabled to send and receive the notification on this particular instance okay now let's get started so for today's tutorial okay let's create our use case okay that we will go to we'll find some use case on incident table okay incident incident.2 okay and the first use case what we'll be doing is like whenever the priority of an incident changes okay you know the priority right the priority of zero changes to critical okay we'll be sending a notification to assign to person uh and assignment group okay we'll be sending notification to those these two people okay so how you can do that so for three let's first create a notification and we will see the first way of trigger uh notification trigger so you can simply type for notification okay notification and under system notification application we have emails okay under emails we have notification so you can click on notifications out okay and now you can create a new notification okay now here you can give the notification name so i will give note 5 i will give notify priority okay and you have to select the table now okay so i'll click on the table it's taking some time or it's taking some time okay and now we will select the incident table because we want to create a notification incident table now if you want you can categorize the incident but by default will be uncategorized okay and then you have application active allowances we will keep it as is okay and then you can go to who there are three times when to send who will receive and what it will contain the most prominent question when is ask um when you want to create a notification so when to say so as we decided that we want to send the notification when a record is getting created with a higher priority incident or critical priority critical incident or when someone changed the priority to critical that time also we want to send so you can do send when okay and there are three options away event is fire triggered okay so we will look for the second option also but for now we will go for record incident update so i will check the insert and update because we want to validate it out on the board the criteria and then we will give the condition what the condition is priority party uh changes to changes to i will give critical okay perfect okay now we will go to who will receive now who will receive you have to give this answer so we have user we have group and we have user group tabs okay so you can simply click on [Music] user tab okay i don't want to send the notification to myself okay so we will give it to fields only let's let's not give it to the user okay we will not specify the user we'll give it to the fields okay so i will give to assignment assigned to an assignment group these two fields okay this to be group and person we will be sending the notification i will lock it out done if you want to provide some definite user or email id okay which is not a part of that record then you can use user and group okay now you can go to what it will contain so here you can define uh email template if you want to define any template that's fine if you don't want to eat different email template then you can provide subject and body for the same so i'll give priority one incident god created okay created and i will give in in body also we will give the same hi comma paste priority one including all created and then we will provide some information so we will provide the information like you can click on the field this is a quick fix a quick matrix over there which you can use so you can get the assignment group i will give assign to what i will what else i will give do we have number okay instead number that's mandatory okay then we have short description i think that's enough okay that's all and then we can save it out okay we can save it now now we have saved the notification okay we have defined everything and we have saved the notification now let's try and test it out okay so what we'll do we will go to incident record okay so dots list let's try to find some existing record only instead of creating a new one and we'll go to this record because this is new okay and now i will change this to high impact high urgency so that the priority will change to critical as soon as i save it out okay it will ask me for some work notes i will write some work notes as soon as i save it out it should trigger the notification now i am in the hope that it it must have create trigger the notification how we can check that so you can again come to the filter navigator and you can type for you can check for emails okay i typed emails okay and in system log if you go now you can see ideally you should see notification what is the subject we have given oh i lost that notification out let's take this out and what was the condition i will just cross verify the condition once priority changes to critical perfect okay so i'll just copy this notification out sorry the subject out where is the subject we'll go to image we'll paste the subject and let's see if something got triggered for this why you are not able to see okay i will show you why because it's it's not a process you can say okay so you can go to outbox okay so under system mailbox you have send out box receive right so i'll go to the outbox um i i'm not able to see the notification over here also let's see in this case okay this is good example okay so you can do one thing whenever you you see okay whether that particular incident oh it doesn't have assignment group and assigned to an assignment group only okay perfect okay i am bad so we will give dictated take and save okay it should have something right now what we'll do we will change the impact to high urgency to high and we will give some assignment group what what assignment group i should give some application development and here i will give a keep more stock okay again it will ask me for none now it should trigger the notification because in the first scenario whom it will trigger the notification there was no assigned to or no assignment group now you can go to emails you can it will it has came right you can see this merely has just arrived so you can click on that you can have multiple means all the i've shown you the emails emails outlook sent everything is same okay it's routing to cc multiple only just the filtration is different okay so you can manage it on the way you want okay so now you can see notification got trigger the subject was priority one incident got created okay and now whom it got sent to so it got sent to where is keep it should have keywords right what is the video personal okay most dark okay what's the email idea for keep my stuck it's achieved.most talk so it got sent to the people from assignment group and all okay if you want to preview the email you can do that also it by clicking on this preview email i can it will show how the exactly the uh the incident look like okay the user will have the option to unsubscribe to the notification also and this you can call a watermark or you can call as a primary identifier for their particular notification so that if you reply to this notification or if you forward this notification the system will understand which which is it it will be easy to understand for the system to trace down the notification okay what notification belongs to okay so this is all when we want to trigger the notification from from just we have given the validation like record inserted or updated now let's move to the another one we will give when event is fired okay so when event is fired is like it's not the scenario right key every time when something is happening on a record then only you want to trigger the notification there may be scenarios where we want to trigger the notification some script scenarios right in that terms we will we will use the event so what it does you trigger an event okay from a script okay and that screen in returns trigger and notification to the user whatever you desire your desired user okay so i'll show you one example okay so you can go first to event registry click on inventories before starting with this event on notification you have to just create the event history click on new okay and we'll create a event i will give it name as techno monk no monk event okay you can define the table if you want i will give incident okay fired by this is just a string field okay just to understand okay just to trace it out from where this incidents are getting triggered so we'll be triggering it from business rule okay description event not mandatory but i like to give something okay so i will i will just copy this name out also okay and i will save this out now let's look for the another scenario so we want to trigger one more notification okay one more notification when subcategory is selected okay whenever incident is attached to some subcategory we will send notification to caller let's see let's take caller okay and assign to okay this two people a caller and some random email id i will give okay so how you can do that i will simply i will duplicate the tab out you can simply configure because you will be triggering the notification from business rule you can do it from anywhere from scripting from all servers from business rule from script action anywhere from workflows also so i will go to configure business rule okay we'll click on new and we'll get a name as notify incident notify incident okay and now what i will be doing first of all i will change the notification so it's i will keep the same notification i will change the content out for this okay so i will change it to event is fired okay from record inserter update and we will give the event name what we have given so it's technomong something like let's take no longer oh i have to refresh the page out and let's create a new new notification on the right y2 y2 with the same okay notifications i will click new i will close this one leave i don't care and now here we'll create a new notification we'll give it a name as event notification event notification on which table again on incident table incident table okay i will keep his own categories now send when instead of recording certain update now we'll see trigger based on the event so when event is fire now it's asking which event you are talking about so you can simply go to techno more mom was the ttt [Music] are you able to find yeah i saw somewhere i saw somewhere techno monk event perfect okay now who will receive uh we will will give it will pass it to one configuration we'll give from here and one will pass from the event itself so i will send the notification to assign to okay done that's the only thing i want to do what it will contain okay so we will be giving like sub category got now you can see i didn't give the condition okay because i will formulate this condition in the business rule okay and we will give hi sub hi sub category assign to incident with incident it will ask okay so i will give incident number what is that incident where is the number number number number number then we will give sub category also some additional information this number then short description then what sub category sub category if people want to know the category we should give that also perfect okay i think that's enough for this notification i'll save it out now we created a new notification now how to trigger an event okay so first of all we'll go to business rule i click on the advanced view now when you want to send the notification you want to do after after the uh sub category assigned we want to send the movie so we will get insert update okay and we'll give the criteria sub category first of all it should be filled right as there's no use of that so we'll give subcategory not is not empty is not empty condition oh where is this is strange i'm not getting anywhere okay by default it has some value i think by default it's none that's why it's not giving that value so we will not give this condition and we give subcategory is [Music] what should i give changes and sub category change it let's give changes if if it's changing then only will send the notification okay in actions we will give nothing in advance script we will just trigger the event so what the event is so for even there is a context there is syntax as you can see on the document okay so it has a syntax called gs dot event queue and it carries four attribute the first is like which event you want to trigger the second one is a glide record of the current object you can call consider is a current incident the third attribute is like param1 okay it's like you can pass if you want to pass you can pass if you don't want to pass you can pass it as empty string so i prefer it for passing some values which are used in notification or values of whom to send kind of thing right and the fourth is also the same parameter right so we'll be doing the same i will be giving going to where is that the business book i will simply write here dot event queue okay and the first thing we will be giving the event name the second will be client records i will give current the third will be some random so for this i will give my email id okay so i will give technology and thread sheeman okay and the fourth one i will just pass it as empty string i think that informat this information is more than enough for me okay in order to try that i that's it i'm not passing anything else okay in the script so save it out okay and now as we want to trigger the notification to the attribute which we passed into pattern one also so you have to again go to the notification is that notification notify that i lost it i guess so you can go back to the notifications with on the history notify priority not this one okay i didn't say that or what we will go to notifications let's sort by created created okay two notification got created today yeah even notification and now as you want to send the notification to the param one also you have to do some adjustment in the script in the notification so you can go to ventus who will receive and you can simply have this check box right event panel one do you want to send the notification to even paramount you want to send the reviews to event pam2 so yes we want to send the notification to even paramount even pam2 we will not define because it's empty only right so i will save it out and then if you let's try it out so i will go back to the incident okay i'll select some subcategory first so i'll select the sub category as antivirus okay and then we'll change it out so because it's the on change of sub category so now the incident the subcategories um assigned to antivirus if you change it to email i'll save it up it should trigger the notification so before the notification get triggered let's first understand whether i even got triggered or not right then only the notification will get triggered so in to verify that you can go to event logs event logs okay and over here if i sort by created okay so you can see the event got triggered called technomoc event and it has one panel the one we passed okay technomog uh at the gmail.com param2 is empty and table is insane so our event got successfully triggered now you can again go back to emails i will go to emails and now i can see two notification because we change the subcategory twice right so to notification got trigger i'll open this one open the record and see if it went through so notification got triggered okay it it got triggered to techno mark okay and if you want to preview the notification you can preview the notification again by clicking on the preview emails yeah this sounds perfect so this is how you can create the notification and trigger the notification via record insert update or via an event script okay so this is all for today's tutorial hope you like this video please like follow subscribe and drop a comment because i will be creating videos based on your comment only till then thank you and have a nice day thank you you

View original source

https://www.youtube.com/watch?v=HM_-EDgWa5U