Conversational IVR using Amazon Connect and Amazon lex.

Pandian Malaisamy
11 min readMar 28, 2021

--

Business Use Case:

ABC Technology Ltd is a smart device manufacturing company, and it has inherited an existing contact center using legacy technology to address, their customer queries. But the customers are not happy with the customer experience provided by ABC Technology Ltd as they need to wait for a long time in a queue to get answered by agents. On the other hand, agents are unhappy with the Contact center system as they need to answer the same common questions raised by the customers again and again.

In reviewing the most common questions raised by the customers and answers provided by the agents. Which can be drilled down to 10 common questions, out of which 3 questions are asked by most of the customers on a ratio of 8 out of 10 calls.

Below are the three common questions raised by the customer and its solutions.

1) Problem: I cannot keep ABC smart device connected to my Wi-Fi network

A known issue with some ABC devices occurs even if a user places it directly beside a router or antenna. The ABC devices may not connect properly to the network or may not maintain a reliable connection.

Solution:

Try rebooting the device. To do so, launch the ABC app on a connected device and select the Home, tap the three dots in the upper-right corner, then select Settings. Next, select More before tapping Reboot.

If this sounds like a lot of work, unplug the Home device, and leave it unplugged for roughly one minute before plugging it back in and reconnecting it.

2) Problem: ABC smart device ignores me and does not respond to my voice

This may be due to Speaker Mic is off or due to noise interference.

Solution:

Check and make sure the Home’s mic is on — after all, it could have been accidentally turned off. It also helps to check the indicator light located on the speaker; four lights mean the mic is off. Turning the mic back on is done using the button on the back of the speaker.

3) Problem: Customers would like to know the ABC devices price.

Due to the continuous discount, customers would like to know the price of the speakers.

Solution:

Normally, agents check the CRM database and respond to customers based on the price details. By using the Amazon connect, lex and other services, we can check the updated price and respond to the customer using Natural Language IVR and Automatic speech recognition technology.

High-Level Architecture and AWS Services

At a high level, the mechanism captures the customers’ voice using Amazon Connect. Amazon Connect then uses Amazon Lex to turn the speech into text. Then it responds to the customer based on the questions raised by them.

To fetch the price of the devices, Amazon Lex uses the AWS Lambda function to get the speaker price stored in Amazon DynamoDB.

Amazon CloudWatch is used to store the application and connect logs from Amazon connect and Lambda function.

Amazon Connect

Amazon Connect collects the physician’s spoken information, and is an easy-to-use omnichannel cloud contact center that helps companies provide superior customer service at a lower cost.

Over 10 years ago, Amazon’s retail business needed a contact center that gave our customers personal, dynamic, and natural experiences. We could not find one that met our needs, so we built it. We have now made this available for all businesses, and today thousands of companies of all sizes use Amazon Connect to serve millions of customers daily.

Designed from the ground up to be omnichannel, Amazon Connect provides a seamless experience across voice and chat for your customers and agents. This includes a set of tools for skills-based routing, powerful real-time and historical analytics, and easy-to-use intuitive management tools, all with pay-as-you-go pricing. This simplifies contact center operations, improves agent efficiency, and lowers costs. You can set up a contact center in minutes that can scale to support millions of customers.

Amazon Lex

Amazon Lex is AWS’s AI-enabled service for creating conversational interfaces that are driven by built-in functionalities such Automatic Speech Recognition (ASR) for converting speech to text and Natural Language Processing (NLP) for classifying user’s intent, all of these are powered by deep learning technologies that also power Amazon Alexa.

The conversational interfaces that are created using Amazon Lex can also optionally be driven by AWS Lambda Serverless Functions. This is also what I have used in this project to drive our chatbots.

Amazon Lex also comes integrated with Amazon Polly.

Amazon Polly

Amazon Polly is AWS’s AI-enabled service for converting text to lifelike speech. It is powered by deep learning technology in its Text-to-Speech (TTS) engine so that the speech to text synthesis sounds like a human voice.

It also has Neural Text-to-Speech (NTTS) voices which sound even more lifelike as they are better at synthesizing voices that have improved speech quality.

Another differentiating feature to Amazon Polly is that it’s also configurable, one can modify the speech-rate, provide emphasis to certain parts of the text and do a lot more things, all of this is possible via the use of Speech Synthesized Markup Language (SSML).

AWS Lambda

AWS Lambda helps to fetch the price of the speaker from the DynamoDB and return to Lex, which in turn plays to the customer. It also lets you run code without provisioning or managing servers. You pay only for the compute time you consume.

With Lambda, you can run code for virtually any type of application or backend service with zero administration. Upload your code and Lambda does everything required to run and scale your code with high availability. You can set up your code to automatically trigger from other AWS services, or call it directly from any web or mobile app.

Amazon DynamoDB

Amazon DynamoDB stores the price of the ABC smart devices and is a key-value and document database that delivers single-digit millisecond performance at any scale. It is a fully managed, multi- region, multi-master, durable database with built-in security, backup and restore, and in- memory caching for internet-scale applications. DynamoDB can handle more than 10 trillion requests per day and can support peaks of more than 20 million requests per second.

Many of the world’s fastest growing businesses, such as Lyft, Airbnb, and Redfin, as well as enterprises such as Samsung, Toyota, and Capital One, depend on the scale and performance of

DynamoDB to support their mission-critical workloads.

Hundreds of thousands of AWS customers have chosen DynamoDB as their key-value and document database for mobile, web, gaming, ad tech, IoT, and other applications that need low-latency data access at any scale. You can create a new table for your application and let DynamoDB handle the rest.

Amazon CloudWatch

Amazon CloudWatch is a monitoring and serviceability service. It provides you with data and actionable insights to monitor your applications, respond to system-wide performance changes, optimize resource utilization, and get a unified view of operational health.

CloudWatch collects monitoring and operational data in the form of logs, metrics, and events, providing you with a unified view of AWS resources, applications, and services that run on AWS and on-premises servers.

You can use CloudWatch to detect anomalous behavior in your environments, set alarms, visualize logs and metrics side by side, take automated actions, troubleshoot issues, and discover insights to keep your applications running smoothly.

Solution Architecture and Call Flow

This architecture shows how the customer calls are routed to the ABC Technology contact center by using conversation IVR, where most of the common questions are answered by Amazon lex and only the complex questions are routed to agents.

Call Flow:

1.Customer calls to ABC Technology customer care number and it reaches the Amazon Connect.

2.In the contact flow, Customers are treated by their First name and the last product they purchased by using the AWS Lambda function, which does a Data dip from DynamoDB.

3. Amazon Lex is called in the contact flow to help the customers by giving conversation IVR and to address common questions.

4.By prompting “How May I help you”, customers prompt the issue, and the respective intent is matched and then the solution is prompted to the customers by lex.

5.If a customer would like to know the price of a smart device. Amazon lex triggers the lambda function, which in turn fetch the price from the DynamoDB and share the response back to lex, which is played back to the customer.

6. When the customer requests for an agent transfer, the lex transfer the respective intent to the contact flow, where the agent queue is assigned in the contact flow.

7.Once the agent addresses the complex queries of the customer. All the call recordings are stored in the S3 buckets.

Solution Implementation

Dynamo DB Tables

Two Dynamo DB tables are created for the Customer Data Dip and Product Price Dip.

Table 1: To store the customer details.

Table 2: To store the price of speakers.

Lambda Functions

Two lambda functions are created to get the customer details from the Dynamo DB and to get the price of the products.

Lambda Function1(ABC_Customer_DIP): To get the customer details.

Lambda Function2(Smart_Product): To get the price of the devices.

Amazon Lex

Lex is used for conversational IVR, where the below intents and utterances are created to respond to the customer queries.

Intent — An intent is what a user is trying to accomplish. ‘Intent’ does not relate to the specific words that a user says, but the high-level goal that we are aiming for.

Utterance- Utterances are the specific phrases that people will use when making a request to Amazon Lex.

Slots — A slot is a variable that relates to an intent allowing lex to understand information about the request.

Contact Flow

The below flow represents how the customers are treated in the contact center and transferred to agents.

Set Logging behavior — Is enabled to send data of each block in your contact flow to Amazon CloudWatch for real-time details.

Start media streaming — Captures what the customer hears and says during a contact and Starts streaming audio to Kinesis.

Set recording and analytics behavior — Is enabled between Agent and Customer, so the call recordings are stored in S3 buckets.

Invoke AWS Lambda function — It invokes ABC_Customer_DIP to get the customer details.

Set contact attributes — It is used to store the First Name and Product purchased by the customer as attributes, which is returned by the Lambda function.

Get customer input- Where the Customer is prompted by their first name and product they purchased. Moreover, Amazon lex is called to address the common queries of the customers. Which are returned as intents to transfer to agents for other queries.

Set working queue — ABC_Agents_Queue is set to transfer the customer to agents.

Transfer to queue- It is used to transfers the contact to ABC_Agents_Queue.

Disconnect — Ends the interaction.

Standard Reporting — Real Time Report

Real-time metrics reports show real-time or near-real time metrics information about activity in your contact center. Metrics such as Online show the number of agents currently online in real-time, updating every 15 seconds. Metrics such as Handled and Abandoned reflect near real-time values for your contact center.

You can customize the reports, specify a time range for each report, select metrics for each report, and select filters for data to include or exclude from each report.

Standard Reporting — Real Time Dashboard

Amazon Connect Provides default real time dashboard for queues configured displaying their Service levels and occupancy.

One can define the thresholds for Service level and occupancy based on the business goals.

Standard Reporting — Historical Reports

Historical metrics reports include data about past, completed activity and performance in your contact center. Amazon Connect includes built-in historical reports that you can start using right away.

Although Amazon Connect includes built-in historical reports, you can create your own custom reports, so you look at only the data that is of interest to your organization.

Benefits for Business

By implementing the above solution, Business benefits by cutting down costs, increases efficiency, and improves customer satisfaction.

Cuts Costs

The average cost of a live agent customer service phone call can be more than $10 depending on the features used and this adds up quickly if your company is handling thousands of calls, not to mention the overhead of hiring new staff.

But by using Amazon connect you will incur approx. only $0.254 charge per call, which is for 7 mins in the contact center, when compared to the traditional legacy system.

Serves Customer Faster

Conversational IVR decreases the amount of time to serve each customer. It also serves more customers in less overall time.

Conversational IVRs handle calls efficiently and with a consistency unmatched by live agents. They never break from company policy, for instance, and there is less of a skill cap involved with machines — they can always continue improving.

Satisfies Customers

Whereas customers once held a greater dislike for automated answering type technologies, opinions are shifting toward acceptance amid the rising adoption of personal assistants such as Alexa.

People are increasingly familiar with these technologies, the ways they can be used, and their limitations. Customer satisfaction numbers for popular voice-controlled assistants are as high as 80% or better depending on the platform and survey.

Better Customer Support

Conversational IVR modernizes traditional IVR concepts with technologies such as AI and machine learning, which can understand and respond to customer inquiries spoken organically instead of navigating push-button menu flows.

This allows conversational IVR systems to complete requests faster via customer self-service options in real-time without involving company associates. Along with maximizing efficiency and helping to offset spikes in call volume, conversational IVR lowers call center costs by reducing customer churn, boosting brand perception, and improving client retention.

--

--

Pandian Malaisamy
Pandian Malaisamy

Written by Pandian Malaisamy

0 Followers

Customer Experience Expert

No responses yet