logo

NJP

ServiceNow - Track a task's first human email response date/time and duration in Orlando

Import · May 23, 2020 · video

my name is Jason Miller founder of Aspen now solutions we're about to unlock the power service now I'd like to start off by thanking all 30 141 subscribers in over 80 countries globally if you believe in transferring knowledge to those who need it most please click Subscribe your user data will not be transferred to anyone outside of Aspen now without your consent hey everyone welcome back I think it's been a couple of weeks since I posted a video and I received a requirements that I've received several times in the past and I thought you know what if I'm receiving this requirement over and over by customers and chances are you are too and I thought this would be a pretty good topic to post on YouTube and before we get to that just also want to thank everyone for responding to my LinkedIn post earlier this week I had a friend looking for a ServiceNow developer on a federal government contracts with the Department of Defense you have to be a US citizen you have to have an active secret clearance kind of hard to find you know these types of individuals but I thought I put it out there I'll LinkedIn I believe the position is still vacant so if you know anyone that's the US citizen has the clearance no service now and especially if they know ITSM or I believe it's HR really appreciate it that would help my friend out and also I get nothing out of this I just do this to connect people with opportunities you know it's kind of a good karma thing so for today what we're going to do is the scenario or the customer requirement kind of looks like this sure we have our automated responses our notifications that gets sent out or triggered when we open up a problem record which is fine so in this example I'm going to open up a record call JM test maybe I can put Aspen now afterwards I'll click Save and an email a sense which is fine for most organizations but a lot of organizations or customers that I've had in the past really want to know what is the amount of time it took for the individual meaning the person who it was assigned to to open up an email here and email the customer so I'm gonna show you how we or I've approached the solution in the past and the ingredients into this recipe are three custom fields so I did two on the tasks table and my personal developments and again I've also done this in real life so this solution is working and some customer instances out there in the world so yes it does work and production taken the type of duration or sees me I created a fields type called duration a field with the type of duration no no I can't spit that out today column label is gonna be email response duration at least in this example I don't know what I called it in real life but something to that effect then I did a date/time field called email response date or something of that nature and then the third one I did it on the Cissy mail table called tasks and just you underscore tasks and the reason I created this I know that there is a field out there called like target or it's also I believe the column name is called instance which is fine but there's no way really to dot walk to the tasks from there the instance basically will bring in any record society that's there not necessarily just the tasks so I created that then I created a relationship and for those of you who are not familiar the relationships I'll go over how I create this one I called it outbound emails and we can see it's between the squaring from the so basically we're saying hey go out to the sis email table and then apply it to the task table and also this is going to pull down to incident problem or whatever task tables excuse me tables that extend tasks so that's why I created those original fields on the task table because I don't have to create these fields although you know over and over again that's why I created on task I don't like creating fields on the task table because I've run into situations where you actually run out of space believe it or not because everyone wants to pile onto the task table which you know I've only experienced that once and I haven't sinned so maybe that problems are mitigated but I guess the point here is that you know it's a nice rinse and repeat solution that you can use over and over again so that's why I wanted it on tasks so I don't have to keep rebuilding those fields I named it outbound emails you can name it whatever you want and then let's take a look at this really simple query that we have here currents and current refers to the table that we're occurring from or ml dot add query now remember the field decorated you underscore tasks on this email table boom there you go and then we're gonna say comma parent dot sis ID and you're probably like whoa dude what does that mean like I'm a visual person so can you show me how that actually looks in real life sure dude no problem so let's go back to our problem right here and what we're saying is this is our parent remember we're calling from the SIS email table or crane this relationship and we're applying it to the task table and a table a problem that extends tasks so if we scroll down we'll see here I added a related list called outbound emails so basically what's going to happen is anytime an email is created it is going to put that email on this list down here so if I go ahead and refresh we're gonna see down here hopefully this list loads and a relatively short amount of time that I'm gonna scroll up because maybe I went too fast for the system but sometimes that's the way it is with its personal instances or maybe there's a lot of stuff going on in my instance on a Saturday but basically what we want to do here is take a look on the list and just make sure that it's bringing in all the ones that are related to this number here and we'll scroll down and it looks like we have two and one is my problem has been open so that's a standard one and then we have one that's send ignored and generally that happens when you open up the email client and you're getting ready to send something and then you know just kind of you say oh you know what I don't feel like sending it so then another email will probably appear here in a couple minutes but we only want the ones that have been sent and we also want the ones that aren't system right so pay attention to that right there so because we're I'm going to show you the business rules that we have to create so it's about three business rules so again you task coming from this email table and then parent that society is basically we're getting off this task so meaning parent record that's aside society from the parent it's got to match that task alright now that I've drilled that home three times and you're sick of me talking about that let's get through the business rules so the first one that I have your set task what do i what do I have this business rule here for basically I'm running this and you can see here I don't have any conditions on it in real life you'll probably want to have some conditions on it so that way doesn't always fire but that's up to you again this is something probably for developers who are pretty advanced and have worked with a tool for a while and you should probably consult them too that would be a great idea consult them to make sure that this is the the solution you want to implement so what do we have your current remember currents coming from in this case ml you task equals and this is the field outside this instance field if we take a look at it and condition builder right here it's not called instance for whatever I have no idea why they named it target but if I type an instance it's not there it's called target and if I put in target here we'll see here there is no operator like a reference field would be like if I look at tasks see here this this gives us a clue right here that is a reference field also the operators here are way different so we have our advance condition put in we're good to go what are we running at running before or of a hundred then we're gonna go to our next business rule which is response time again this is running on the ml table so this is going on update and we're basically saying tasks that email response date is empty right so we want to make sure that we're not running this every time because there could be several times that the individual has to email the customer regarding this task so then we're gonna say created by is not system think I mentioned that before and then type is sent so we don't want any that sent ignored stuff having this business will run on the sent ignored right or some of the other boxes that we have here so then we're going to go to our advanced what are we doing we're doing a glide record query right so this email there's a one to many relationship between tasks and sis emails so we have to do our glide record query and then we're saying okay go ahead and get you tasks and then we're setting the value right here response date with currents currents coming from where ml to created right the created dates were created on so remember that you email response they were saying okay shoot that puppy up there right for the response time and then we have another one right here that's running on our task table to say hey go ahead and calculate this thing and now we're saying when the response state changes and it's not empty right so on update that's when we want to go ahead and run this thing so let's go over to our advanced then what are we saying here so this is a duration so we're saying okay our duration so currents coming out the task table dot meaning field name you email response duration get the difference of sis created on and again this is current so it's coming from here the created here and then the email response date and of course we're going to display value because this is this is generally the way you know the duration calculation will be setup right so we're saying get the difference between these two so let's go see this puppy in action so far we don't have anything here since I'm gonna go ahead and send one and we're probably gonna have to Leah Mel's popular I'm thinking one's gonna be sent ignored and then we're gonna have this one also so I'm gonna go ahead and find myself and then I'm just gonna put him here Aspen now and when I hit Send now it might take a couple of seconds for this business rule to run but one way we're gonna know it runs is that they're gonna be these little blue icons that appear right next to it alright so we'll just wait for a second there for this to occur and there we go email response duration look at that nine minutes 18 seconds it looks like and then here's our email response date also if we want to make sure that this didn't run a second time we could send another email afterwards which I don't want to drag this email or excuse me this man email I don't want to drag this video out too long so you can test the solution yourself in your own PDI and maybe apply it to a customer instance later but you know I found that this is works great in the past also one other thing I'll add is that you know once you implement this solution you should probably do at the beginning of rolling out an application now if you're in the middle of it and people want to know retroactively Lee what the email response duration was for all the ones going back I do have a background script handy I'm not gonna go right now because it's really long and there's a lot of stuff in there but if you need a copy of it just go ahead and contact me so that's our solution for today my name is Jason Miller and found of Aspen our solutions and we've just unlocked the power of service now

View original source

https://www.youtube.com/watch?v=kVbqRmfU8is