Conversational AI • Last Updated 6/22/2024

VIDEO: Building an IVR menu in minutes with TeXML Bin

Improve customer experience and call efficiency by creating an IVR menu with just a few lines of code using TeXML Bin.

4.jpg

By Marlo Vernon

Man coding with TeXML

Looking to improve your customer experience and call efficiency? Interactive Voice Response (IVR) menus are a game-changer in customer communication. An IVR menu is simply an automated system allowing computers and humans to interact seamlessly via voice or keypad inputs. It allows callers to self-service their inquiries without human intervention and route calls to the right person. Building an IVR menu takes only minutes—and you don’t even have to be a coder—with Telnyx’s low-code markup language, TeXML.

In this video tutorial, Telnyx’s Programmable Voice Product Manager Rafal walks through how to build an IVR menu using TeXML Bin, a useful tool that stores TeXML instructions for your TeXML application to acton when a call comes in without having to set up your own application servers. In just five minutes, you’ll have a working IVR menu!

IVR menu in a few simple steps

This video tutorial walks through the following steps to build an IVR menu using TeXML.

  1. Before getting started, be sure you’re signed into the Telnyx Mission Control Portal and your environment is set up.
  2. Once logged into the portal, navigate to the Programmable Voice tab on the left, and then click on TeXML Bin.
  3. Create a new TeXML Bin and input simple XML code into the Content field. Rafal used this code:

Sample xml code:

<?xml version="1.0" encoding="UTF-8"?>
<Response>
    <Say voice="alice">Selected number to connect to: 1 service, 2 reception, 3 restaurant</Say>
    <Gather numDigits="1" action="https://api.telnyx.com/v2/media/Response.xml"/>
</Response>
  1. Save, and then create another TeXML Bin. Input the “Response” XML code. Rafal used the code below.

Sample xml code:

<?xml version="1.0" encoding="UTF-8"?>
<Response>
{{#if {{Digits}} == 1}}
    <Say voice="alice">You will be connected with the service</Say>
    <Dial>
        <Number>+123456789</Number>
    </Dial>
{{#elseif {{Digits}} == 2}}
    <Say voice="alice">You will be connected with the reception</Say>
    <Dial>
        <Number>+123456789</Number>
    </Dial>
{{#elseif {{Digits}} == 3}}
    <Say voice="alice">You will be connected with the restaurant</Say>
    <Dial>
        <Number>+123456789</Number>
    </Dial>
{{#else}}
    <Say voice="alice">Selected number is incorrect. Try again</Say>
    <Gather numDigits="1" action="https://api.telnyx.com/v2/media/Response.xml"/>
{{/if}}
</Response>
  1. Save.
  2. Create a TeXML Application and enter in the URL from your first TeXML Bin file into the field “Send a TeXML Webhook to the URL:”
  3. Associate an outbound profile to the application and save.
  4. The last step is to navigate to “My Numbers” and assign a number to the TeXML application.

Then, you are ready to make a call and test out your IVR menu!

Contact a member of our team to learn more, and explore other TeXML tutorials in our Developer Docs.

Share on Social

Sign up for emails of our latest articles and news

Related articles

Sign up and start building.