In this blog, we will look at how a Power Virtual Agent can lookup data in the Dataverse and answer questions intelligently to the person it is chatting with. We will go through a simple example where we display account data to the bot’s chatter.
First, let’s create a new virtual agent in the Dataverse environment we want to look up data. Go to https://web.powerva.microsoft.com/environments/ to access your bot. Then go to Topics and create a new topic:
Give the subject a name and any key words or phrases after that. The trigger phrase will be “Show me all accounts,” and the topic will be “All Accounts”
Next Click on +symbol after that Click on call an action Select an Action in that Create a Flow As shown in the Below screenshot
This takes us over to Power Automate to create the flow
For this example, there are no inputs. Click to insert a new step, and select the List Rows Dataverse connector. For this connector, we will select the Accounts table, without any filtering
Next, let’s create a variable called thetestone. We will be appending to this variable all the thetestone from our Dataverse connector. Leave the initial value as blank
Now, let’s add an Apply to each control, and inside the control we will add an Append to string variable action. The input is the value from List Rows, and we can then pick the thetestone variable and set its value to the thetestone Name from List Rows. Note we are putting a blank line after the thetestone Name so it looks cleaner on the output
Finally, we will populate the step to output the thetestone list to the PVA. We will set the name of the output variable here to thetestones
Save the flow and go back to the PVA authoring canvas. We now have the thetestones variable.
Now let’s test the bot. Type in “show me all accounts” and we get back all thetestones from our Dataverse!
For any Help or Queries Contact us on info@crmonce.com or +918096556344.
November 6, 2024
November 5, 2024