Power Virtual Agents | Steps To Create Chatbots

by | Power Apps

Today, we will talk about Power Virtual Agents, Microsoft’s way to create chatbots that you can deploy to your website and teams. You can watch the full video of this tutorial at the bottom of this blog.

The powerful thing about Power Virtual Agents is that it allows you to create chatbots without using machine learning or complex math and linguistics because Microsoft does the work for you. All you have to do is give it the content and resources to digest.

How To Create Chatbots In Power Virtual Agents

Let’s kick it off by opening the Power Virtual Agents page.

power virtual agents

To create a new chatbot, click the Bots icon on the top right and then click the New bot button.

power virtual agents

Let’s name this bot the Loan Helper FAQ Bot, select the English language from the dropdown, and click Create.

power virtual agents

Similar to the Power Apps, it needs to provide everything for the actual creation. For example, when you’re creating model-driven apps, it takes a while because it needs to create all the entities and connectors behind it. It’s doing something very similar if you see this screen.

power virtual agents

It’s still building in the background. So, what we can do is we can start exploring by clicking the Topics in the upper-left corner.

This is what tells Power Virtual Agents what to do when someone says trigger phrases, and then it launches the responses.

For example, we have the trigger phrase, “When are you closed?” There are four iterations or versions of this trigger phrase that someone can say.

If we click Lesson 1 – A simple topic, our Power Virtual Agents tells us what the workflow looks like.

If someone says one of these trigger phrases, we send a message saying, “I’m happy to help with store hours,” followed by another message giving them the store hours.

In addition, there are more complex trigger phrases that we can do. For example, if we click on “What is the best product for me,” this is no longer a one-way communication, but a two-way communication.

Next, let’s click Lesson 4 – A topic with a condition, variables, and custom entity.

Similar to the first example, it will show what the chatbot will say if someone will mention one of the trigger phrases below.

The chatbot will ask “Do you see yourself as a home user, a gamer, or a business user?” Then the person who’s chatting with the chatbot needs to select from the options.

Once one option has been selected, there are different trees of options that all come together and at some point, it can get very complicated.

Testing The Trigger Phrases In Power Virtual Agents

Let’s test one of the triggers by typing in “What is the best product for me?”

As we can see, it launches the response “Do you see yourself as a home user, a gamer, or a business user?” When we select Home User, the workflow goes on and on.

In this case, we can start a workflow, access a third-party API, and make an HTTP request. Basically, we can do anything that we need but it is getting a bit complicated.

Given these points, let’s turn the Sundae FAQ page into a chatbox. This loan company’s FAQ page is where people usually make a bunch of commonly asked questions. This is just an example but you can definitely choose another public website that has an FAQ page too.

When someone contacts us on this website, the chatbot is smart enough to know all these questions and should be able to answer them accordingly. For example, if someone types in, “How does Sundae make money,” the chatbot should respond with the answer below.

Answering Different Versions Of The Same Question

However, there might be different versions of this such as How do you make money, How does Sundae make fees, or How does Sundae charge fees?

All of these are really the same question; hence, we need a system that’s smart enough to digest all of these FAQs. Then, we need to make the trigger phrases broad enough so that if someone says variations of this question, the answer is still the same.

That’s exactly what we’ll do by going back to the Power Virtual Agents. With the Suggest topics feature, we can tell Power Virtual Agents to take our chosen page and then create all of the topics from the Sundae FAQ page.

Click Add and then the Start button.

This time, the Power Virtual Agents are crunching through all of these FAQs by determining what are the questions and what are the answers. It’s also using machine learning to generate the different versions of these questions that someone can ask. Hence, it might take several minutes to complete.

After it has been crunched through, we can see that we have 35 suggested topics, and all of these topics are related to the FAQ page.

To deploy the answer, click Add to Existing Topics and then click the “What is Sundae?” link to see the actual workflow.

power virtual agents

So if someone asks “What is Sundae?” it launches this message which is exactly the same as what is listed on the FAQ page.

power virtual agents

The next thing to do is to upload all of the Suggested topics that we’ve gotten from the FAQ page into the Existing topics.

Select all by clicking the radio button besides the Name and then click Add to Topics.

power virtual agents

Once done, let’s go to Existing topics. We now have 47 of them, which is a lot. So, let’s only toggle on “How does Sundae make money?” as an example and refresh the page.

To demonstrate, let’s test it by typing in “How does Sundae make money?” We can see the answer, and if we go back to the FAQ page, the answer is the same.

power virtual agents

The Power Virtual Agents is smart enough to determine what a question and what an answer is, and feed it to the chat. Another cool thing about the Power Virtual Agents is that there is also analytics behind it.

For example, if someone selects No for the question “Did that answer your question,” you will know that probably was not a sufficient answer so you might want to change your answer in the actual topic breakdown.

power virtual agents

Let’s try another example by typing in “How do you make money?”

As we can see, the chatbot clarifies by giving different options such as How does Sundae make money?, Lesson 3 – A topic with a condition, variables, and a pre-built entity, and None of these.

power virtual agents

If we select How do you make money, it takes us back to the same answer. Therefore, if there are any variations, it’s smart enough to identify that it might mean one, two, or three questions and then it verifies.

power virtual agents

We can do something completely different and keep going, but then again we get the same sort of thing where two questions are fairly similar and it still finds that particular answer to the question.

***** Related Links *****
Power Apps Pop Up Forms For Interactive User Experience
Power Apps Business Process Flow And Documentation
Power Apps Model Driven Apps: Site Maps And How They Work


To sum it all up, you can use the Power Virtual Agents to create chatbots to put on your website, Teams messages, Facebook messenger, and anywhere that you can think of.

This is done using trigger phrases and responses. Of course, one quick way to have this on your website is if you have an FAQ page. You can get a pretty good chatbot if your FAQ page is done very well.

All the best,

Henry Habib

[youtube https://www.https://www.youtube.com/watch?v=22QWSlaxeZ4&w=784&h=441]

author avatar
Henry Habib
Henry Habib is an accomplished Power Platform and Office 365 trainer, with over 100 hours of recorded content and over 30,000 paid students on e-learning platforms.

Related Posts