Interactive Voice Responder - No Code

Overview

Building an easy to customize IVR does not have to be complicated! Using Compatibility XML we can create a an interactive system that allows you to:

  • Receive calls using a single number;
  • Have customers pick the department they wish to speak with;
  • Inform customers of your business hours;
  • Have customers wait in a queue while listening to wait music;
  • Have multiple agents from multiple departments taking calls whenever they are ready to start working.

We're going to be using XML Bins to build the IVR, and we'll start with the simplest IVR possible:

943943

Then, we'll expand on it by adding queues, wait music, and the ability for agents to pick up calls from the queue as needed:

979979

What do you need to get started?

All you need to create your first IVR is:

Basic IVR

We're going to start out by creating the first XML Bin, and we'll call it IVR Start.

📘

Things you will need to replace in your XML Bins

We've made this guide so you can copy and paste the XML into your XML Bins, and the only things you'll need to change are the bits you'll see THAT_LOOK_LIKE_THIS. Don't worry about them during the creation of each Bin, as in the end we'll circle back and update all of them!

IVR Start

<?xml version="1.0" encoding="UTF-8"?>
<Response>
  <!--Welcome the caller.-->
  <Say>
    Welcome to Company Name! When you hear the department name you wish to speak with, please press any key on your keypad. 
  </Say>

  <!--Move the call along to the Gather Input menu, where we'll ask the caller to pick the department they wish to speak with.-->
  <Redirect>
    REPLACE_WITH_LINK_TO_GATHER_INPUT_XML_BIN
  </Redirect>
</Response>

Gather Input

Next, we're going to be creating the XML Bin responsible the most recognizable part of any IVR: picking a department.

<?xml version="1.0" encoding="UTF-8"?>
<Response>
  <!--Give the caller 5 seconds to press any key to speak with Sales.-->
  <Gather 
    action="REPLACE_WITH_LINK_TO_CALL_SALES_XML_BIN" 
    method="GET"
    timeout="5"
    numDigits="1"
    finishOnKey="*,#"
  >
    <Say>
      Sales
    </Say>
  </Gather>

  <!--Give the caller 5 seconds to press any key to speak with Support.-->
  <Gather 
    action="REPLACE_WITH_LINK_TO_CALL_SUPPORT_XML_BIN" 
    method="GET"
    timeout="5"
    numDigits="1"
    finishOnKey="*,#"
  >
  <Say>
      Support
  </Say>
  </Gather>

  <!--Notify the caller no input was detected and hang up.-->
  <Say>
    Since we did not receive any input, we're now going to end this call. Goodbye.
  </Say>
</Response>

📘

What if you wish to ask callers to "press 1 for Sales, 2 for Support"?

Unfortunately, there is no way to accomplish this using XML Bins exclusively. If you wish to have your IVR work this way, consider hiring a developer to build an IVR for you using one of our Relay SDKs.

Call Sales

<?xml version="1.0" encoding="UTF-8"?>
<Response>
  <!--Ask the caller to confirm if they really intended to pick Sales. If not, transfer back to Gather Input menu.-->
  <Gather 
    action="REPLACE_WITH_THE_LINK_TO_THE_GATHER_INPUT_XML_BIN" 
    method="GET"
    timeout="5"
    numDigits="1"
    finishOnKey="*,#"
  >
    <!--Let the caller know what's happening.-->
    <Say>
      Transferring you to Sales. If you did not mean to speak with Sales, please press any key to go back.
    </Say>
  </Gather>
  
  <!--If the caller does not provide any input, call the Sales number immediately.-->
  <Dial>
    REPLACE_WITH_THE_SALES_NUMBER
  </Dial>
</Response>

Call Support

<?xml version="1.0" encoding="UTF-8"?>
<Response>
  <!--Ask the caller to confirm if they really intended to pick Support. If not, transfer back to Gather Input menu.-->
  <Gather 
    action="REPLACE_WITH_THE_LINK_TO_THE_GATHER_INPUT_XML_BIN" 
    method="GET"
    timeout="5"
    numDigits="1"
    finishOnKey="*,#"
  >
    <!--Let the caller know what's happening.-->
    <Say>
      Transferring you to Support. If you did not mean to speak with Support, please press any key to go back.
    </Say>
  </Gather>
  
  <!--If the caller does not provide any input, call the Support number immediately.-->
  <Dial>
    REPLACE_WITH_THE_SUPPORT_NUMBER
  </Dial>
</Response>

Replace variables

Here we will need to go through the XML Bins and update the bits that need to be replaced with your own, such as the REPLACE_WITH_THE_SUPPORT_NUMBER and REPLACE_WITH_THE_LINK_TO_THE_GATHER_INPUT_XML_BIN variables.

Link your Phone Number to the Start IVR XML Bin

The last thing you will need to do is tell your phone number what to do when a call comes in. In our case, we want it to load the Start IVR XML Bin. You can learn how to do this by following these instructions.

👍

Congratulations! You've created your very own IVR!

Go ahead and give your phone number a call, and you should hear the introduction to your company! If you wish to expand on what we did, read on!

Expanding on our Basic IVR

Now we're going to be adding the following functionality to our Basic IVR:

  • Call queues;
  • Wait music;
  • The ability for agents to pick up calls from the queues as needed.

What do you need to extend the Basic IVR?

Since we're going to be allowing agents to pick up calls from the queues as needed, we're going to need to purchase 2 extra phone numbers that we'll call Sales Connector and Support Connector.

Waiting in the Queue

This XML Bin will inform the caller of the business hours, and play waiting music until the call is picked up by an agent.

<?xml version="1.0" encoding="UTF-8"?>
<Response>
  <!--Inform the caller of the business hours.-->
  <Say>
    Thank you for your patience. An agent will be with you as soon as possible. Our business hours are 8 AM to 8 PM.  
  </Say>
  
  <!--Play waiting music.-->
  <Play loop="15">
    https://dl.dropboxusercontent.com/s/tx79kf87h6rl0nk/What%20a%20beautiful%20Sunset%21%20-%20Angelwing.wav
  </Play>
</Response>

📘

What if you wish to avoid having callers wait in the queue outside of business hours?

Unfortunately, there is no way to accomplish this using XML Bins exclusively. If you wish to have your IVR work this way, consider hiring a developer to build an IVR for you using one of our Relay SDKs.

Update Call Sales

Since we wish to add callers to the Sales queue instead of just calling Sales directly, we need to change our XML Bin to use the Enqueue verb instead of Dial.

<?xml version="1.0" encoding="UTF-8"?>
<Response>
  <!--Ask the caller to confirm if they really intended to pick Sales. If not, transfer back to Gather Input menu.-->
  <Gather 
    action="REPLACE_WITH_THE_LINK_TO_THE_GATHER_INPUT_XML_BIN" 
    method="GET"
    timeout="5"
    numDigits="1"
    finishOnKey="*,#"
  >
    <!--Let the caller know what's happening.-->
    <Say>
      Transferring you to Sales. If you did not mean to speak with Sales, please press any key to go back.
    </Say>
  </Gather>
  
  <!--If the caller does not provide any input, add the call to the Sales queue.-->
  <Enqueue 
    waitUrl="REPLACE_WITH_THE_LINK_TO_THE_WAITING_IN_LINE_XML_BIN"
  >
    Sales
  </Enqueue>
</Response>

Update Call Support

Here we repeat what we did in the previous step in the Call Support XML Bin as well.

<?xml version="1.0" encoding="UTF-8"?>
<Response>
  <!--Ask the caller to confirm if they really intended to pick Support. If not, transfer back to Gather Input menu.-->
  <Gather 
    action="REPLACE_WITH_THE_LINK_TO_THE_GATHER_INPUT_XML_BIN" 
    method="GET"
    timeout="5"
    numDigits="1"
    finishOnKey="*,#"
  >
    <!--Let the caller know what's happening.-->
    <Say>
      Transferring you to Support. If you did not mean to speak with Support, please press any key to go back.
    </Say>
  </Gather>
  
  <!--If the caller does not provide any input, add the call to the Support queue.-->
  <Enqueue 
    waitUrl="REPLACE_WITH_THE_LINK_TO_THE_WAITING_IN_LINE_XML_BIN"
  >
    Support
  </Enqueue>
</Response>

Start Sales Shift

Now that we have made sure new calls go to the Sales and Support queues instead of just calling the Sales or Support numbers directly, we need to actually connect agents with callers waiting in line. To do this, we create the Start Sales Shift XML Bin. It will allow agents to call the Sales Connector number, and instantly get connected to the first caller in line in the Sales queue.

<?xml version="1.0" encoding="UTF-8"?>
<Response>
  <!--Inform agent of what is happening.-->
  <Say>You will now be connected to the next customer in line.</Say>

  <!--Connect to the first call in line in the Sales Queue.-->
  <Dial>
    <Queue>Sales</Queue>
  </Dial>

  <!--Go back to the start of this XML Bin.-->
  <Redirect>
  </Redirect>
</Response>

Start Support Shift

Just as we did for Sales, we now need to create the Start Support Shift XML Bin.

<?xml version="1.0" encoding="UTF-8"?>
<Response>
  <!--Inform agent of what is happening.-->
  <Say>You will now be connected to the next customer in line.</Say>

  <!--Connect to the first call in line in the Support Queue.-->
  <Dial>
    <Queue>Support</Queue>
  </Dial>

  <!--Go back to the start of this XML Bin.-->
  <Redirect>
  </Redirect>
</Response>

Replace variables

Once again, make sure to go through the newly created XML Bins and update the bits that need to be replaced with your own, such as the REPLACE_WITH_THE_LINK_TO_THE_WAITING_IN_LINE_XML_BIN and REPLACE_WITH_THE_LINK_TO_THE_GATHER_INPUT_XML_BIN variables.

Link Connector Phone Numbers with XML Bins to Start Shifts

The last thing you will need to do is tell your Sales Connector and Support Connector phone numbers what to do when a call comes in. In this case, we want each of them to load Start Sales Shift and Start Support Shift respectively, by associating the links to the XML Bins with each of the phone numbers. You can learn how to do this by following these instructions.

📘

What if you wish to have calls come through to agents automatically?

Unfortunately, this functionality is not possible using XML Bins.

Wrap up

Building an IVR is very simple, it just takes a bit of time, but once it is done, it will just keep working! Since XML Bins are serverless, you will never have to worry about maintaining any systems on your own!

If you have programming experience and are looking for more control, consider having a look at the following articles:

Sign Up Here

If you would like to test this example out, you can create a SignalWire account and space here.

Please feel free to reach out to us on our Community Slack or create a Support ticket if you need guidance!


Did this page help you?