• Skip to main content
  • Skip to primary sidebar
  • Skip to footer
  • Home
  • Blog
  • Power Platform
    • Power Apps
    • Power Automate
    • Power BI
    • Power Virtual Agents
  • Dynamics 365
  • Azure
  • About Me
Joe Gill Logo

Joe Gill

Microsoft MVP - Power Platform Consultant

Home » Power Platform » Build a Bot with Power Virtual Agents, Flow and CDS

Build a Bot with Power Virtual Agents, Flow and CDS

25th June 2019 by Joe Gill

This post demonstrates how easy it is to build a Bot using Power Virtual Agents. The Bot will call a Power Automate Flow to return data from CDS and display it to the user. Power Virtual Agents is part of Microsoft’s push to democratize AI and it allows Bots to be created using a Flow like designer without any code.

Build a Bot with Power Virtual Agents, Flow and CDS Joe Gill Dynamics 365 Consultant

Step 1: Create Topics with Power Virtual Agents

Power Virtual Agents is incredibly easy to use and you create Topics for you Bot to interact with users. A Topic is a conversation path that is triggered when the user entering a phrase. In my case I created a Topic called Order that gets triggered when users enter phrases such as “where is my order”. The Topic editor can be used to design the conversation flow and in my conservation I prompt the user to enter their Order No and save it in a variable called OrderNo. I can then pass the OrderNo variable to a Flow to return the order details from CDS and display it to the user.

Build a Bot with Power Virtual Agents, Flow and CDS Joe Gill Dynamics 365 Consultant

Step 2: Call a Flow from your Topic

To call a Flow from your Topic you first need to add your Flow to the Common Data Service Default Solution in the CDS environment that Virtual Agent is configured to use. Select + Action option to call a Flow from your Topic.

Build a Bot with Power Virtual Agents, Flow and CDS Joe Gill Dynamics 365 Consultant

Step 3: GetOrderDetails Flow – returns order details to Virtual Agent

Only Flows that have a response object are displayed can be called from the Topic designer. My GetOrderDetails Flow has a request schema that accepts a single parameter called OrderNo and a response schema that returns a Json object contains the OrderDetails and DeliveryDate. The Flow use the CDS connector to search the orders entity for an order with the orderNo and populates the response object with the retrieved details.

Build a Bot with Power Virtual Agents, Flow and CDS Joe Gill Dynamics 365 Consultant

Step 4: Take the output from the flow and display it to the user

Once the flows complete I can take the output from the flow and display it to the user. I did try and use a collection of objects so I could show all orders for a user but I could not get this to work.

Build a Bot with Power Virtual Agents, Flow and CDS Joe Gill Dynamics 365 Consultant

Once your Topic is complete you can test it directly from the designer window making sure your select the “Start Over with Latest Content” option first. You can also select the Deploy option to generate the HTML code to embed the bot in your own web site. When I trigger my Bot I can now enter a valid Order No returning the order details.

Power Virtual Agents has simplified the creation of Bots without the need for any technical skills. Using Power Virtual Agents in combination with Power Automate allows you to build Bots that interact act with back-end platforms without any code. Virtual Agent is currently in preview so there is not pricing information available yet. You can sign up for the preview here.

Share This On Social:
  • Tweet
  • Build a Bot with Power Virtual Agents, Flow and CDS Joe Gill Dynamics 365 Consultant

Filed Under: AI, Power Automate, Power Platform, Power Virtual Agents Tagged With: AI

Primary Sidebar

Popular Categories

  • Power Platform
    • Power Apps
    • Power Automate
    • Power Virtual Agents
  • Azure
    • Logic Apps
  • Dynamics 365
  • .NET
  • AI
  • SQL

More to See

Power Platform Requests – Base Request Capacity

17th December 2020 By Joe Gill

Power Automate Desktop

Power Automate Desktop – UI Flow

26th November 2020 By Joe Gill

extract table from pdf and write as csv file using Power Automate Desktop

Extract Tables from a PDF using Power Automate Desktop

23rd May 2022 By Joe Gill

Dataverse Anonymization

25th April 2022 By Joe Gill

Tweets

Footer

Joe Gill

Microsoft Business Applications MVP – Power Platform, Dynamics 365 and Azure.

An architect with over twenty years experience designing and developing technology solutions. Specializing in the Microsoft technology stack including Power Platform, Dynamics 365 and Azure. Microsoft MVP Profile

Connect on Social

Useful Links

  • Home
  • Blog
  • About Joe Gill
  • Power Platform
  • Dynamics 365
  • Azure

Featured Posts

Power Platform Requests – Base Request Capacity

Power Automate Desktop – UI Flow

Synapse Link for Dataverse – Metadata

Extract Tables from a PDF using Power Automate Desktop

Dataverse Anonymization

Dataverse Metadata in Synapse

© 2022 · Joe Gill