Our use of cookies

We use cookies to tailor your experience, gather analytics, and provide you with live assitance. By clicking "Accept" or continuing to browse our site you agree to the use of cookies. For more details please read our Cookie Policy.

Create a Power Virtual Agent and integrate it with a SharePoint list

by Danish Ali Detho | O365 & Power Platform Solution Architect

Introduction

Virtual agents and bots have become an essential part of customer support in every business. It provides the fastest way to provide the information a customer is looking for without waiting for a customer support agent or searching through a website. They can cover large no of use-case scenarios including providing product information, helping with flight/hotel bookings, or tracking orders.
Today we will take a look at how easy it is to create a Power Virtual Agent and integrate it with a SharePoint list using PowerAutomate Flow.

Microsoft bot framework provides the capabilities for developers to create a bot using programming however Microsoft has recently introduced something for business users to create virtual agents to solve business problems in the form of Power Virtual Agents. Power Virtual Agent is the newest addition to the Power Platform family and is very much focused on the same type of low-code, accessible to everyone from business users to the professional developer in order to provide a platform for building conversational agent that’s AI-driven, tightly integrated with other platform components and can actually solve real business problems.

Scenario

Create a power virtual agent that provides information about the total price and total current stock of the product requested by the customer.

SharePoint List

First off, let’s create a product list that will hold the data of the products with the following fields.

Product list

Columns

  • Title (Single Line of Text)
  • Unit Price (Money)
  • Current Stock (Number)

Create a Power Virtual Agent

Let’s open the power virtual agent studio using the link https://powerva.microsoft.com/ and sign in.
Note: You can signup for a free trial to try it out.

Open bots panel and then click on new Bot. Enter name, select language, and Environment and then press create. This will spin up a new power virtual agent bot.

Note: It takes few minutes for the bot to setup.  

Once the bot is created, we need to define a topic and add some phases. The topic is a way of separating different jobs a bot can perform and phases are used to activate a specific topic. Bot can switch between various topics and a topic is triggered by a phrase. So, let’s add a topic “Search Product” and some common phrases.

Next step is to define the flow of conversation in the authoring canvas. This is where you will define the actions and responses of our bot and the questions to ask the user for information.

Let’s ask the user which product he is looking for and then save it in a product variable. Add a question on the canvas.

Now we will use “Call an Action” to call a PowerAutomate Flow for fetching the items from the SharePoint List. ProductName will be used as an input. In the flow, we will use GetItems with the FilterQuery Title eq ‘ProductName’ to get the items based on the user input and then return the items count and results back to bot.

Note: To get item count use the following expression length(body(‘Get_items’)?[‘value’])

Now we will concatenate the results using a compose action and the following expression concat(item()?[‘Title’],’ – ‘,item()?[‘UnitPrice’],’ – ‘,item()?[‘CurrentStock’]

Power automate flow will return two variables to the power virtual agent containing the item count and the results. Now we will use condition to check if Count =0, then inform user that no products are found and start over again. If Count > 0 then show the results.

Now our bot is ready for testing. We can test the bot in the chat window on the left.  You will notice that the execution of the flow of conversation is visible in the authoring canvas as well.

Summary

In this article, we covered the basics of the power virtual agents and how easy it is to create a bot that can serve as a virtual agent to provide information to the customer. We then implemented a search product scenario where the user can search for product pricing and stock from a SharePoint List using a power automate flow.

 

 

Latest articles

Harnessing the Power of Microsoft CoPilot in Power Automate Flows: A Comprehensive Tutorial

25 Mar 2024

In the ever-evolving landscape of technology and business automation, Microsoft has introduced a game-changer that is set to revolutionize how we […]
[read article]

Embracing AI: Transforming Jobs and Unlocking New Opportunities (Claude 3 Opus version)

18 Mar 2024

The rapid advancements in Artificial Intelligence (AI) have sparked both excitement and fear among workers worldwide. Many people are concerned that […]
[read article]

The Evolution of Work in the Age of AI: A New Era of Collaboration (ChatGPT 4 version)

18 Mar 2024

In the annals of human progress, pivotal inventions such as the steam engine, the tractor, and the internet have revolutionarily altered our way of […]
[read article]

AxioWorks Newsletter February 2024: Partnerships, Upcoming SQList Update, and Summit Invitation

27 Feb 2024

Hello Reader, This February has been pivotal for AxioWorks as we’ve focused on laying strong foundations for the year. Here are the key […]
[read article]

How AxioWorks SQList Aligns With the Priorities of Software Buying Decision Makers

26 Feb 2024

As outlined in the “2024 Global Software Buying Trends” report by Gartner Digital Markets, the criteria that predominantly influence […]
[read article]

Maximising Power BI Reporting from SharePoint: The Strategic Advantage of AxioWorks SQList over Native Connectors

15 Feb 2024

In today’s data-driven environment, making informed decisions rapidly can offer a significant competitive edge. This is where Power BI comes […]
[read article]

AxioWorks Newsletter January 2024: A Promising Start to the New Year!

29 Jan 2024

Hello Reader, We hope this newsletter finds you well and thriving. At AxioWorks, we are embracing the new year with great enthusiasm and are […]
[read article]

Exciting New Partnership and Innovative SharePoint Tools from AxioWorks and Lightning Tools

17 Jan 2024

AxioWorks is excited to announce a strategic partnership with Lightning Tools, a leader in creating innovative SharePoint components. This […]
[read article]

AxioWorks Newsletter November 2023: ESPC23, new partnership, and SQList update!

30 Nov 2023

Hello Reader, Welcome to this month’s edition of the AxioWorks newsletter! We’re thrilled to bring you updates on our recent […]
[read article]

Why Support Legacy SharePoint Versions Like SharePoint 2010?

16 Nov 2023

In the fast-paced world of technology, where new versions and updates are continuously rolled out, a recurring question often arises: “Why […]
[read article]

Get SharePoint and SQL news to your inbox

Stay up-to-date with industry news and trends, SQL and SharePoint innovations and all the latest from AxioWorks by subscribing to our monthly newsletter.

Subscribe to the AxioWorks newsletter

*