AI Incident and Case Resolution Helper - How it Works
[Music] 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 my resolution helper works I want to give you the technical details so you could do this yourself now if you want the code I'm going to put it on the screen you could download it at GitHub the work for the subflows and the custom action and the UI actions will all be in a GitHub repository so you can download this to your instance create a web API credential and do this but here's what the demo was and I'm going to show you real quickly here we put in a resolution notes in this case I'm on a customer service case I put in something technical like you can see right there about reloading the browser cache and doing a hard reset and setting the server-side cache and what resolution helper does if I click this little UI action it goes out to open AI passes it that resolution and says hey can you make this readable by a 10 year old human or understandable by a 10 year old human so it just rewrote this live so you could see it it does it a little bit differently every time I figured out how to fix the website's login issue I turned on some special tools on the browser and cleared the website's memory so that's how it fixed it this is what I did to make that happen so there there is a subflow for both incidents and cases and as part of those the input for the subflow is just to pass it the record that we're requesting it to revise the resolution on then I'm going to set the set a flow variable variable called text prompt and this is where I have to do a little bit of work before I ship it off to open Ai and essentially I set the current resolution to the closed notes the field that's there on the customer service or in the incident record or the customer record then I put a prompt in there rewrite the following to be user friendly to a 10 year old human colon space end quote and then I concatenate that with the actual resolution so I'm basically saying hey rewrite this thing that happens after the colon and then return that as my variable once that's done I call my custom action to rewrite the text and pass it that text prompt okay so the custom action gets the text prompt that you can see here generates a rest query to the completions API at openai.com and we pass it my token and we will ask it for application Json we're using the text davinci03 model there's my prompt my Max tokens temperature and N of one we could get multiple responses if we want then we parse that as it comes back so that I have it usable in my subflow and then in my subflow back here I'll show you I Loop through and there's only going to be one but I have to Loop through it because it's an object I grab that revised resolution that came back from text DaVinci 03 and then I add a worknote saying here's the previous resolution here's the revised resolution and then I update the incident record by putting that resolution in the close underscore notes field or as you can see it on the screen the resolution notes field and I didn't really show that in the demo but you can see there on the work notes I have previous resolution um and uh revised resolution so we have a history of it there but the field audited as you can see here so it actually um the system by default is tracking that field and having a before and after but I put one in the work notes and that's what you're seeing in my flow there with this ad work note but there's the resolution notes and setting it to the revised variable oh and something else I did here the text davinci03 model comes back with these extra lines it was really annoying so service down to the rescue I was able to use a data transformation on my data pill to trim it looks like I did it twice here but to trim that texturing as it comes back so that it doesn't have those new line characters inside the actual response that I put in the work notes where I put in the resolution notes I hope you found this video helpful don't forget you can download the source code for this at GitHub I'll put it across the screen at the top I'll put a link in the description down below and until next time don't forget to always be learning [Music] foreign [Music] [Applause] [Music]
https://www.youtube.com/watch?v=nCEMluOxqKs