Creating a bot is not a daunting task anymore, as it was used to be earlier. Using Microsoft Power Virtual Agent any developer without expertise in Bot development can create bots and publish them in the Microsoft Teams platform.
Want to learn how to create simple PVA Bot. Let’s get started with signing in to PVA and learning how you can simply greet a bot using OOTB Greeting Topic without writing a single line of code.
Go to this link; https://powervirtualagents.microsoft.com/en-us/ and sign in for a free trial or a purchased license with your Office 365 account credentials. This will take some time as it is preparing a bot environment for you.
Once the environment for PVA is ready, you will see a pop-up on your screen as shown in Figure 1.1 below, fill in with the details for creating a chatbot.
Fig 1.1 - Create a Power Virtual Agent Chat-bot
Once your Bot is created, you will see BOT home page as shown in Fig 1.2.
In Fig 1.2, At the top right bot Icon button, you can check which bot you are working on and on which environment.
You can also test your bot right inside this Bot playground as shown in Fig 1.2
Fig 1.2 - Power Virtual Agent Bot Homepage
Navigate to Topics in the left navigation and explore out of the box created topics created for you as you can see from Fig 1.3, Topics like Greeting, Goodbye, End of conversation, and a few others will be created for you
Fig 1.3 - Topic Page
Let’s get started with editing a topic and discover how bot conversation is handled inside Topic.
Click on Greeting Topic, you will see the topic name, description of a Topic and triggers for that topic. Trigger phrases means, upon using these words your topic will be called in the conversation.
As you can see from Fig 1.4, Greeting Topic has Greeting trigger phases like Hello, Good morning, Hello friend, etc.
Fig 1.4 - Greeting Topic Page
Click on Go to Authoring Canvas to edit the conversations added in the existing Greeting Topic.
As you see in Fig1.5, in authoring canvas, few messages are added below the trigger phrases, This message will be sent when a user will chat with the chatbot using any trigger phrases.
Fig 1.5 - Authoring canvas of a Greeting Topic
Fig 1.6 - Test Bot using Trigger phrases from Greeting Topic
As you can see from Fig 1.6, in the Test bot section, you can go ahead and add any trigger phrase from the greeting topic to invoke the greeting topic, Once it gets invoked user will receive the messages added as a conversation from a bot.
If you can see the magic, till now we haven’t written a single line of code and we already have a greeting bot ready with us.
That’s the power of Power Virtual Agent Bot.
Now, let’s go ahead and make some changes to our greeting topic.
In Fig 1.7, as you can see, I have modified the messages and added a variable User.DisplayName to get the logged-in username to make the conversation more personalized. Don’t forget to save the topic.
Fig 1.7 - Added messages with logged in user context
Now when you test your bot, it will answer your conversation with your account username. Amazing isn’t it ๐
Fig 1.8 - Test bot with logged-in username
TIP: To display logged in user name and user id, in left navigation go to Manage > Security > Authentication & make sure (Only for Teams) is selected, if not change it and save this setting as shown in Fig 1.9
Fig 1.9 - Change authentication to use variables in topic
Once you make that change, you can go ahead and use the below shown variables from Fig 1.10 in your message conversations.
Fig 1.10 - Show Variables for logged-in user in message conversation
I hope this simple kick starting of Power Virtual Agent Bot will help you get started with Greeting conversation and how you can show converse with messages without using a line of code.
In the next series of articles, we will learn in more depth about adding questions to your Bot and taking the conversation a step further.
Stay tuned for my upcoming articles on PVA series. I hope you will enjoy making chat-bot with me.
Keep Reading, Keep Sharing!