# Exploring Microsoft Power Virtual Agents based off Microsoft Bot Framework

# Power Virtual Agents

Power Virtual Agents (opens new window) is a new way to create bots without any code. You can use it to easily create powerful bots using a guided, no-code graphical interface without the need for data scientists or developers.

In this post, we'll create a simple bot with Power Virtual Agents.

# Prerequisites

If you want to follow along, you'll need the following:

# Create a bot with Power Virtual Agents

The fun thing about Power Virtual Agents is that you don't need any coding skills. So let's create a bot and see that for ourselves!

  1. Go to https://powerva.microsoft.com/ (opens new window) and sign in with your Office 365 account
  2. This opens the Power Virtual Agents page and asks you to create your first bot

(Create first bot in Power Virtual Agents)

  1. Give the bot a name and click Create. It might take a few minutes before the bot is created and ready to be edited

When the bot is created, you can get started by creating a new topic. Topics are the things that start a conversation with a bot. For instance, if the user asks the bot "what's the weather going to be?", that can start the weather topic.

  1. Click on the Topics menu (on the left). Here, you'll see some sample topics that are enabled for you to use. You can keep using them or turn them off if you want
  2. Click New Topic in the top to start creating a new topic
  3. Give the topic a Name
  4. Now put in some trigger phrases (about 5) that are different ways that a user might start a conversation about this topic. In my case, I'm creating a topic for users that ask things like "Give me an Azure tip" or "I want to read an Azure tip". The bot will learn from these different styles of starting the conversation about your topic
  5. Click Save topic in the right-hand corner
  6. Next, click Go to authoring canvas to create the flow of the conversation

(Create topic in Power Virtual Agents)

  1. In the authoring canvas, you'll first see an empty message, after the Trigger phrases. In the message box, fill in something like "Hello! I'll get you an Azure Tip!"
  2. Next, click the + sign below the Message step and select Ask a question a. In the textbox, fill in something like "Which tip do you want?" b. And in Identify, search for and select Number. This will make the bot identify a number in the response of the user. We want to extract the number value when a user responds "show me tip number 200"
  3. If there is a condition step below the Question step, click on its menu (the three dots on the right of its title) and click delete
  4. Now click the + sign and select Show a message
  5. In the message textbox, fill in "Here you go: https://microsoft.github.io/AzureTipsAndTricks/blog/tip.html"
  6. Now move your text selection cursor between the period and html and click on the {x} Var1 to insert the answer of the question step, like in the image below:

(Insert variable into message in Power Virtual Agents)

  1. Again, click the + sign and select End the conversation > End with survey. This adds a survey at the end of the conversation
  2. That's it. Click the Save button in the top-right corner to save the bot. Your conversation flow should look like the image below:

(Conversation flow in Power Virtual Agents)

Let's test the bot! You can use the test window to start talking to the bot. If you don't see the test window, click the Test your bot button in the bottom left of the screen. Ask the bot "show me an Azure tip". It will ask you which tip. And you can say something like "I want to see 221". It will return the URL to the Azure Tip and ask some questions and end the conversation.

(Test the bot in Power Virtual Agents)

Now that the bot is finished, you can go to the Publish menu to publish the bot and add it to channels like Microsoft Teams (opens new window) and Skype (opens new window).

# Conclusion

Creating intelligent, conversational bots is very easy with Power Virtual Agents (opens new window). You don't need any coding or data skills. You can just get started, create your bot and publish and monitor it. Go and check it out!