Recently we developed and published a chat bot in Power Virtual Agents for Teams (PVAforTeams). I would like to share my takes and lessons learned with you.
#1 Easy to edit, fun to work with
Bots in PVAforTeams are no-code solutions and provide a comprehensive graphical interface. Developers, analysts, business representatives can work together on defining topics, user flows. It has been really fun to shape the bot in a group - with a lot of laughter and interesting discussions about users’ work habits and how users search and find information. This is how the simplest topic looks like: Greeting:
#2 Included in your Office license
If you have E3 license, you can use it, just head to Teams, add and open “Power Virtual Agens for Teams”, start a new bot and you’re good to go. Behind the scenes a new Dataverse for Teams environment gets created, it happens automatically and you might never need to dig into it, but it’s good to know in case you want to finetune its permissions or other settings, and also beware of the limitations that the DataVerse for Teams has, but more on that - in another lesson learned (down below).
#3 Support for Swedish
Yes, finally Swedish is supported, among many other languages. The chat bot understands the Swedish declension and synonyms quite good. E.g. it understands “strul” even we only designed it to get “problem”, it knows that “beställa” is just another form form “beställ”, it also can understand misspelled words! Native support for Swedish is crucial for our business in Sweden. In the Azure Bot Framework you rely on LUIS to interpret users’ messages, there is no support for Swedish (as of writing - 2022-02-14). Of course, we could go outside Azure, or rely more on commands/keywords rather than creating more natural conversations, but) A no-code solution is in this case a way more advanced than a coded one.
#4 Publish to a broader audience
First I thought, the chat bot was only for the actual team where it was started. Fortunately, it is more than that. We published it in the whole organization successfully. This means, the members of the original team can develop the bot, and other users can talk to the bot without being member of the team.
#5 Add the chat bot to your existing Teams app
When publishing your chat bot you have the option to download and upload a teams app package. This might be your choice. Though, in our environment we already had an app in Teams for news, tips and tricks etc. It is pinned for all our users. (There is a caveat with adding a bot to pinned app - more on that later.) Anyway, we wanted to enhance our existing Teams app (called “Smart”) rather than introducing another one. This is totally possible. Just update your app, add a bot and copy the bot id of your new chat bot.
#5 The chat does not need to be the first tab
First when we added the bot to our existing app, the chat appeared in the first tab. That meant everybody would start with a chat. Our intention was to still have our existing welcome page (static tab). Now (since a while, since manifest schema 1.7 to be precise) it is possible to change the order of the chat and static tabs easily.
You can rearrange the order of tabs by adding a static tab with the entityId
conversations where you want the chat to appear. If you don’t do it will default to the first place. And the last tab, the About tab is always the last one. More info on MSDocs:
#6 The bot starts talking to people by itself
Yes, that happened to us. Besides putting the chat after our welcome page, we wanted to launch the bot quietly and keep working on the topics and the bot experience. When we installed the new version of the app, the bot started to introduce itself to every user. Every user who had pinned the app, meaning all our users because the pinning was done by an app setup policy. Some groups of our users were not in the policy and they did not receive chat message from the bot. The behaviour where a bot starts talking to you by itself must be related to the fact that you have the teams app containing the bot pinned in your Teams menu.
#7 All team owners can edit the bot
By default, the security is simple, the owners of the original team can make changes to the bot. I suppose you can change the permissions in the DataVerse environment created for your team.
#8 Count with delays after publishing
There is a delay in propagating a new version of a teams app after publishing. It can take up to 24 hours, I think. There is also a delay getting the new changes after publishing and re-publishing the bot. It is said that after 30 minutes of user inactivity the bot session is reset, but I experienced it required more than 30 minutes to get the new changes of the bot. Impatient users/admins can type “börja om” (en. start over) to get the new version of the bot. But all the other are advised to keep calm and await the news.
#9 Beware of the limits of PVAforTeams
PVAforTeams is a good start, and maybe it will always be sufficient in many scenarios, but there is a chance that you will need to upgrade. The following limitations apply (as of 2022-01-27):
- A bot can have a maximum of 250 topics
- A topic can have a maximum of 200 trigger phrases
- 10 sessions per user and 24h across all bots in a tenant
- Maximum 2GB of data (or 1 million rows)
- No Azure connections, APIs, datalakes, event hubs
- 2000 Power Automate Requests every 24 hours
- Only 1 Dataverse environment in a team (Dataverse is where a bot lives)
If you hit the limits you can upgrade to Dataverse or switch to code based Bot Framework, but it definitely can work for many real world scenarios.
#10 Add predefined commands
Your bot might be smart and understand much, but for users it is not obvious what it can do. To guide people and encourage exploring, you can add commands, pre-defined trigger phrases.
#11 Learn from users’ conversations
This is maybe the most important lesson learned here, and in every other software development - how one can learn and adopt the software. Users’ sessions (= conversations with the bot) is a hidden gem. Well maybe not as hidden, but I could not find right away. There is a section in the bot within Power Virtual Agents, where you can download users’ session and see their inputs. Everything is anonymized (good from privacy point of view). Though you can see all the questions the bot has got and you can use it for further development of it. Maybe adjust the trigger phrases, clarify the purpose of the bot. It definitely needs to be specialized, at least in the beginning.
Power Virtual Agents for Teams is a fun way of discovering the chat bots, they are included in the Office license, the no-code nature of it brings together devs, citizen devs, content administrators. The distance from an idea to implementation is close to zero. In our bot we are working on a new way of utilizing the FAQ and the manuals. There are still areas to discover, such as suggesting topics and power automate connections.
What are your findings/insights/thoughts from Power Virtual Agents for Teams? Come into discussion by sharing and commenting my post on LinkedIn or Twitter.
There are more lessons learned. I am not sure if I write them here or in a separate blog post…
- Sending proactive messages and the need of the original bot app
- Knowing the user (name and id)
- Utilizing Power Automate to integrate with other systems.