Hello,

Sign up to join our community!

Welcome Back,

Please sign in to your account!

Forgot Password,

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Sorry, you do not have permission to ask a question, You must login to ask a question.

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Home Latest Topics

  • 2k
  • 2k
Kevin Stratvert

Power Virtual Agents Chatbot Tutorial

video
play-rounded-fill

Check this out. I just built my very own chat bot on my website, so I could ask what are your open hours? And look at that! I could buy a Kevin Cookie Company cookies late at night. That’s really perfect for those late night munchies. Today we are going to learn how to use Microsoft’s Power Virtual Agents or what I like to call PVA. We’re going to learn how you can create your very own chat bot. Chat bots are perfect for answering routine questions, for collecting information, for filing help desk requests, and so many other scenarios. Your chat bot can interact on your website, you could have it respond to Facebook messages, you could have it talk to people in Microsoft Teams, or even respond to text messages. There are so many different ways that you can use it, and the really great news is it’s low code meaning that it’s very simple and intuitive to use. If you can watch this video, you’ll know how to make your own chat bot. Let’s learn how to do this. We’re going to look at two separate paths for how you can get PVA, and they both require a Microsoft work or school account, and unfortunately, if you have a Microsoft personal or consumer account, you won’t be able to use this. The good news is though you can sign up for a free one-month trial to test out a work account. You could click on the link up above or also down below in the description. The first way to get PVA is directly in Microsoft Teams. Over on the left-hand side, click on the three dots or the ellipsis and then search for Power Virtual Agents. Click on this option, and then click on add. You can now create your chat bot. Second, head to the website powervirtualagents.microsoft.com, and then click on start free, and here too you can also create your chat bot. Now either approach has the same exact interface, so whichever one you choose, you’ll be able to follow along. The key difference is if you create it through Microsoft Teams, it’ll optimize the permissions for Microsoft Teams. In this video, I’ll create it directly through the website. On the PVA homepage, let’s click on the start free button, and on the next page, sign in with your credentials. Once you finish signing in, you’ll need to set up your PVA account. Here you can select your country or region, and once you select that, let’s click on get started, and look at that, we now have a PVA account. Let’s click on get started. This now drops us into the main PVA interface. Right here, let’s click on got it. Here we see a welcome message, and here again, let’s click on get started. Next it asks us to start creating our chat bot, but in this video, I want to use the new experience, so in the top right-hand corner, let’s click on this X icon. And we finally made it to the home screen of PVA. Over on the left-hand side navigation menu, here I can see that I’m currently on home. Here I can toggle on or off the navigation menu. On the home screen, here we can create a new bot, and down below we have access to various learning resources. Over on the left-hand side, here too I can create a new bot and we’ll do this in just a moment. Down below, here I can also view all of my existing chat bots. I want to create a new chat bot for the Kevin Cookie Company, so over on the left-hand side, let’s click on create. On the create page, I have two different options. I can build for production or I can test out the new preview experience. I really like being on the cutting edge, so let’s test out the new preview experience by clicking on this option. Right here, let’s click on continue, and right here, we need to give our bot a name. I’ll call this bot just the Kevin Cookie Company. It’ll be a good general all-purpose bot that we could use for our company. Down below, we could also choose what language the bot will speak, and here I have English selected. The one thing to note is once you select a language here, you won’t be able to change it, so make sure that this is the final language that you want your bot to use. Down below, I’ll click on create. Look at that! We have now successfully created our bot, and over on the left-hand side, you might notice that the navigation menu looks a little bit different. This is the chat bot specific navigation menu. Up on top, I can click on chat bots and that brings us back to that previous navigation menu that we saw, and here within chat bots, I can now see the name of the new chat bot that I just created. To get back to your chat bot, you can simply click on this and this drops us back into the chat bot view. Over on the left-hand side, we have all of these different options. Currently we’re in the overview, but you also have topics, entities, analytics, publish, and settings, and as we go throughout this video, we’ll see what these different options do. Down at the very bottom, I can hide my bot. When I click on this, here you see that pane disappears, and here I can toggle it back. Right here, this allows me to interact with my bot, and here it looks like the bot’s already talking to me. It says hello, I’m Kevin Cookie Company, how can I help? Well, let’s see what it can do. Maybe I just say hello, and here it says hello back, how can I help you? Now maybe I want to say something like how can I order cookies? When I send this to the bot, the bot doesn’t yet know how to respond because we have some work to do to build out this bot. To get started, over on the left-hand side, let’s click on the option titled topics. This now drops us in the topics view, and over on the right-hand side, we can see that there are already some pre-added topics. We have some custom topics, and we also have some system topics, and that makes sense because when I said hello to the bot, it responded back with hello, how can I help you today, and that leveraged the greeting topic, so this already exists. The way to think of a topic is it’s basically a conversation topic. Let’s say I want to know the hours for the Kevin Cookie Company. That would be one topic, or let’s say maybe I want to know how to order cookies. That would be another topic. You can also turn topics on or off. When I move over to the right side here, we see a status column and currently these are all turned on, but let’s say I want to turn off these lesson files, here I can toggle that off and then the bot will no longer know how to respond to these different topics, or let’s say I wanted to turn the greeting off, if I said hello then, the bot wouldn’t know how to respond. In the top left-hand corner of this pane, let’s click on new topic and let’s create our own topic for the bot. This drops us into a new topic, and I want to use this topic to answer questions about what our operating hours are at the Kevin Cookie Company. Right here, it’s currently titled Untitled. I could click on that and let’s give it the name hours. Down below, I can see the authoring interface. Basically the space that I’ll use to build out this topic, but it’s a little hard to see everything. Down in the bottom left-hand corner, let’s click on a hide bot, and that’ll remove this pane right here. This way it just gives us a little bit more space to work with, and right here we see that we need to provide trigger phrases. Let’s click on this, and over in the right-hand side in this pane, we can now add trigger phrases. Basically, when you type in one of these words or one of these phrases, that will kick off this topic. Let’s type in a few examples here like what are your hours, or let’s say when are you open, maybe just open, and close, and maybe just hours. The key here is you just want to provide some examples, and over time, PVA will learn about what someone’s asking and when they type in a question related to these different trigger words, that will kick off this topic. Now that we’ve entered in all of these different trigger words, we need to define, well what happens next if this topic is triggered. Right down here, I can click on this plus icon to add another node, and here you could send a message, or you could ask a question, you could add a condition, and you have all these different options, and we’ll get into what many of these do. For now, I just want to stick with a simple example. I just want to send a message back with our hours. I’ll select this option, and here I can enter a message. I’ll type in our Kevin Cookie Company flagship store in Seattle is open daily from 9 to 11 PM. Over here, I could also bold and italicize different items, so it’s a rich text editor. They are asking about the hours, so here I’ll highlight the hours and let’s make this bold. I think that makes sense. Now that I’ve responded back with our operating hours, I don’t know if I have anything else to add. Here I’ll click on the plus icon again to add yet another node, and down here, there’s a category called topic management, and over here I can end the conversation. I’ll select this. In the top right-hand corner, let’s now click on the save icon. That will now save this topic. Now that we’ve saved this topic, let’s test it out to see how it works. In the bottom left-hand corner, I’ll click on test your bot, and right here, I can now enter in a question, and I’ll type in, when do you close? This question does not exactly match one of these trigger phrases, but let’s see if PVA can figure out what I’m asking about. Here I’ll click on send and it looks like PVA here provides me back with the hours of 9 to 11 PM. That’s pretty cool! Now I think it’d be even nicer if I could provide let’s say an image of the location just to make it really clear what location we’re talking about. I’ll click on hide bot, and back within the authoring canvas, I’ll click into the message. Right here, I can add to this message. I can add message variations, an image, a video, a basic card, an adaptive card, and many different options here. I’ll click on image, and that opens up image properties over on the right-hand side. Here I’ll call this KCC Store, and down below, I can type in the URL of an image. Here I’ll paste in a URL and then close this out, and here we see a picture of the Kevin Cookie Company Seattle location. I’ll click on save in the top right-hand corner. Down in the bottom left-hand corner, let’s click on test your bot, and this time, I’ll simply type in hours with a question mark, and let’s ask the bot. Look at that. I get the hours and I also see an image of the location. That is really nice. Down in the bottom left-hand corner, let’s now hide the bot. Over here in the authoring canvas, we’ve now added a few different nodes. We have the trigger, we have the message, and we’re getting more content in here. Over on the left-hand side, we have these controls that help us with the view. Here I can zoom in a little bit. Let’s say we want to see the Kevin Cookie Company location up close. There we can do that, or here I can also zoom out. I could also open up what’s called a mini map, and this shows us all of the different nodes on the authoring canvas, and you’ll see that the different nodes have different colors, so the trigger is in blue, here the messages are in purple, so that helps you identify what’s what on the screen. I’ll close the mini map. Right here, I can also reset the view. Here we also have what’s called the hand tool, and this allows me to navigate throughout the canvas, and down at the very bottom, we have the selection tool that lets me select multiple nodes on the screen. To navigate back to all of my topics, over on the left-hand side, here I can click on topics, or I can also click on topics up above on the breadcrumbs. I’ll click on that, and right here we see the new topic for hours, and it’s currently turned on, which is why when I ask the bot about hours, it was able to respond to that. Unfortunately, it’s not as simple as providing the hours because at the Kevin Cookie Company we have multiple locations and those locations have different hours, so let’s make it a little bit more complex. Let’s click back into the hours topic. Let’s click on the plus icon to add another node, and here I have the option to ask a question. Let’s select that. This adds a question node, and right here, I can enter in a message. I’ll type in what location do you want the hours for, and right here, I can have a multiple choice question. That’s exactly what I want. When I click on this drop down, I have all of these other options and later on we’ll get to what some of these are, but for now I just want people to tell me what city they want the hours for. Here I’ll click on the plus icon to add a new option, and here I’ll type in Seattle as the first option. I’ll click on plus again, and here I’ll type in another option for Mumbai. Down below, I can save the response as a variable. I’ll click on this and this opens up a pane over on the right-hand side, and here I’ll type in UserCity. Here I’ll close this out, and now I’ve successfully added my question. Now that I’ve added my question depending on how someone responds to this question, we could take different paths. For example, if someone says that they want the Seattle hours, well then I want to provide the Seattle hours, and not the Mumbai hours, or if someone says they’re in Mumbai, well I want to provide those hours and not Seattle, so here PVA has automatically added these different condition paths, and then at the very end, there’s also a catch-all in case the city doesn’t match one of those two options, so let’s build out some of these paths. Here for Mumbai, well, I want to provide the hours specific to this city. Here I’ll click on this plus icon to add another node, and here I’ll send a message. For this message, I’ll type in that our hours are from 11AM to 5 PM, so they’re not open quite as long in Mumbai. Down at the bottom, I’ve already provided the hours for the Seattle location. I don’t want to have to recreate this node under the Seattle path, so instead, I’ll select this node, and then I can press control + X on my keyboard. That cuts the node. Right here, I’ll click on the plus icon to add another node, and here I can paste that node in, so here I have the response for the Seattle hours, and over here for all other conditions, I don’t need to add anything else, so I’ll leave that as is, so once someone gets their response, at the very end we end the conversation. In the top right-hand corner, let’s now click on save, and then let’s test it out. In the bottom left-hand corner, let’s click on test your bot, and right here, I’ll type in hours with a question mark, and here PVA asks me which city I want to know the hours for. I’ll select Mumbai, and here I get the hours back for that specific city, so here I responded to this question, and depending on my response, it then goes through this condition. Now let’s say that I provide the city name in my question, so what if I say what are the hours for Seattle. Let’s see what happens. When I type in that specific question, here PVA detects that I already provided the city name, so there’s no need to ask this question, and instead, it automatically jumps to this specific condition, and gives me this response. That is pretty neat. Over on the left-hand side, let’s now click into entities. This drops us into the entity view, and what is an entity? An entity is something that exists in the real world, so here we see something like a city or a country. Here’s an email address. These are all entities. Also, here in that conversation, when I said what are the hours for Seattle? Seattle here was an entity and PVA can automatically pick out these entities from a conversation. Right up on top, we can even add our own entities, or we could just leverage these pre-built entities. Let’s now click into topics and let’s build a new topic that leverages some of these entities. Here I’ll click on topics. Within topics, let’s click on new topic, and for this topic, I want to collect feedback from customers. Here I’ll type in feedback. Just like we did earlier, we need to type in some trigger phrases, so someone might say hey I have thoughts on something, or maybe feedback, or maybe I dislike something, or maybe I like something, I hate, I love, or maybe they say I have and let’s say feedback, so if these different triggers come up, that’ll kick off this topic. Let’s now close out this pane and let’s also click on hide bot just to give us more space on the authoring canvas. On the authoring canvas, let’s add a new node and let’s first off send a basic message. I’ll click on send a message, and here I’ll type in thanks for your feedback, we have a few questions to make sure we understand the feedback fully. Let’s now add another node, and for this one, let’s ask a question. Here I’ll type in can you tell me your name, and here let’s click on identify. Right over here, we can select from all the different entities that we saw earlier within this view. Here we have all of those different options, and here I’ll search for the name entity. I’ll select this, so here we ask this question, and someone will provide a response and PVA will be smart enough to pick out the person’s name. Down below, I can save it as a variable, and here, I’ll simply call the variable name. Here I’ll close the pane. Now that I have the customer’s name, it would probably also be a good idea to collect their email address. This way I could follow up on the feedback. Down below, let’s click on the add node icon, and let’s ask another question. For this one, I want to use the customer’s name in my question. I think that would be a nice touch. Here I’ll type in thanks comma and let’s now insert the customer’s name. Here I saved the name as a variable, and I can now use that in other questions. Right here, I see that variable icon. I can click on that and let’s select the name variable, so that’ll insert the name right here. Now I’ll insert a period and now I can ask my question, what’s your email address, so we can follow up, and let’s see if there’s an entity for email address. Here I’ll search for email, and it looks like there is. By selecting this entity, PVA will look for an email address in the response, and it’ll pick it out, and once it picks it out, I can save it as a variable. I’ll select this to give the variable a better name. Here I’ll type in email as the variable name, and down below, one other thing you might notice is you can decide how you want to use this variable. Here I have it limited just to this topic, but you can also change it to global if you want to use say this email address in any other topics, but for now, topic is just good enough. Here I’ll close out this pane. Now that we’ve collected this contact information from the customer, we need to do something with it, and I want to add it to a spreadsheet, so someone on the customer support team can follow up with a customer, and to do that, we’re going to use something called Power Automate. The really neat thing about Power Automate is it allows you to both send and also retrieve information from other systems, so whether it’s a SharePoint list, Microsoft Teams, an email, a SQL Server database, or even Azure DevOps, or even a calendar appointment. You could connect to many other systems. If you’ve never used Power Automate before, I recommend checking out the video right up above. That’ll show you all of the fundamentals of how you use Power Automate. Now that I’ve collected both the person’s name and their email address, I want to add this to an Excel table, so someone on our customer support team can follow up with this customer. Here in Excel on the web, here I’ll add a column for the name and here I’ll add a column for the email address. I’ll highlight these two cells, then go up to insert, and here let’s turn it into a table, and here my table has headers. Then I’ll click on OK, and this spreadsheet is now ready to go. This is saved in my OneDrive for Business account. Back within PVA, I need to get this information into my spreadsheet, and we’re going to use Power Automate to make that happen. Let’s click on the add node icon, and down at the very bottom, there’s the option to call an action, and here we can call a flow. When I select that, here I have the option to create a flow. Let’s select this. Here in Power Automate, I can now start building my flow, and first I need to define what information I’m receiving from PVA. These are my inputs. That’s the name and the email address. I’ll click on this plus icon, and both the name and the email address are text. I’ll select text, and here for the input, I’ll type in name, and here I’ll also type in name. Next, I’ll add another input, and this is text, and this is the email address. Here I’ll type in email here, and email here as well. After this step, let’s hover over this arrow icon, and then click on the plus, and this will insert a new step, and let’s add an action. Now that I get all of this information from PVA, I can feed this into other applications, and in this case, I want to add another row to my table in Excel Online, and right here, I see the option for Excel Online, but I could use all of these other services, and there are so many different actions that I could take. Here I’ll select Excel Online, and I want to add another row in a table, and here I see the option to add a row. I’ll select that. Next, I need to specify what Excel spreadsheet I want to add the name and the email address to. Here I’ll click on location, and I saved this in my OneDrive for Business. I’ll select that. Right here, I could also select the document library, and this is OneDrive, so I’ll select that. Here I need to specify the specific file. I’ll click on the folder icon over on the side, and here I see the option for customer feedback. I’ll select this. Within the customer feedback workbook, I have a table called just Table1. I didn’t give it a name, but I’ll select this. Now that I’ve selected this table, it’s identified that there are two columns in the table. One of them called name and one of them called email. Here I’ll click into this field, and I want to populate the name from PVA into the name column in Excel, so I’ll select this value. Also, I’ll click into email, and here I’ll select the email address from PVA, and I want to populate that in the email column in this spreadsheet. Lastly, I can also return values to PVA, so let’s say for example you’re looking up inventory in a database, you can then feed that back to PVA, but here, I just want to write values to a spreadsheet, and I don’t need to pass anything back, so I’ll simply click on save. Back within PVA, we now need to kick off that flow once we get a response from the customer. Here I’ll click on the plus icon to add a new node, and down at the bottom, there’s the option to add an action and here to call a flow. Here I see the brand-new flow that we just added called Power Virtual Agents Flow. I’ll select this one, and it expects two different inputs from PVA. It wants the name, and I need to specify where it should get the values from. I’ll click on this, and within PVA, we have a variable called name. I’ll select this option. Also, it expects the email address, and here we want to get it from the variable called email. Here I’ll select email. Lastly, let’s add one more node at the very end. Let’s send a message, and here I’ll simply say, we’ll follow up with you shortly. Let’s now test this out to see if it works as we expect it to. In the top right-hand corner, let’s click on save. To the left of the save button, let’s click on test, and this opens up the test bot pane over on the left-hand side, and let’s type in some feedback. I love your cookies. Here we see that it detects that we have some feedback, so it says thanks for your feedback, and here it says can you tell me your name, so I’m going to say my name is Kevin, and here it says thanks Kevin, and the cool thing here is I typed in the sentence my name is Kevin, the entity is Kevin, and here it picks out that name, and it provides it in the next response, so that’s pretty cool, and now it wants to know the email address for follow-up, and let’s say kevin@kevin.com, and then send that through. Right now, the flow is running where it adds that data to the spreadsheet, and here it says we’ll follow up with you shortly. If I jump over to the spreadsheet, here we see both the name and the email address that it added to the spreadsheet. Back within PVA, I want to add one more question at the end. The customer provided some feedback, and maybe they want to know our store hours. Here I’ll click on the plus icon to add another node, and here I’ll select ask a question, and the question is would you like to know our store hours? I’ll click on this drop down under identify, and so far, we’ve used multiple choice, we’ve also selected various entities, but there is another type called a Boolean. Basically, you could get a true or false response, and then you can decide what to do based on that response. I’ll select Boolean, and here I want to save the true or false response as a variable. Here I’ll select variable, and let’s give it a name, maybe I say store hours yes or no. Now that I’ve given this variable a name, here I’ll close this pane. Down at the very bottom, I now know whether a customer wants to see the store hours or whether they don’t want to see the store hours. I’ll click on this plus icon again, and here I want to now add a condition. Here I have two separate conditions. Here I’ll select a variable, and I have that variable called store hours yes or no, and that could be true or false. I’ll select this, and if it’s equal to true, then I want to show the store hours, and over here, I have all of the other conditions, so if they say they don’t want to see the store hours, well then I won’t show them to the customer. Down here, I can click on this plus icon, and here there’s a category called topic management, and one of the really neat things is I could send this person over to another existing topic. I’ll click on this, and up here I’ll search for the topic called hours that we created at the very beginning of this video. Here I’ll select this, so you can call one topic from another topic, and here if they say no they don’t want the hours, here I’ll click on this plus icon, go down to topic management, and we’ll simply end the conversation. Let’s now save this in the top right-hand corner, and let’s test it out to see if it works as we expect it to. Here I’ll click on test. Within the bot, here I’ll type in I dislike your cookies, and I’ll send this through, and says can you tell me your name. This is Kevin, and where can we follow up? Let’s say kevin@kevin.com. This is now adding it to the spreadsheet. Now that it’s added it to the spreadsheet, I get the question would you like to know our store hours. This is the Boolean question, and here I’ll say yes, and this is now pulling from the other topic called hours, and I could select my location of Seattle, and here I see the hours for the Seattle location, so a really neat way to combine various topics together. We’re now all done creating this bot, and I think this works pretty well, and it’ll answer some customer questions. Over on the left-hand side, let’s click on publish, and right here, I can now publish my bot. Let’s click on this. Here I’ll click on publish, and look at that, the bot is now good to go. Here I can click on the demo website to test out my bot, and check this out, I now have a demo website where I can test out my bot, so here I’ll type in hours, and then I get my hours question. I can type in feedback, and I get my feedback. I can copy this URL up above and I can provide this to others, so they can also test out my new bot. Back within PVA on the publish page back down here, I can configure what channels this bot shows up on. Here I’ll click on go to channels, and you can put it on Microsoft Teams, you can put it on a demo website, a custom website, a mobile app, on Facebook, on Skype, and you have all of these different services that you can connect to. Once you publish your bot, you’ll probably be interested in, well, how is it performing, and is it resolving customer questions? Over on the left-hand side, let’s click on analytics. Within analytics, here we see a Power BI dashboard that gives you high level information on how your chat bot is performing. Here you can see how many total sessions the chat bot has, how are people engaging, are you resolving the issues that people have, what topics are being triggered. This information can help inform whether the chat bot is working as you expect it to, and whether you should make any additional Investments. All right, you now know how to make your very own chat bot. To watch more videos like this one, please consider subscribing, and I’ll see you in the next video.

Related Topics

You must login to add an answer.

Hide picture