
One of the most powerful parts about Power Virtual Agents is the utilization of Power Automate to essentially let you connect your bot to a multitude of sources, where you are able to pull, push, and process information from/to your chatbot. However, these flows often take several seconds to run, and during this time, it may not be clear to your end user that your bot is still processing their last message.
The Solution
The solution is quite easy for bots built in PVA 1 (legacy PVA canvas). If you’re looking for the same effect in PVA 2 (new unified canvas), this functionality is not yet available, but will hopefully come in the future, at which time I will update this post.
While we wait for the typing animation in PVA 2, here are the steps you can take to enable this feature in a PVA 1 bot:
- Open you bot in Power Virtual Agents
- Navigate to “Topics”
- Click on “New Topic” -> “Open in Bot Framework Composer” (this opens your bot in Azure Bot Framework Composer, which you’ll be prompted to install if you have not already done so)
- Upon opening your bot in Bot Framework Composer, you’ll be prompted to select a local folder on your computer where your development files will be kept
- After your bot is opened, you’ll want to select the “Configure” option in the left-hand menu of Bot Framework Composer (denoted as a wrench)
- Toggle the “Advanced Settings View (json)” tab in the top-right corner of the “Configure your bot” window to on
- Add the below code inside the { } settings of the bot (the runtimeSettings is a root-level value inside the configuration), ensuring you add a comma before or after, depending on where you place it (you can add this directly after the initial { if you wish, but be sure to also verify your settings don’t already have the runtimeSettings / features values, as you’ll need to nest the showTyping value accordingly inside your existing configuration if so)
- Switch to the Publish menu in Bot Framework Composer (denoted by a cloud and up arrow)
- Check the box next to your bot’s name in the “Publish your bots” screen and select “Publish selected bots” at the top of the screen
- At this point you’ll be able to see the typing animation inside of the PVA Test UI, but you’ll have to publish your bot to see it on other channels such as Microsoft Teams
"runtimeSettings": {
"features": {
"showTyping": true
}
}
Important Note:
While this process is relatively easy to complete after you’ve installed Bot Framework Composer, it exposes you to the two-way publishing that occurs between PVA and Bot Framework Composer, and it’s likely at some point after you’ve done more updates in your bot in PVA, that Bot Framework Composer will be unable to republish changes due to it being out of sync, at which time it will prompt you to download the latest version of the bot (done by using “Pull from selected” profile – similar to Step 9 above) inside Bot Framework Composer. Unfortunately, upon doing this, you will notice that your above runtimeSettings will be overridden and you’ll have to follow the above directions again. This is an easy step to miss and one I wanted to point out since it’s not obvious that you’ll have to reapply this configuration anytime you sync your bot from PVA back to Bot Framework Composer.
As always, I hope this post has helped!
Cheers,
Matt