메인 페이지로 이동하기

Quickly build a Microsoft Teams FAQ bot with Power Virtual Agents

In the current challenging times, there are a wide range of circumstances organizations experience that require communication tools to be created and deployed efficiently to help employees with their remote work needs. This blog post walks you through a Microsoft Teams FAQ bot that is pre-installed by an organization admin to help onboard new employees and support their remote office setup needs.

This bot can help address common questions from employees such as new employee orientation dates.  It can also notify human experts for requests that require human intervention, for example, getting ergonomic furniture for their remote office. The bot is deployed on Microsoft Teams so it is available to everyone in the organization. You can sign up for the Power Virtual Agents trial version to create a bot (trial is free for 30 days and currently extendable after 30 days). This blog walks you through an example with guidance that you can expand for other scenarios. The key goal of this blog is to help you get a Microsoft Teams bot deployed quickly to meet employee needs.

Employee Experience

An employee who has just joined Contoso asks a few questions related to office reopening, new employee orientation, and uploading documentation.

Then, he moves on to ask for support with special accommodations, specifically ergonomic furniture. The bot needs to connect him with an HR expert to understand the situation better. The bot gathers some information to create a request ticket and submits it to the Onboarding channel in Teams where HR experts can see the request and handle it.

Since there is a longer than normal wait time today, the employee checks his request status with the bot to make sure it is still active.

An onboarding expert sees the notification in the Expert assistance channel in Teams and reaches out to the employee. After helping the employee out, he returns to the Expert channel and closes the ticket.

The employee can also check the status of his requests again and confirm that it has been closed.

Building the bot

Let’s switch to look at what it takes to build this bot.

First, to address the onboarding questions like ‘when will the office reopen’, ‘how will new hire orientation work’, ‘where should I submit my paperwork’, the bot has a topic for each of these questions, but the bot author did not have to create each of these topics manually. Using the built-in topic suggestions feature, you can bring in existing FAQ content into the bot with a few clicks. The AI assisted authoring capabilities in Power Virtual Agents makes this very easy to do. Watch the video and read more about bringing FAQ content into your bot here.

Let’s take a look at the ‘Special Accommodations’ topic. The branching condition for ‘Ergonomic Furniture’ in this topic redirects to the ‘Escalate’ topic which notifies the HR experts.

The ‘Escalate’ topic is where the ticket for the user’s request is created and the Expert channel is notified.  It uses the user’s sign-in info to know which user has requested for assistance. After gathering the title and description of the user’s request, it leverages one of the most powerful capabilities in Power Virtual Agents to embed Power Automate flows in a topic for the bot to take action during a conversation. The ‘Escalate’ topic uses two Power Automate flows.  One to create the request and the other to notify the experts in the Teams channel.

Let’s look at the request creation one first.

Power Virtual Agents passes in parameters from the bot (employee’s name, title, and description) to create a request using the ticket entity.  This utilizes Power Platform’s built-in Common Data Service (CDS) database. The built-in Power Automate CDS connector ‘Create a new record’ action creates a new ticket record in CDS. The request details are filled by using dynamic content passed in from Power Virtual Agents. Once completed, it returns the request ticket reference to the bot for using further down in the conversation.

Now let’s look at the second Power Automate flow that notifies the experts in a Teams channel.   The flow has a parallel branch to allow the bot’s conversation with employee to continue while waiting for an HR expert to close the request.  It uses Power Automate’s Microsoft Teams connector ‘Post an Adaptive card to a Teams channel and wait for a response’ action to send the employee’s request to the Expert channel.  When the expert takes action on the adaptive card, it uses the request ticket reference passed in by Power Virtual Agents to mark the corresponding request inactive and logs the expert’s name via CDS connector’s ‘Update a record’ action.

One of the great benefits of using Common Data Service to store the request ticket is that it keeps all the records.  This allows the organization to audit the request history.

Making the bot available on Microsoft Teams

Once the bot is ready and the author is satisfied with its quality, he can publish the bot with one-click to make the content available to end users. To make the bot discoverable in Teams, generate the Teams app package with the bot’s app ID following the steps outlined in the documentation here.  As an admin, you can upload the package to Teams tenant app catalog or utilizes Teams Admin center to pre-pin the bot for all employees.  This way new hire employee can easily find the bot on their left app bar in Teams.

Let’s recap what we have seen:

  • PVA bot can be deployed in Teams to make it reachable by employees of an organization
  • PVA bot can conversationally resolve an employee’s issue in Teams using native Teams chat experience
  • PVA bot can escalate to the expert channel in Teams and create a request ticket using Power Automate
  • PVA offers a no-code/low-code way to quickly create a conversational bot
  • PVA and Power Automates’ easy integration for bot to take action during a conversation

The great thing about this low-code bot making experience is that it is easy for subject matter experts to come back and modify the bot if content ever changes or new information needs to be added.  Truly empowering your organization’s subject matter experts to digitally transform their modern workplace conversationally.

Happy bot building!