Unlock the Potential of Queue with the Press of a Button (or two)

February 05, 2013
Written by
Twilio
Twilion

Twilio Bug Logo

queue-300x300-red-name copy
In September we introduced you to , a simple way to build and manage call queues with just a few lines of TwiML. Queue gives you the ability to easily route inbound calls, whether you are building a simple call waiting solution or a large, dynamic call center.

Today we’re launching supported by , which allows your caller to interact with your application while sitting in a call queue. This gives you the ability to make the most of your customers’ wait time, from collecting caller information to providing them with options to act on.

Where Would I Use in ?

Gather in Queue saves valuable time for both you and your customers. Use this new feature to:

  • Exit hold to leave a voicemail for a call back.
  • Enter important account information before connecting to an agent.
  • Make the wait time fun by changing the hold music or playing a trivia game.
  • How are you using in ? Email community@twilio.com and tell us how it works for you.

Enough Talk, Let’s Build it

Here is a simple Twilio app. It loops through a countdown, and lets a user interrupt by pressing any two keys. Then, it repeats back the number the user entered:

First your caller will enter the queue:
index.php:

[sourcecode lang=”php”]

Your Intergalactic Agent will be with you shortly, please answer the following question so we can better serve you
test

[/sourcecode]

Now you can collect information from your caller while the are waiting in the queue:
decisions.php:

[sourcecode lang=”php”]



What is the Answer to the Ultimate Question of Life, the Universe, and Everything?
Choose 1 for the TARDIS
Choose 2 for The Matrix Choose 3 for 42
Choose 4 for Cylon Leaders
Stay on the line to hear these options again.


[/sourcecode]

Gather captures that answer and reads it back to the caller on the line:
processgather.php:

[sourcecode lang=”php”]

$digits = $_POST[‘Digits’];
?>


you typed
Thank you! Please hold for the next available Intergalactic Agent

[/sourcecode]

At no point does your caller have to exit the call queue. It’s that simple. Ready to build your own? Read the docs on and Queue.

Learn more about Queue

If you are new to Queue we have a great list of resources to help you get started. We’re always listening, if you have any questions just send us a note.

We’re excited to share this new feature with you and continue to expand our capabilities in Queue. Stay tuned for more in-depth tutorials on building with Queue.