One time you can be sure to have your customers’ attention is when they call you. Many callers spend a few moments on hold on their way to getting their questions answered. Don’t waste those precious seconds — use them wisely by giving callers information they can use.
It’s a rare business nowadays that keeps a human receptionist on the payroll to answer customers’ phone calls. Instead, most companies use interactive voice response (IVR) — automated technology that speaks a menu of options and lets users make choices by speaking or pressing a phone keypad key.
Plivo makes it easy to create an IVR menu tree in a couple of ways. Our PHLO visual workflow design tool lets you drag components onto a canvas and use them as building blocks for your menu tree; we wrote a blog post that walks you through the process. Or you can write an IVR menu with your favorite SDK and Plivo XML documents. It’s not drag-and-drop, but it’s pretty easy — and it’s what you need to do to take advantage of this tip.
From IVR to OIC
When you forward a call to an extension, sometimes it gets queued up waiting to be answered. If you had a customer’s attention, even if just for a few seconds, what would you communicate to them?
PreAnswer lets you specify what happens after a call is transferred but before it’s picked up. Some companies squander those seconds playing inoffensive music. But there are better possibilities.
For instance, suppose you’re a restaurant and you have a daily special, or maybe you’re a retailer with a one-day sale. You can put text that describes the deal into a file that your application can open and read out using text-to-speech.
Or suppose you’re transferring a call to a department that gets the same questions over and over. You could record answers to common questions and play them to callers. If you answer a customer’s question with recorded information they’ll hang up satisfied, and you’ll have freed up an employee’s time.
Tech specs
Here’s how it works on a technical level. Plivo lets you control call flows with XML code. The PreAnswer XML element lets you embed any of three other elements:
- Speak plays specified text using text-to-speech. The Speak XML element tells Plivo to generate spoken audio, powered by Amazon Polly. We support 27 languages and more than 40 voices, and by using Speech Synthesis Markup Language (SSML) you can control pronunciation, pitch, and volume to make the spoken words sound more natural and less machinelike.
- Play plays audio in MP3 or WAV format.
- Wait waits silently for a specified number of seconds.
When you forward a call, you can specify the PreAnswer element with an embedded Speak or Play element.
Speak friend and enter
Here’s a little Python code that shows how to use the Speak element. Suppose you put the messages you want spoken in a text document called speak_input.txt:
Thanks for being patient. To compensate you for your time on hold, we’re offering a 50% discount on a yearly subscription. Use the discount code “hold50” when you sign up. Someone will be with you shortly.
This code opens that file, reads the text, and adds it to the Speak element.
Play on words
Alternatively, you could record your message (in this example in a file called sales_discount.mp3 that lives on Amazon S3) and use the Play element.
Wait a moment
Sometimes you might want a few seconds of silence before you speak or play a message. This code uses the Wait element to pause for 10 seconds.