logo

NJP

Virtual Agent Academy: Augment your experiences with the Virtual Agent API

Import · Mar 25, 2021 · video

hello everyone good morning or good afternoon depending on what part of the world you're in welcome to virtual academy uh we're gonna get started right now so before on to the main event i just wanted a quick reminder that uh to be sure to visit our community website for all the latest in our essential beginners and expert pract best practices advice uh a community of people to literally answer your questions that you have let rely on the experience of others and to on your own give questions as well if you're watching us on youtube don't forget to click the subscribe button or the like button and today's main event is talking about virtual agent api so how to augment your bots with servicenow workflows with a virtual agent api as a presenter today we have shipper gupta senior principal product manager and gardov goyal senior staff engineer here's our goals for today we're going to do a brief overview of the virtual agent api and then grab's going to go in an exercise and throughout the pro session and at the end we will do question and answer so with that i'm going to hand things over to shipra hi victor thanks a lot hello everyone uh so let's just dive right in before we begin here is the safe harbor notice for forward-looking statements so please be informed of this okay so uh one of the key areas of focus uh for us in conversational interfaces platform is extensibility we want to make it convenient for customers to tap into servicenow's world-class workflow capabilities in itsm hr and csm space in any conversational interface of their choice be it uh you know out of box channels that we support or a chat bot that you're already using in-house so next slide so now when it comes to what-to-bot integration there are two use cases that we often come across one requiring service now bought virtual agent to act as primary part and the other one where servicenow's bot a secondary specialized spot um weaker we the the ability for servicenow is bought to act as primary part is something of a roadmap consideration at this time so if that is a use case uh that's of interest to you we would absolutely love to hear more from you in today's session we are going to focus more on servicenow bought as secondary bot this is our current capability um so that's what we're going to talk more about in today's session next slide so our solution for servicenow's virtual agent and or live agent to act as secondary bot uh aka specialized bot is a store app uh we call it virtual agent api it's a framework of rest apis with standard request and response payload uh who would be so the target audience of this use case um so customers who are you know at the forefront of ai and ml driven solutions uh who have invested in a part ecosystem already and they have a user base that is interacting with a with a bot persona already those customers would be the typical target audience for this use case the benefit of leveraging virtual agent api is as follows number one it enhances the capability and intelligence of your bot ecosystem by bringing in a servicenow virtual agent that specializes in our market leading service delivery solutions two you can easily and non-intrusively plug servicenow virtual agent ak live agent in your existing bot ecosystem through a back-end api driven integration and finally you can provide a seamless yet very robust experience to your end users without disrupting their current chat experience and the persona that they are familiar with okay next slide please so how does virtual agent api works uh there are three main entities in this setup one is the end user then there is the primary board the orchestrator board and then there is the virtual agent ak live agent that is our servicenow bot so the user will initiate a request to the primary bot uh bot can either carry out intent discovery and assess that this is a request that needs to be transferred to servicenow virtual agent um you know because it pertains to one of the skills that servicenow virtual agent offers or primary bot can simply just uh you know transfer the utterance to servicenow's virtual agent and we can uh carry out intent discovery in servicenow va once we receive the request uh in a json format on our inbound rest endpoint we will process the request and generate a response from either virtual agent or live agent as the case might be and post that response on an outbound rest endpoint that you would have configured in our platform the primary bot uh receives that response processes the response and then serves it as the bot response to the end user now one question that we hear in this context is you know whether we support async or sync so currently this handshake is asynchronous in nature but we are looking at making the handshake synchronous in our very near future okay next slide i want to give you a sense of our product releases as well so um our mvp release came out with the paris platform release in that release we support both virtual agent and live agent use cases you can transfer the users to specific queues that you may have set up for your uh support agents you can conduct intent discovery either in the primary bot or secondary bot we do provider authentication and user account linking if your users have a servicenow profile uh available in the platform in quebec um we are supporting topic switching so if you want to lend users directly into certain topics you can do that we will return confidence course from servicenow nlu based on a threshold that may be configured in the servicenow va we provide a take back control which basically gives control back to the primary board if servicenow's va is not able to process the request and you know just you know doesn't have an appropriate response to that request you can bypass greeting topic while transferring to live agent we heard this quite a lot so we support this in quebec and we also provide a special part to board conversation timeout system property we already have the notion of conversation idle time out in virtual agent today but if you want to have a special time out that is different from the standard via timeout just for what to bought conversations you can do that as well and now in rome we are looking to release um capabilities like we want to provide you an api based uh model export capability you can pass chat history from primary bot to our servicenow's live agent that way the user the the agent already has the context of the conversation that has already transpired between user and the primary part and the user doesn't have to repeat themselves um a number of other enhancements and features to keep bringing our virtual agent uh the bottlebot integration capabilities at par with some of the standard va features and then finally pass agent details to primary part in case you know you are interested in displaying those details to your end user in terms of the persona okay next slide please yeah these are just some of the resources that we want to highlight uh we have made a lot of enhancements we've added a lot of examples to our quebec uh virtual agent api documentation so do check that out we also have a featured article on community with lots of details and faqs and we keep updating it time to from time to time depending on certain areas that require more elaboration so those are just some primary sources that uh we should be just check them out okay so now we want to uh uh move over to the demo part of today's session there are two aspects that we want to cover one is setup and the other we want to walk you through some standard use cases that we hear are of uh you know main interest to our customers and adopters uh when it comes to setup i want to highlight that the virtual agent api is pretty much turnkey out of the box you just need to start install the store app and once you install the store app there is some very basic configuration that you have to carry out that we will show you in today's session and then then we'll show you some of the use cases uh focused mainly on how to transfer to a live agent and how to carry out a virtual agent conversation and do it okay with that let me transition this to godof and shipper while we're doing that transition there's actually a couple questions that came in from the audience the first question is what happens when a bot recognizes it needs to escalate to a live interaction with an agent um for example if someone needs to do a screen share so i think that that kind of refers to um you know when the bot does that warm handoff to an agent transfer from virtual agent so that should work very seamlessly just as it does in va you know there is no difference in the experience that you have in the way the virtual agent transfers to live agent nba versus how it will happen when we are you know returning those responses to the primary bot your user can express an interest in trans transferring to live agent um or if you're using this as a fallback depending on your setup okay great thanks shipwreck and the other question i'll just read aloud is virtual agent api um entitled with the core platform or is it part of a virtual agent license and i just wanted to confirm what we're showing today does require entitlements and licensing to virtual agent however there's other chat frameworks available but as always it's best to check with your account team regarding any sort of entitlement questions all right so uh gaurav i'll hand it back over to you thanks martin so we will start with some of the setups which we have to do so if you are integrating in your development environment or your employee instance what you can do is uh you can use this property and you can set this property as true and what it will do is it will start printing some extra logs which will be helpful for debugging uh next what we have to do is we have to go to scripted rest apis uh and this is the api which uh your primary bot will be hitting once you install this virtual agent api store app on this instance um all this information will be pre-populated but what we need to do is we need to go inside on this script endpoint and what we need to do is we need to go ahead and uh let's assume you want to check and say okay i want to enable basic or oauth authentication and that's strongly recommended so you can just check this checkbox and from here uh this crypto endpoint will be always behind and basically for oauth authentication and rest all you just have to leave it as is no need to touch um then we have rest message and this is the rest message which we will be posting uh from virtual agent api perspective we will be posting our responses to and this is the uh we about to bought a rest message what you are looking here and you can change your endpoint here as well as here so once you do that and you can definitely enable authentication based on your uh uh need and once you change these on endpoints the ava api will be posting their responses back uh on these endpoints so so this is where we as you mentioned it's the async integration it's a two-step process you will send a request to va api where we will immediately give you uh 200 okay and we will take that request and once we process it we will send this response via this rest and message endpoint i have my locks open what i'm going to do is i'm going to show you sportsmen today and in this i'm going to show a sample request json how it will look like what i've done is i have enabled authentication here basic authentication um also i have enabled my content type and few other parameters ultimately what i'm going to do is i'm going to post a request um some of this information is already available in documentation so um i don't want to go into detail but let's just look at this phrase so this is a text which uh we are getting from our primary bot and this text is nothing but uh a way or a topic name basically where you are connecting to a live agent so there are multiple ways you can connect to a live agent without talking to virtual agents so in this scenario we what we are doing is we are taking this live agent topic uh we are clicking on the send and then i did not do that yet i ha i'm also logged in onto agent workspace or agent chat at the moment as soon as i say send what it will do is it will it will execute the logic behind the scene and then i got a request to chat as a live agent so if you see i got this message and then this is the response which we have sent back now let me go into the logs and show you what what the logs says so in the logs you can see we are printing this response what we are shipping it to the rest message which rest message nothing but the primary bot so this is the message what we have sent out thank you for contacting support and here you if you can see we have couple of extra parameters one is the agent chat true that tells you that currently this message is coming from an agent not from a virtual agent and also what is the score so score will vary between zero and one and based on that primary bot can determine if uh if they want to route the traffic to some other bot if you are talking too much multiple secondary bots or uh you know like how the how confident um like virtual agent or the live agent is in this scenario the integration perspective i'll go back and i'll uh type in a message so as soon as i type in a message this message will be posted back to the primary bot and you can see this message appearing here now what i can do is uh as a primary bot i can reply back to this message when i reply back to this message i should see this message appears onto the agent chat site so with this we are able to exchange messages asynchronously between primary bot and agent chart i don't want to drag this further let me just close this conversation when i close this conversation and go back to logs you will be seeing that we will be sending a message the conversation has ended and completed flag will be true at this moment it means the com the conversation is complete at our end and primary bot can determine whether they want to take control or they just want to send the same message out so this is one round trip between virtual engine api and the primary bot where we directly jumped onto a live agent integration and we used a topic live agent support which is a predefined topic there is one more option here and then i'll take a pause what you can do is um another option if you don't want to use a topic there is an option where you can send a keyword and in this keyword you can just type in agent rest all the information looks pretty similar and i say send when i say send what we will see here is we will see a couple of options we just want to be clear from our perspective that the you are trying to connect to a live agent so we are giving an option here please make a selection and there are few options we are popping up so one is chat with agent and another option is cancel so i want to talk to an agent so let me just say chat with agent when i say chat with agent you see i got a request to chat with the agent again and this time um i'm able to connect with the live agent very similar to what i did before and here if i just send a message now i should see this message popping up again on the live agent side of it so let me close this and take a pause and grab no questions from the audience at this time so i think you're okay to keep going thanks marcel so so far what we have done is we have shown you the live agent integration directly without virtual agent involvement but now what we want to do is uh we want to go and run through a virtual agent conversation and for that uh let me just go in here into our designer virtual reason designer and let me try to run this topic which is email issues topic that comes with um a predefined itsm topic what we are using here so when i test and what i'm just showing you what this topic does and then i'm trying to mimic the same feature using virtual agent api i have two okay i hope you can see it now i'll click on authentication issues and it asks me another question did this step work for you i said no and did any of this information resolve your issues i can say no would you like open ticket and i can say no for now and this is where the conversation got over so it's a multi-round conversation what we have here what i'm going to do is i'm going to try to mimic this behavior with our virtual agent api and to do that what we will see a few other options i'm trying to show few other options as a mix and match which you can use in different scenarios so for example what i'm going to do here is i'm going to just start a conversation uh with an action without sending any text uh and this option is available just for you to just start a vanilla conversation when i send this and go back to logs and check the logs i see the conversation got started and i got some basic information salutation from virtual agent api with some options at the start what i'm going to do is i'm going to uh say uh say that i want to run this topic and this is where what i'm doing is i'm passing an action is equal to switch and i'm passing a particular intent and this particular intent basically mimics running that particular topic and we are using this intent because we assume that primary bot has already used some nlu identifying an intent and they want this intent to be passed to virtual agent api ah definitely we need to have a mapping of this intent and if we do we will go ahead and start running that particular intent so you see here what types of issues you are experiencing authentication issues can't send an email and this is very similar to what you saw in the designer i'll go ahead and just send authentication issues at this moment so when i do that um i'm getting similar information what i saw in the designer and in the end i'm getting a boolean control and i'm being i'm asked and did these steps work for you so at this moment i can say no so this is how i'm just continuing the multi-round conversation and instead of just taking this conversation till the end let me show you another experience so so far you see this is for progressing further we are seeing a kb article here again with another question did any of the information is resolve your issue instead of saying yes and no or true false um i can type in some random words uh just some gibberish and it doesn't need to be gibberish it could be anything which servicenow does not understand for example uh some intent which never set up on service now so when i do that what will happen is we will send a response saying okay sorry i didn't understand your uh request and then the question is did any of this information resolve your issue we will again try the same work ph and at this moment you see we are having another field pops up which says take control so this is a configurable property but what what we are doing here is we are getting some text from the primary part which servicenow va is not able to understand instead of leaving this conversation in an infinite loop what we are doing is after a couple of tries or a couple of failures we are sending a new flag called take control true that means we are expecting primary bot to take the control at this moment so let me mimic the primary bot taking control what i can do is i can come and say okay maybe this is something should be handled by some other secondary board or maybe by the primary part itself in this scenario i can send an action called end conversation and that's where i'm going to end the conversation so i ended the conversation here and that's where the completed frag went to true so gaurav question from the audience and this may be a good time to pause for a moment um what is the role of nlu and what you're showing so maybe we could talk a little bit about whether nlu is required um and how that works if you're using you know if you choose to use nlu through your primary bot or if you choose to use servicenow's nlu in addition to nlu from your primary bot sure good question um if in this example what we are trying to show that you are using nlu from your primary bot uh you determine your intent upfront before making a call to va api and that's where you have sent this intent and this is absolutely not required if you want to use servicenow nlu you can very well do that uh and in that scenario you just have to pass a text directly here instead of xyz you can pass a text saying email issues and once you do that or anything else whatever the statement you are getting from your end users you just pass it here servicenow will run the nlu behind the scene and accordingly give you response back with some kind of score okay great that's super helpful and for those who have nlu questions i encourage you to visit the the link i posted in the chat um it's a document out on community that gives visuals and explains a little bit more how the api works with nlu all right so grow it back over to you thank you um so at this moment what we have done so far is we have created a conversation with live agent and virtual agent but one thing you will notice here is the conversation whatever we are creating so far all are getting created as guest except the one which i created using the web client which is designer but rest all are created as guest and this is the recurring question what we keep on getting that even though we are passing the right information like user id and email id um we still see that information sorry the the conversation getting created as a guest so for that what you have to do is you have to go to the token verification uh and what i'm going to show you is we have couple of options uh for you to do the user linking and for doing the user linking we support static token validation or the hash based token validation and what we will do is we will set up a static token validation quickly so let me go and just say so i just set up this vape auth after token verification go we have to go to message auth and this is where we have to use the inbound token which i just created and we have to save it and after this we have to go to third step is go to va whatever provider application and look at the message auth and select this message auth and save so these steps are very well documented in our documentation now what i will do is i'll i'll go ahead and run a topic called order link which is another topic i have it and if i do that and go to conversation if you see now the user is being recognized and we have done the user linking behind the scene there is no change required in the way you are sending the request everything works exactly same way you are sending user id email id based on the email id we are trying to see if you already have a corresponding record and if yes you we are expecting you to just send a token extra in the request sorry my bad so you have to send this token extra in the request this is the static token validation and what we do is we just make sure that we run this topic and this will do your search and this will give you the information what we are looking for one important thing to consider here is this is a token uh where we are using this on top of your basic auth and this is a complimentary uh and it's not like you have to remove the bc path and pass the token you can pass both of these together any questions we have one more question so it sounds like the live agent transfer is the hot topic so the question is when a user is in conversation with virtual agent can the primary bot interrupt and place a request to transfer to a live agent and um so i think this refers to the take control property you were talking about earlier um so if you wanted to elaborate on that and just some options customers may have to to change those values uh yes you can very well do that uh as i showed that one of the topic what we have live agent uh transfer topic so live agent support topic so if we use that you can use it with combination of action switch and that's where it should be able to route the request to the live agent fantastic okay thanks gaurav no more questions from the audience so far sure uh we are on time so i don't know whether we have um let's see yeah so i can just enable this nlu once and i can just show you that nlu is working let me just end the conversation what we have right now right now so if you see here we got the nlu score right now so instead of one we got the nlu score which is coming from our nlu engine so it is going to be between zero and one uh because i sent order drink that's not the keyword what i had the topic name is beverages so it's not a topic uh um id which i'm passing rather i'm passing a trends and because i'm passing an utterance um it's actually doing the nlu search and based on the nlu match it's returning the score back as well and gaurav one thing that might be interesting is um talking about maybe the differences that you would see between a paris instance and a quebec instance so you know the boolean value that comes back in paris versus quebec we actually display a score sure uh so first uh paris version we we did not have this nlu score enabled we had only our static score derivation logic in place and what it does is it just returns either the zero or one and zero generally comes in the fallback scenarios and i think in most of the other circumstances even if you are talking to a live agent or virtual agent you will receive one but in in queue back onwards uh we have honored the nlu score what we are receiving from nlu engine in case you have any new enabled and if you don't have any enabled then we will fall back to our existing logic of uh determining ourselves uh whether the score is between zero and one depending on whether it went through the conversation is going through properly versus going into the fallback loop yep that's great so just be mindful uh what release you're on um gaurav did you have anything else to show today otherwise we can wrap up yeah we'll be good okay great um i want to thank everyone for their time for their attendance as always please visit us on the community we'd love to hear from you um please post your questions if you have any additional questions and visit our community articles and documentation we keep updating those with frequently asked questions um so just keep an eye out but just wanted to thank everybody for attending and we will see you in two weeks

View original source

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