Connect Teams Users to PureCloud Help Desk Agents with Azure Bots

June 8, 2021

Post by

Eric Grover

Teams is Now the Primary Communication Platform for Enterprise Users

Because of the COVID-19 pandemic, almost every organization’s digital transformation has accelerated to support remote work. By September 2020 the number of daily active Teams users had reached 115 million, an increase of 100 million compared to the previous year. In dramatic fashion, Teams has quickly become the primary tool in which most enterprise users communicate. It makes sense then that organizations would want to enable their employees and end users to get support without having to add yet another tool or website to the expanding list of applications used daily.

Help Desk Agents Want to Avoid Switching Between Tools

Help Desk Agents are most efficient when they can remain in their primary communication channel. Support centers often use all-in-one contact center solutions like Genesys PureCloud to facilitate the communication coming into a call center. This tooling provides metadata about call volume, wait times, and other metrics that help the organization manage the quality and cost of end user support. Chatting with end users via Teams rather than PureCloud would force a Help Desk Agent to switch contexts – making it difficult to keep all the aspects of a user interaction tied together.

Let Users Chat in Teams and Help Desk Agents Work in PureCloud

Fortunately, it is possible for have our cake and eat it, too. We recently helped one of our clients to create an experience where both end users and Help Desk Agents can remain in the tools where they are most productive. By creating a custom Teams Bot, we supplied users a multi-tier support tool that provides automated assistance for common issues and questions and provide a transparent escalation integration between Teams and PureCloud. The result? Connecting users and live agents in a chat conversation, and they never have to leave their preferred application!

How Do You Bring the Two Worlds Together?

The Big Picture

By leveraging Azure PaaS services (like the Azure Bot Service), we built a root AI bot that utilizes Azure’s Cognitive Services (LUIS and QNA Maker) that offers solutions to common issues and answers to common questions. By creating a separate skill bot triggered by a custom LUIS intent, we can escalate and proxy conversations between Teams and PureCloud without the end user knowing that the live Help Desk Agent is communicating via another tool.

Let’s break down the steps for building this type of solution.

Building the Solution

Create a Root AI Bot with Microsoft Bot Framework Composer

Microsoft Bot Framework Composer is a free tool that allows a developer to create AI bots. It brings together the capabilities of Azure AI to enable:

  • Language Understanding
  • Language Generation
  • Q&A Pairs
  • Adaptive Dialogs

Create Dialogs for Common Requests

To increase your return on investment, first obtain data on the most common issues where end users contact support for assistance and provide an automated solution to the user so they can get help without speaking with a live agent. Some common examples include password reset and instructions for common HR tasks such as expense submission and time keeping procedures.

Import FAQs and Knowledge Bases into QNA Maker

Your organization may already have web-based support content such as FAQ pages or knowledge bases; use these to make your AI bot smarter. Azure QNA Maker can crawl these types of content sources and automatically generate QNA Maker knowledge bases that the bot can query.

Create a Skill Bot to Facilitate the Integration with PureCloud

Escalating a conversation to a live agent will require you to extend the root AI bot that you created in Bot Framework Composer. First, you will have to export a custom runtime from within Composer so you can create a custom action to reset your transcript history. 

Next, you will need to create a separate skill bot that your root AI bot can use to hand off the conversation when the end user requests a live agent. This skill bot will handle initiating the conversation with PureCloud, transferring the conversation transcript, and proxying messages back and forth between the user and the live agent. Messages from the user are posted to the PureCloud web chat API, and messages coming back from the agent come across a web socket connection that was established when the live conversation started.

Set Up a Web Chat Widget in PureCloud

PureCloud enables your skill bot to start and carry on a chat conversation via its web chat API. This API enables organizations to build custom themed web chat clients that can be hosted on a local intranet.  Rather than implementing a web chat, we can utilize Teams as our UI and communicate with the web chat API in our skill bot. The skill bot maintains the conversation state, including keeping the web socket connection for each conversation in scope as long as the chat is active.

Create a Queue in PureCloud to Receive Conversations from the Skill Bot

In PureCloud, a queue is dedicated for incoming Teams web chats so targeted agents with the correct skill set can handle the real-time interaction with the end users.

Trigger a Custom Action to Reset the Conversation Transcript History

Teams bot conversations never really end. Like regular Teams chats with your co-workers, once a conversation is started, the conversation thread persists across Teams sessions and devices. Help Desk Agents consider it best practice to review any automated conversation transcripts prior to interacting with the end user in real-time, and they would find little value in reviewing the entire conversation history.

To only send the Help Desk Agent the most recent transcript history (i.e. since the last time the user started a new dialog with the bot), you can create a custom action that resets the transcript history behind the scenes. If you call that action at predetermined reset points (i.e. a Welcome dialog), the end result is a trimmed, relevant conversation transcript ready to pass to PureCloud containing only the most relevant material.

Send the User’s Root AI Bot Conversation Transcript to PureCloud

user root ai bot conversation transcript purecloud

When a Help Desk Agent accepts an incoming chat from a user, a web socket connection is established between the skill bot and PureCloud. When that connection is successfully created, the skill bot passes along the conversation transcript of the user, now visible to the agent.

Things to Keep in Mind

What If No Live Agents are Available?

You should set up an automated message to be sent from PureCloud during hours when agents are unavailable. You may also wish to add special handing to the skill bot in the event no message is returned from PureCloud.

Allow Users to End a Live Chat Session

You should add logic to your skill bot to provide a method for the user to end the live chat interaction. Consider adding a keyword like “cancel” so a user can terminate the live chat from within Teams. If you fail to do this, then they could find themselves in a state where they cannot return to the chat with the AI bot if there is a problem with the connection to PureCloud.

Gracefully Handle Unsupported Features

Images and Attachments are not Supported by the PureCloud Web Chat API

You can create alternate solutions to forward content sent by the user in Teams to the Help Desk Agent outside of PureCloud. For example, you may wish to enhance the skill bot by triggering a Logic App that could email media or an attachment to the agent.

Validate User Content

Transcripts and user messages should be validated for length and potential for compliance issues (i.e. Personally Identifiable Information).

Automate Your Deployment

While you can publish your root bot directly from Bot Framework Composer, it is better to keep your content and source code in source control. Even though you can push Bot Framework Composer dialog changes to a development environment directly, Azure DevOps provides you the capability of building deployment pipelines which can easily promote your solution to QA and Production environments. This type of automation lets you have separate environments for developers and user acceptance testing.

Wrapping It Up

The Microsoft Teams platform can be extended in many ways to make the user experience richer and more productive. The Microsoft Bot Framework – along with Azure’s Cognitive Services – can be used to provide targeted and strategic experiences that bring more value to users. Providing integration to other communication tools (like Genesys PureCloud) can open new opportunities for maximizing the benefit of having Teams deployed in your organization.

For more assistance with the Microsoft Bot Framework and Azure Cognitive Services be sure to reach out to the Core BTS Modern Applications team.

About the Author

Eric Grover is a Principal Architect at Core BTS specializing in custom cloud solutions. He has over 25 years of experience architecting and developing custom software solutions and is a Microsoft Certified Solution Developer.

kurt wondra blog

3 Tips for Writing Effective Product Backlog Items

Do You Write Product Backlog Items? Writing Product Backlog Items (PBIs) is a very common responsibility of Agile Business Analysts. However, it’s often a task...
blog featured image tim justin

Current and Future Challenges with Hybrid and Remote Work Models

Many organizations are shifting to hybrid work models because of COVID-19. This model brings with it some unique security challenges. In this blog, we are...
blog eric grover

Connect Teams Users to PureCloud Help Desk Agents with Azure Bots

Teams is Now the Primary Communication Platform for Enterprise Users Because of the COVID-19 pandemic, almost every organization’s digital transformation has accelerated to support remote...
X