Announcements
Hi,
I’d like to use my SharePoint List Items as dynamic Multi-Choices in the PVA chatbot. So I tried the unified canvas(preview) but I have to create bot in the production type.
So is there any possibility to get SharePoint List Items and use dynamic multi choices as in the ask question PVA chatbot? Please let me know if there’s any way to solve it.
Thanks
I really should work through issue before posting. Fixed it by using the parsing formula in the question action, per the tutorial.
Getting closer, but still one bump in the road. I'm getting an error in the question action that utilizes the list of values. "Variable is being set to an incorrect type. Assigned: Record, expected: Table. There is an error: 'MissingDisplayName"
When selecting the variable to assign response to, it auto-selects record type, so I cannot change/choose it. See screenshot.
Any help is greatly appreciated.
@darylvogan wrote:Oops, if I click the ellipses in the top of the card and click "Refresh", it reloads and recognizes the parameter as string.
Indeed there's a transient error - it's mostly a UI glitch that goes away after a refresh
Oops, if I click the ellipses in the top of the card and click "Refresh", it reloads and recognizes the parameter as string.
When I try this, I get this message:
"There is an error: 'BindingKeyNotFoundError'". Seems that it doesn't recognize the parameter being return from Automate to be a string.
Any ideas?
nice job
Thank you so much @HenryJammes for the clear explanation. In the unified authoring canvas itself there’s a set variable option or fx, which helps for dynamic values where in the production type there’s no option we need to use the flow and BFC. I really appreciate it, this is very helpful to us.
PVA unified authoring canvas to display dynamic choice options
In this second answer, I use the unified authoring canvas to provide an example on how to present a chatbot user with dynamic choice options that are retrieved from an external data source. I use Dataverse in this example, but using SharePoint would be similar, as we retrieve the data with a Power Automate cloud flow and pass the data back to Power Virtual Agents.
In my scenario, I want to display a list of stores that are available for a given city.
In Power Virtual Agents, using the unified authoring canvas:
Next, I add a "Call an action" node and choose "Create a flow".
I then create a new cloud flow to look for the list of stores for a given city.
In Power Automate:
Still in Power Automate:
Back in Power Virtual Agents:
I return to my Power Virtual Agents "Store Locations" topic, and under "All other conditions", I add:
And that's it.
The list of options presented to the user is dynamically generated from a Power Automate cloud flow:
PVA + Bot Framework Composer to display dynamic choice options
In this first answer, I will provide an example on how to present a chatbot user with dynamic choice options that are retrieved from an external data source. I use Dataverse in this example, but using SharePoint would be similar, as we retrieve the data with a Power Automate cloud flow and pass the data back to Power Virtual Agents.
The first thing you'll want to do is retrieve the data from your external source.
In my scenario, I want to display a list of stores that are available for a given city.
So, I create a new topic called "Store Locations", give it a few trigger phrases, and add a Question node to ask the user "What is your city"?
I use Power Virtual Agents' default "City" entity to automatically extract the city from a user utterance.
I also save the response as the "UserCity" variable and update the variable to make it global, so I change its scope to "Bot (any topic can access)". This is important for the rest of my demonstration because I will also pass that value to a Bot Framework Composer dialog.
I then create a new cloud flow to look for the list of stores for a given city.
In Power Automate:
Still in Power Automate:
Back in Power Virtual Agents:
I'm now going to move over to the Bot Framework Composer.
In Bot Framework Composer:
I return to my Power Virtual Agents "Store Locations" topic, and under "All other conditions", I add:
And that's it.
The list of options presented to the user is dynamically generated from a Power Automate cloud flow:
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.