Automatically Label Visual Task Board Cards in ServiceNow
[Music] thank you hey everyone it's Justin thank you for watching and welcome to my house that's Justin's house in this video I want to show you how to automatically tag your visual task board cards with a label or a tag in servicenow a user asked me this question you can see it up here right behind me on the screen how to automatically add a high priority label to a priority One incident slash task now I'm going to show you two use cases I'm going to show you what I did to see if this even worked because I wasn't even sure I could do it and then we're going to build that particular use case together so you all can go and recreate this if you want on your own this is my visual task board it's how I keep track of all my content that I'm creating for you guys and I've already set one up so it'll automatically tag and you can see my tags here at the top I've got podcast servicenow run gardening tattoos others and low priority so I set up one that would automatically create or automatically associate a podcast tag a servicenow tag a run this tag and a gardening tag with only a three-step workflow let's try it out here real quick let's go ahead and add a card to pending and we'll make sure we include in the description of this utterly Allison [Music] podcast test and literally what my flow is going to do is it's going to my decision table actually it's going to check to see if the orderly is inside the short description for that one so I'm going to go ahead and save that uh oop I'm having this spelling there and we'll submit and that should create a task on my board you can see it there and if I scroll down you can see it automatically already got its label for uh utterly awesome actually the label is just for podcast it's the red one here and if I filter now we can see there's my test One automatically with that label if I had done something different like just owl some owl Zone podcast test it's not going to create that tag it's looking for the word utterly and it won't go ahead and auto tag it so this is working exactly how that user requested and let me show you how I did it first of all I have a flow the flow is triggered off the visual task board card table that's vtb underscore card and I did a filter because I didn't want all my tasks or my taskbars triggering on this I said where the task content type is content task so I have a special table in my app called content task and so I just basically say hey go look at the task type and make sure it's one of my tasks not something the system is using oh and I only want this to run one time I don't need this to run over and over again once that's done I'm going to make a decision I'm going to decide the appropriate tag that I want applied to that task on the visual task board so I'm going to use a decision table and service now if you haven't checked these out you've got to check out the sentence tables there life changing and all I'm passing is what triggered this workflow or this flow in the first place and that's the content task or the task record so I'm passing that to a decision table let's look at the decision table we're saying hey pass me a Content task and we're going to refer to Justin's custom table and if that content task has the word Garden utterly run or ssh in the title it's automatically going to apply a label gardening podcast runs or serviced now so it's going to return the appropriate label just depending on which one of these matches and the way I've got it set up it's going to go on first match so if we scroll down here it's first decision matches and it'll go ahead and make a decision about which label then all that's left to do is create an entry record in the table label underscore entry and when we create something in that table we need to set a new a few Fields they're going to show up here in a second and those fields are the target table the table the key which is going to be the sys ID of the rec occurred in that table it's what triggered this flow we're going to give it a we're going to give it the label to actually associate with it that's the tag and service now or the label and then I'm going to give it a title this is just I noticed what everything else in the system was using so I try to mimic that which was visual task board card created Dash and then the date time and I use the start date time from this flow so if you look at the trigger here we've got Run start date time here at the top that's what I actually used for the date time and then the target the label Target this is just text visual task for card right so that is as simple as it took all it took to make that happen I want to do the one for incident now like that user asked for so let's go ahead and do it auto tag incident and we'll wait for my application to load this should put it in my Justin's house application good it did I'll go ahead and hit submit and we're going to have it trigger off of the incident oh no I'm sorry the visual taskbar table but we're going to filter where that task is an incident so we're going to do created or updated we're going to select the table vtv underscore whoops dtb underscore card there we go visual task board card and we're going to add some filters so I'm going to do uh search for task and then I want that field just like I did in my previous one for task type so I'll scroll down scroll back up because I scrolled too far there we go task type and we're going to do incident lots of different tasks in service now this person just asked for high priority incident I'm actually going to two two high priority and low priority but that's it we're going to say visual task board was created or visual task for card was added to a board and the task type is incident you may want to add other filters there and again we're going to only run once so we'll click on done there and then we need to make make a decision so we're going to do flow logic make a decision but we don't have a decision for that so we'll say decide appropriate incident tag and then we are going to hit this plus sign to create a new decision table that's that easy we don't have to have it ready ahead of time we're going to do it right here live in front of you if you remember while that's loading up our format is we have an input we have we're checking for something in this case my case I was doing short description for the incident we're going to check the priority and then we have the label that we're going to pass back so let's go here we're going to give it a name decide incident tag and we'll create and continue I'm using the words tag and label intermittently but let's go ahead and add an input and we'll say we'll call this the incident and this is going to be a reference to an incident record and we'll just pick the incident table if this happens to you just be patient click the X type it in I it might happen again click the X Type in an N might happen again if it doesn't type in a c just wait for that search it's a little kind of like a bug for these fields and then so that's the incident table we're going to make it mandatory that's it now we got our input done let's go ahead and add a condition column we're going to call this one criticality we'll just label it that there our input is going to be the incident record and instead of referencing the record we're going to evaluate a field so let's go ahead and pick the field there and I believe it is priority um priority there we go priority at the choice and there we go default operator is going to be is click done and that's it so if that priority is critical we're going to add we're gonna pass the label or the tag for critical so let's go ahead and do that this is going to be uh label is going to be the column and then the result type is going to be a reference to a tag record which is in the uh label table I believe it's called let's goodness there we go l I think it actually might be tagged t a g there we go tag and the the name of it is called label but the the description of this tag so it's just a servicenow Nuance there so we got that and then we're going to go ahead and select I think it is high priority yep high priority there we go done so that's that case but I wanted to show you the power of these decision tables let's go ahead and add another Choice there because I think pretty sure low priority is one of them too so let's go ahead and pick low click OK and then we'll add the label low priority there we go so that's it for my decision table I'm gonna go ahead and save that everything is created and if that incident is critical it's going to apply high priority if that incident is low it's going to probably apply a low priority label or tag to the task or to the card on the visual task board so while that's saving I'm going to hop back over here to flow designer and uh actually we actually need that to save okay that's my old one that one is still saving we need that to save so that I can pick that decision table in that action in a flow designer in order for it to work all right everything's saved so let's hop back over to flow designer and we should be able to pick on that pick that one we'll just say decide incident tag there it is that's the one I made and I am not going to use branches you can see them right there use branches I'm going to turn this off we don't need branches for this one but we do need to pass the incident record remember the incident record is what triggered this workflow so all we have to do is click here click here to the visual task board record and then down here there's going to be a task record that task record is going to be our incident record so click done and it looks like my branching is still there I thought I'd turn that off so let's go ahead turn off use branches and now my branches are gone all right we decided the appropriate instant tag and we're going to get back an incident tag so next thing we need to do is we need to create a record in the label entry table that's the table where the association between a tag and a record on a visual task board is done so we'll just search for a label underscore entry and there it is at least that's name the same and then we're going to go ahead and do those field values and I don't remember what I did so I'm going to cut back over here and make sure we did the same thing so table table key label title I can remember that table scroll down and then table key and then we did I did label and then I think it was Target let's look at their table table key label and title that's what I did the target was populated for out of the box records using a URL and I don't know how they did that so for the table there we can actually pick that table record from this one right here so we're going to associate the visual task board table that's what triggered our flow the table key that's the sys ID of the record that triggered the flow so let's go over here to visual task board and we'll pick sysid so that's we want to do that to the visual task board card sysid and for that table the label we actually got as part of our decisions we just go to make a decision it has a record and one of the things is a label record so we're going to pick the label record there and then for the title I did visual let's see visual task board card created space Dash space and then we did the date so if I go to my picker here I'm going to go to the trigger and they're the Run start date time and now I have this set up just like my other one so that's it two actions one trigger We're Gonna Save and I'm gonna be brave and activate this afterward and we're going to test this out together by creating an incident on a freeform visual task board once I confirm that those labels exist so while that's doing that let's go ahead and go to visual task boards and we're going to create one from scratch freeform means it's just not going to Auto populate I'm just doing that for demo purposes we'll do a freeform board and one of the things I might add on here is an interaction I can't add an incident to a freeform board so um yes I can let's go here um we'll go to we're going to save this board Justin's demo board for YouTube and that should save that and I should be able to come back to that now so let's go over to the incident table now and let's go find a critical incident and so oh you know what we want to do first before I do that sorry to go back and forth on you um let's go make sure that those labels exist so we had high priority and low priority okay so they both exist so we need to find a critical and a low incident so let's go to incident.list and that should take us to all the list of incidents and we'll go ahead and filter to save us some time we'll go priority is one of critical or low whoops low or critical and then we'll run that and now I should only have low and critical wins let's make sure we do a new one so this is new and it's critical so we're going to add this to a visual task board and I should be able to pick the one I just made there we go Justin's demo for YouTube and then I want a little one that's uh not close um that's okay if it's closed it doesn't matter let's go ahead IBM is out of space we're going to add that to the visual task board and there we go now that flow was activating in the background so technically when I added those to the visual task board that should be it they should be done so let's go back to our history then and click on the demo board and uh they should be labeled okay so IBM is out of space did get automatically labeled it got labeled with the low priority system is down interestingly did not get automatically labeled let me go ahead and hit refresh here make sure that it's just not still running that flow in the background those flows run asynchronously yeah so it didn't run for some reason let's take a look at this incident and make sure that it's critical and then I want to make sure I chose oh if you saw when I was picking the fields there so the priority is critical there when I was picking those fields there there was two high priorities and two low priorities on that it picked the wrong high priority so let's go see if that's what I did wrong or did incorrectly we'll go ahead and close this one we don't need it anymore and let's choose the other high priority so I'll just backspace that and we'll choose the second one and we'll click out of there and we'll click save and what we need to do to get that flow to trigger again hopefully is this changed something about this critical incident I'm just going to do well I need to change something about the card so let's just change it to doing and that should change the state I think it should run that flow this definitely changes the state um and then let's let's put another label on there let's call that an idea just for fun and I'm going to refresh this and see if it gets labeled with the critical label from that flow no critical label yet still got my idea label and to troubleshoot this we'll just go look at the executions and maybe erroring out so let's go look and see if there's an error all right everybody I'm going to cut this a little short basically I off screen I looked at both the the flow got triggered that didn't get re-triggered and that actually was intentional my part I didn't want this firing over and over and over again whenever an internet moved around on a board so not to prize so since I changed that high priority let's go back to the incident table that we are on there and find another high priority one now that I've changed which high priority tag that I grabbed so we're going to go to the list of incidents and we're going to look for um we're gonna look for high priority into this all right here we are on the list of high priority incidents that's the one I chose before so let's go down and grab one of the other ones Oracle application servers I'm just going to right click add to visual task board let me try that one more time and we should get the prompt for which Taps task board there we go and let's head back to our task board and I'm going to hope that this actually works and um let's see request for help Oracle application is high priority yes so it got automatically labeled with high priority so I'm just going to filter on high priority work so I just basically chose the wrong tag in that first example and the the window that was showing the executions was taking forever to load so I just uh off camera I went and looked and solved it it did it but it didn't rerun so and that was intentional I didn't want these to rerun over and over again so to summarize you can definitely automatically add tags or labels to your cards on a visual task board with a simple flow here in flow designer two steps one trigger make sure you do the proper filtering make sure you do any proper logic of thinking about how much how often people will add things to visual task board or moves around on a task board because you don't want to cause performance issues and you don't want to cause conflicts in the system as you're creating these different records on the tables but that's how easy it was you got to learn flow designer visual task force decision tables and all that stuff in this one video I hope you found this video helpful if you did please like Please Subscribe or share it with somebody who you think might be interested in automating labels on their visual task board and until next time don't forget to always be learning [Music] thank you [Music]
https://www.youtube.com/watch?v=2T9fWS3q5zU