How to Enable Voice for Your Chatbots Via Telephony

Written by thecognitiveservicesninja | Published 2023/04/21
Tech Story Tags: microsoft-power-virtual-agents | voice-assistant | customer-experience | customer-service | customer-success | customer-engagement | business-strategy | optimization | web-monetization

TLDREnabling your chatbot to use voice on a telephone line is straightforward, and there are several solutions in the market to do so. This guide will focus on a solution called Voice.Ai and Power Virtual Agents as a bot platform. Other Platforms will work similarly. You must be creative about the dialog design, use slot filling to make the dialog natural.via the TL;DR App

A step-by-step guide to enable your chatbots to use voice via telephony as an additional channel

Enabling your chatbot to use voice on a telephone line is straightforward, and there are several solutions in the market to do so.

This guide will focus on a solution called Voice.Ai and Power Virtual Agents as a bot platform. Other Platforms will work similarly.

Motivation

Voice enabling any chatbot is technically easy, and you should consider doing so.

  • Imagine giving your customers a text-based chatbot on your website and serving them on your phone before they reach your contact center.
  • Imagine serving your customers and employees immediately in their native language without extra effort.
  • Imagine there is no need for additional resources, but your customers and employees will feel more directly addressed. #domorewithless
  • Imagine your employees can refocus on delivering value to your customers instead of being a voice interface of a QnA collection.
  • Imagine you can achieve this without paying your contact center vendor additional licenses.

But I must be very direct and not gloss over things; your Bot needs to deliver real value to your customers. You must be creative about the dialog design, use slot filling to make the dialog natural, and avoid creating a bot that can only answer one specific question. You must create process flows to serve your customers and achieve human parity.

Prerequisites

To use this Kickstarter and explore this topic, you need to sign up for Voice.Ai Connect Cloud and acquire a Phone Number or configure your sip trunk by following the documentation.

Let's give the (Power Virtual Agents) Bot a voice. Retrieve your Web channel Secret (in PVA-UI: Settings/Security/Web Channel Security)

Then go to your Voice.AI Configuration Interface.

  • Bot Configuration
  • Add Bot

Configure Routing

Figure 0.4: configure routing "inbound"

Give it a Voice

Voice Basics

voice enabling a chatbot is a low effort from a technical standpoint, but there are at least three significant differences between a chatbot and a voice bot.

It would be best to create a Bot that tells the user everything without pictures, links, or emoticons. Consider the one-breath rule; make the Bot's answer short and to the point. Use handover to a human as a last line of defense but use it immediately when your Bot fails.

API Documentation

The API of Voice.AI Connect is publicly available; please follow the link to get more information.

Caller/Callee IDs

You have one handy identification element on the phone channel you should consider integrating into your Bot, e.g., to greet the user or avoid unnecessary questions - the Caller ID. With the Caller ID, you can link your CRM Data to the Bot and have instant insides by hand when a user calls you. No need to ask for the name (you need to verify it) and no need to ask for details you already know.

If your Bot serves several phone lines, e.g., for different purposes (sales, customer service, HR), you can even use the Callee ID to route to a specific bot skill. In PVA, you can retrieve both IDs via a small composer integration and create a new composer topic.

Follow the steps to install Bot framework Composer and connect to Power Virtual Agents.

Create a new "Dialog" in Bot framework Composer, and select event-driven and event-received as options.

Create variables in Power Virtual Agent

Go back to Power Virtual Agents UI and create two variables within a new topic for each of them. This feels a little dirty to do so, but it is the way to do it before we all get the new unified authoring canvas we see in the preview.

Ensure you create a "bot" variable and select "external sources can set values".

Figure 3.0: variable as "Bot" variable:

and back to the Composer and create the flow in your newly created "dialog"

Create dialog flow with Composer

Nothing special, create a switch and three "set a property node" (to manipulate the JSON data and store it in a variable. You can check the adaptive code in Bot framework Composer by selecting show code in the canvas.

Select Publish on the left side in the Composers Menu and publish your composer code to PVA.

Use Caller and Callee ID in Power Virtual Agent

We can use the newly created variables everywhere (messages, as input for Power Automate Flows, etc.) in PVA as we stored the Caller ID and Callee ID as variables.

Hangup

Another Dialog you can create with the Composer is a Hangup to close the phone line after a successful dialog with a user. Therefore you select Send Activity as a Dialog event.

Why not integrate a feedback system and perform a clean hangup after the user confirms that there are no open points anymore?

Play Music

It would be best if you created a third Composer dialog to play music, announcements, or fancy jingles. Your sound file needs to be accessible as a public URL.

Call Transfer

You could analyze the sentiment of the caller to hand over to an agent or when the caller asks for a human or fails to answer.

This can be done without the Composer. You only need to create a new topic without trigger phrases and link to it from other topics.

Conclusion

Technically, telephony is just another channel for your Bot. Still, it gives your employees a superpower in customer service, 24 hours available, and the ability to answer everything quickly and correctly (if your Bot is providing real value).


Also published here.


Written by thecognitiveservicesninja | Code Fanatic | Low Code Hacker | Bot Keeper | Power Platform & Azure Architect | Developers Advocate
Published by HackerNoon on 2023/04/21