Build Your RingCentral Virtual Voicemail Assistant for Business — Part 1

Phong Vu
RingCentral Developers
11 min readSep 3, 2019

Nowadays, consumers have a variety of options for obtaining services and getting the help they need. They can use web chat, email, the Internet and face-to-face contact, yet telephone customer service is still the first choice for most customers when they have questions or a problem that needs to be resolved.

In order to ensure your customers are happy with the customer service they receive, it’s even more important for you to provide exceptional customer service, including outstanding telephone service. Consumers expect better service than ever before, and the capabilities of modern telephone communications allow you to offer them the satisfaction and resolution they demand.

IVR (Interactive Voice Response) can be a great tool for your company in decreasing customer wait time and increasing customer satisfaction, but customers are sometimes not overly fond of automatic response systems–especially when they have bad experiences. They don’t want to go through a lengthy menu and after listening to a machine’s voice and pressing keys, they still end up in a call queue–impatiently waiting for their turn to talk to a person; If they get dropped out of the queue for any reason, they have to repeat the lengthy process again and would end up at the tail of the queue.

Voicemail saves your customers time. If they cannot afford to wait on hold indefinitely or continue to try to call you throughout the day, voicemail gives them the opportunity to leave a message and let you return their call. Voicemail ensures accuracy because it is an exact recording of what the caller actually said. Using voicemail and taking messages properly are crucial to making sure your customers are happy. If they cannot talk to the appropriate person when they call, they are already less than satisfied; if their message is not relayed properly to the right individual, you will disappoint them even more. Listening to a voicemail before calling back your customer would also give you a chance to prepare for the conversation.

This article discusses the voicemail capabilities of the RingCentral cloud communications system, and AI (Artificial Intelligence) solutions that can be employed to build an effective virtual voicemail assistant for your telephone customer services.

Setup a voicemail inbox

Under a RingCentral account, each extension (user) and department has its own free voicemail inbox with multiple options for managing voice messages. For the purpose of building a virtual voicemail assistant, you might want to create a new user named Voicemail Assistant, assign a direct phone number and set it up for a dedicated telephone customer service.

RingCentral account service dashboard

The voicemail greeting message is an important element of your business’s voicemail system because it is often the first impression of your service that customers will have. The default voicemail greeting message is adequate. But you should create a really good greeting message to impress customers by putting your best face on, while increasing the chances that you’ll retain their business. With RingCentral, you have several options to customize your voicemail greeting message:

  • Let the system call your phone number and you will have a chance to record a greeting message.
  • Use the computer’s microphone to record a greeting message.
  • Upload a prerecorded audio file.
Customize Voicemail Greeting Message

When your customers dial a number, they normally will hear several messages before reaching the voicemail inbox. This is because of the default system settings, which enables the user greeting message, plays the ringtone while the phone is ringing, then plays the voicemail greeting message when the call is redirected to a voice mailbox.

Your virtual voicemail assistant is dedicated to a voicemail customer service, meaning that any incoming call to the service phone number should be redirected immediately to the voicemail inbox. So, you may want to cut down all the unnecessary steps including the ringing stage. To do so, you can open the “Screening, Greeting & Hold Music” section and disable the “User Greeting” and the “Connecting Message”. Then browse to the “Call Handling & Forwarding” section and turn off all the forwarding sequences so a call will be redirected immediately to the voice mailbox.

Disable user greeting and connecting message
Turn off Forwarding Sequences

Last but not least, you can set the “User Hours” option to 24 hours and 7 days a week to make your virtual voicemail assistant work around the clock.

Set User Hours

That’s pretty much all you need to setup for the voicemail inbox using the RingCentral service dashboard. The next question is how do you access the voicemail programmatically to build your virtual voicemail assistant? The RingCentral Developer platform allows you to access to a growing number of APIs and integrate rich communication features into your application.

Get new voicemail notification

RingCentral platform supports real-time push notifications. It is an event triggered mechanism to get notified when something happens to the service you are observing. You can choose between PubNub or Webhooks delivery mechanism to get notifications.

To get notified when there is a new voicemail arriving in a voicemail inbox, you can subscribe for the voicemail event for that particular user (inbox). What data comes together in a voicemail notification message? Below is a typical payload of a voicemail event:

{
"uuid":"473993724243953516",
"event":"/restapi/v1.0/account/~/extension/~/voicemail",
"timestamp":"2019-06-16T21:27:06.525Z",
"subscriptionId":"c204cdb4-d8b0-4b3e-808a-xxxx",
"ownerId":"17800xxxx",
"body":{
uri:
'https://api.ringcentral.com/restapi/v1.0/account/~/extension/~/message-store/1054xxxx',
id: 1054xxxx,
to: [ {
phoneNumber: '+1650513xxxx',
name: '(650) 513-xxxx',
location: 'San Mateo, CA'
} ],
from: {
phoneNumber: '+1650224xxxx',
name: 'Henry Taylor',
location: 'Mountain View, CA'
},

type: 'VoiceMail',
creationTime: '2019-06-16T22:17:27.000Z',
readStatus: 'Unread',
priority: 'Normal',
attachments: [ {
id: 1054xxxx,
uri:
'https://media.ringcentral.com/restapi/v1.0/account/~/extension/~/message-store/1054xxxx/content/1054xxxx',
type: 'AudioRecording',
contentType: 'audio/mpeg',
vmDuration: 11
},{
id: 2406yyyy,
uri: 'https://media.ringcentral.com/restapi/v1.0/account/~/extension/~/message-store/1054xxxx/content/2406yyyy',
type: 'AudioTranscription',
contentType: 'text/plain',
vmDuration: 11,
fileName: 'transcription'
} ],

direction: 'Inbound',
availability: 'Alive',
messageStatus: 'Received',
lastModifiedTime: '2019-06-16T22:17:41.584Z',
vmTranscriptionStatus: 'Completed'
}

There is some key information you will be interested in — the “from” phone number and the voicemail attachments.

Who just left a voicemail message?

Obviously, the “from” phone number is the caller’s phone number. This is the key information for you to identify the caller’s identity. You can search for the phone number from your customer database to check if the caller is your customer or not. If the caller is a known customer, you can pull necessary information on that customer from your database to get ready for the conversation with the customer when you make a call back. What if the caller’s identity is unrecognized? It can be an existing customer who uses a different phone number; it can be a potential customer; or it can be some spammer or scammer whom you really want to flag and ignore.

Scam call detection

Like email, voicemail is also another popular channel for scammers and spammers to exploit. Sometimes you can recognize a scam phone number if you’ve seen it several times earlier. But most of the time you’ll find out if a voicemail is spammy or not only after you start listening to it. That makes spam voicemails extremely disturbing when you are overwhelmed with real customers’ voicemails. So, you don’t want to see spam voicemails in your voicemail list, or do you?

Your virtual voicemail assistant should be able to identify and flag such non-business voicemails for you. The fastest way to identify a spammy voicemail is to look up the caller’s phone number from a blacklist if you have one. If you don’t have a blacklist or cannot detect from your own blacklist, you can use online services such as the phone reputation detection from WhitePages, to enquire for a detailed report of a phone number.

The response from WhitePages’s Phone Reputation service contains detailed reputation information of a phone number. You might be interested in a couple of key attributes–the reputation level and the category, that help you make quick decision if a voicemail is a spam or not.

The reputation level is a score number ranging from 1 to 4; with 1 indicates high confidence that the phone number has not been associated with spam/risky behavior; and 4 indicates high confidence that this is a spammy/risky number. You can use the reputation score to classify a caller’s number as follow:

1: Clean; 2: Likely 3: Highly 4: Risky

The category label specifies the type of spam or scam associated with the phone number. Here is a list of categories the Phone Reputation API could identify:

Not Spam — Debt Collector — Telemarketer — Political Call — Phone Survey — Phishing — Extortion — IRS Scam — Tax Scam — Tech Support Scam — Vacation Scam — Lucky Winner Scam — Scam — NonProfit — Robocaller — TollFree Pumping — Other Spam

You can use the categories above to indicate the source of a voicemail. Optionally, for those voicemails came from your customers, you can specify a value of 1 to the reputation score and a label “Customer” for the category.

You can also detect a spammy voicemail by analyzing the voicemail content using AI technology. But let’s explore that feature later when we discuss about AI solutions.

Access the voicemail audio

The voicemail audio content can be accessed via the attachment URI from the notification body.

{
id: 1054xxxx,
uri: 'https://media.ringcentral.com/restapi/v1.0/account/~/extension/~/message-store/1054xxxx/content/1054xxxx',
type: 'AudioRecording',
contentType: 'audio/mpeg',
vmDuration: 11
}

Now that you’d get notified when there is a new voicemail; you’d know the caller’s identity so you could avoid spending time on those spam voicemails; and you’d be able to listen to the voicemail audio. But your virtual voicemail assistant should do more to help you organize and prioritize your voicemail list. The challenge is how to make it recognize human speeches and understand the message for making decisions like a real assistant.

You are thinking about AI and machine learning right now, right? You have to develop NLP (Natural Language Processing) algorithms and statistical models to build the brain of your virtual assistant. It is a sophisticated project that normally it would take years to turn from technical concepts into an actual model in production.

Today, fortunately, you don’t always need to develop your own machine learning algorithms for your AI solutions. Many companies provide AI services such as speech recognition, language detection, sentiment analysis, concept extraction etc. Most of the services are accessible on-demand via their cloud API platform. Your focus will be shifted from developing such complicated technology to creating great user experience and choosing the best AI solution available on the market for your application.

Now, let’s move on to explore the AI services you would need for this project.

Voicemail transcription

Most of the RingCentral service plans include the Voicemail-to-Text feature. This means that all voicemails will be automatically transcribed. You can set the Voicemail to Text option from the RingCentral service dashboard mentioned earlier at the “Messages” section.

If the Voicemail to Text option is set, you can access the voicemail transcript via the attachment URI from the notification body.

{
id: 2406yyyy,
uri: 'https://media.ringcentral.com/restapi/v1.0/account/~/extension/~/message-store/1054xxxx/content/2406yyyy',
type: 'AudioTranscription',
contentType: 'text/plain',
vmDuration: 11,
fileName: 'transcription'
}

For testing on the sandbox environment, or for other reasons if you cannot use the transcription service from RingCentral (e.g. support other languages than English), you can use any Speech-to-Text service provided by many AI companies such as Google, AWS, IBM, Rev.ai, VoiceBase, AI Sense etc. to transcribe a voicemail.

The more accurate the voicemail transcript is, the better your virtual assistant would be able to process the customer’s message

Getting the voicemail transcript is just the first step of preparation for the data analysis.

Define objectives

In customer services, sometimes the FIFS (First In First Serve) model is not preferable as you might want to give higher priority to a customer who needs urgent help. Assign a customer’s case automatically to an agent based on competency and skills would also improve response time for your customer service, thus, increase your customer satisfaction.

So, your virtual voicemail assistant must be able to identify a voicemail urgency and to categorize the voicemail message then assign it to the right agent.

Train your dataset

Unfortunately, some generic AI services are not the perfect solutions for certain types of problems you are trying to solve. You can use general sentiment analysis to detect the common sense of customers satisfaction — how much they like or dislike something, but not necessarily about your product. You can also use the generic categorization from Google AI service to categorize your customer’s problems. However, you will find it very hard to map their predefined categories into your own product or service categories.

Luckily, some leading AI companies let you customize the service to meet your expectation. In other words, they let you use their machine learning algorithms to train your own dataset.

To obtain a great data model that fits your customer service context, you must collect as many real sample messages as possible for your dataset, then train it with appropriate machine learning algorithms. Think of the dataset as a maths book with lots of addition and subtraction exercises. The more exercises you practice, the more knowledge about addition and subtraction you’ll gain.

Different companies provide different methods to train custom dataset. Some allow you to choose algorithms, some automatically select the most suitable algorithms based on the type of model you selected. MonkeyLearn is one of the leading AI companies that provides easy ways to train custom dataset for different service models. They also provide lots of demo models for quick evaluations.

MonkeyLearn AI services Dashboard

Auto reply with SMS message

To enhance the customers experience, you can instantly send a reply SMS message to notify the callers that you have received their message and will call them back as soon as you can. Of course, you are not going to reply to spammers nor try to send an SMS message if the caller’s phone number is not a mobile phone number.

There are different ways to detect if the caller’s number is a mobile number. If the phone number is found from your customer database, you can check the contact number type if that exists. Otherwise, you can use WhitePages Phone Intelligence API to detect if a number is a mobile phone number.

To send a reply SMS message, all you need is to compose a relevant message and send it using RingCentral SMS API.

Try the virtual voicemail assistant demo

Click here to start the app and login with your own RingCentral user credentials. Open the Help page for detailed instructions.

Continue to read Part 2 where I will discuss further on how the demo was built.

--

--