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

queue-300x300-red-name copyIn September we introduced you to <Queue>, 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 <Gather> supported by <Queue>, 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 <Gather> in <Queue>?

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 <Gather> in <Queue>? 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:

[sourcecode lang=”php”]
<Say> Your Intergalactic Agent will be with you shortly, please answer the following question so we can better serve you </Say>
<Enqueue waitUrl="/decisions.php">test</Enqueue>


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

[sourcecode lang=”php”]

<Gather numDigits="1" action="/processgather.php">
<Say>What is the Answer to the Ultimate Question of Life, the Universe, and Everything?</Say>
<Say>Choose 1 for the TARDIS</Say>
<Say>Choose 2 for The Matrix</Say
<Say>Choose 3 for 42</Say>
<Say>Choose 4 for Cylon Leaders</Say>
<Say>Stay on the line to hear these options again.</Say>

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

[sourcecode lang=”php”]

$digits = $_POST[‘Digits’];

<Say>you typed <?php echo $digits; ?></Say>
<Say>Thank you! Please hold for the next available Intergalactic Agent</Say>

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 <Gather> 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.