At Power Platform Saturday, Sydney conference, I presented this session “DJ Bot, the bot who spins Dad Jokes” with my son Dinel to a group of smart and enthusiastic young people. This blog post series is based on learnings from building a conversational bot using Microsoft’s Power Virtual Agents and Power Automate products to spin dad jokes. This is Part 2.
Check out the first article of this series – DJ Bot, the bot who spins Dad Jokes – Part 1 – Overview
The Design
The design of the DJ bot includes 3 products.
- Power Virtual Agents – This is the bot.
- Power Automate – A workflow tool with hundred’s of connectors to design logical flows. This is used to extract jokes from a storage location.
- Excel Online – In this solution, I used an Excel file saved in Excel Online to store my dad joke database.
The high-level design of the solution is as follows.
In this design, I have created 4 Topics.
- Start – This kicks off the bot when the user types a greeting such as “Hi” or “Hello”.
- Tell a joke – This topic is the core topic which will;
- Ask the user if they would like to hear a joke
- Fetches a joke
- Display the joke
- Get user input
- Display the punch line
- Loop – PVA doesn’t allow redirecting to itself. To create an infinite joke loop, I redirect the “Tell a joke” topic to “Loop” topic and then redirect “Loop” topic to “Tell one joke” topic.
- Goodbye – If the user clicks on “No” button when the question was asked, “Would you like to hear a joke?” or if the user types “I’ve had enough”.
Navigating PVA
Let’s have a quick look at some of the key components of the interface.
Menu
Left navigation menu allows you to create/update Topics and Entities, see how your bot performs using Analytics, and publish and manage channels.
Test Bot
The Test Bot is a fantastic feature. This allows you to test your design as you build. If you can’t see the Test Bot, click on the purple bot icon on the bottom left corner. Make sure to enable “Track between topics”. If you bot has redirections to other topics or based on user input the topic changes, when testing the bot the interface moves between topic designs and marks the executed step as the conversation flows.
See the testing in action.
Authoring Canvas
Authoring Canvas is the design interface. This is where you design the conversation of the bot. Designing a Power Virtual Agent (PVA) bot is super easy. PVA provides a tool called Authoring Canvas. This is easy to use the no-code design interface to design the conversation flow of the bot. Testing the bot is as easy as designing. As you add new steps, you can test the bot within the same window. Note: Please make sure to hit the “Save” button as you go.
Adding a step
To add a new step, click on the “+” button. If you want to insert a step in between two steps, hover over the line between the steps (closer to the top step), the “+” button will appear.
Topic – Tell one joke
Tell one joke topic is the engine of the DJ Bot. See the design of the topic below.
In the next articles, I will demonstrate how I integrated Power Virtual Agent with Power Automate.
DJ Bot, the bot who spins Dad Jokes – Part 3 – Integrating Power Virtual Agent with Power Automate
References
Docs – Key concepts – Authoring Power Virtual Agents bots – https://docs.microsoft.com/en-us/power-virtual-agents/authoring-fundamentals
Thank you for visiting Dyn365Apps.com.
Follow me on Twitter – Follow @dyn365apps
Until next time…
About the Author
Nadeeja Bomiriya is a Microsoft MVP, Chapter Lead – Dynamics 365 and Power Platform Saturday – Australia, Sri Lanka, Committee Member – Melbourne Dynamics 365 User Group, Technical Architect, and Dynamics 365 Practice Lead who lives in Melbourne, Australia.
Disclaimer: This blog post contains opinions of my own and not the views of my employer.