In these odd days of quarantine, I have spent a lot of time talking to my parents to convince them to stay home or just finding ways to keep them entertained. My mom loves this quarantine life and never has a need to leave but my dad is a bit of a different story. So, I thought I should use Power Virtual Agents to create a virtual daughter for them to chat with, because this is our new normal now. While it wasn’t super successful in occupying my parents, it turned out to be a great learning opportunity for me.
What I did
I built a simple bot that asks a few questions and then responds to them accordingly. It will first confirm which parent it is speaking too then asks that parent simple question specific to them. The text is analyzed so the bot can respond correctly to their questions. Next, it gives them an opportunity to talk about their day and emails me the details. Finally, it asks if they want to talk to me and gives the opportunity to schedule an appointment (with my approval of course!).
I learned a lot in this experiment but there are a few things I want to talk through specifically in this series:
- How to get started
- Connecting to Power Automate and using Sentiment Analysis
- Using Power Automate to kick off approvals and other actions
- Review the session data
Let’s jump right in!
Where to Start
Before creating the bot, I would suggest creating your Power Apps trial or Dynamics trial first. This is because you need a CDS environment with a database. You can create this when you create a new account on the Power Virtual Agent site but that requires a work address and does not have the option to use a personal email to set up a developer trial.
If you already have a tenant available, then you should create a fresh environment to ensure no unwanted interactions. This tip is courtesy of Éric Sauvé who also assisted me through the next bit.
Next go to the Power Virtual Agents site where you can sign in and it will guide you in creating your first bot. Make sure you sign in with the login credentials for the trial or environment you just created.
On the first page you will enter the bot name and then you should expand to choose the correct environment.
You will need to wait as everything gets provisioned. A bar at the top of the screen will tell you the current progress. This was the hardest part for me as it took a few tries for my bot to provision correctly. The hardest thing was patience!
When it is done provisioning you can jump right in! The trial bot is created with some sample topics so you can even test the functionality before building anything.
Editing Your Greeting
I got started by going to Customize Greeting. This will take you to the Greeting Topic that will trigger the bot. This shows you the trigger phrases, aka what people type in to get on this path and a visual representation of the logic and flow.
Some logic and messages are already built in and you can customize these to sound like you or remove them entirely.
Then after those messages you can simply add your own messages or questions. I added a question with multiple choice answers. The tool will automatically add branches for each possible response, then you can keep building from there.
For my simple use case, editing the Greeting worked for me. However in a real-life scenario you may have more potential paths than a multiple choice answer, so that’s when you would use more topics. This will be outside of the scope of what we are covering right now.
The process is a little more involved and these are just the steps to get started. Come back tomorrow to hear about the other types of answers I requested and how I acted on them with Power Automate.
One thought on “Quarantine Chat Bot: Let’s Build a Virtual Agent!”