Welcome back to TaCode Tuesdays! This is the only place you can find snippets of code for use in your very own text/voice apps, along with a weekly dose of taco puns. I’m a developer here at Zang and not only am I a big fan of tacos (if that wasn’t already apparent), I’m also a fan of open source. My goal is to share a new app idea each week that you're free to use “as is” or modify and use as the basis for your next app.
In the last set of post, I've detailed how you can create a chat application using Swift and Zang on iOS—you can check out PART 1 here, PART 2 here, and PART 3 here. If you’d like to learn how to get started on Zang, take a look at our very first post.
This week I’m going to start a two-part tutorial detailing how you can build your own IVR (Interactive Voice Response). But before I get into it, let me revive our Taco Tip of the week!
Seasoning for your ground beef is usually pretty simple—a pinch of chili powder, onion powder, oregano, paprika, salt, and maybe sugar. The 'secret' ingredient...tomato sauce. Try it out and see for yourself!
Anyway, let's get into the background of the app we'll be building over the next two weeks.
The Interactive Voice Response system (IVR) is critical to call centers handling high call volumes. IVR technology serves as a gate keeper, filtering and categorizing customer needs based on their menu selections. After which, the solution directs them to the correct unit and individual who are specialized to better handle their concerns. Because IVRs are meant to handle huge call volumes, it can process concurrent calls, contributing to overall customer service process optimization. Unfortunately, IVRs are rather expensive in nature. For reference, a typical Cisco IP IVR with 25 ports costs more than $9,000. If your business is fairly new, investing in this amount would not be strategically sound.
Bringing down capital investments is a challenge not only to small businesses but to multi-national corporations as well. A few years ago, cloud computing pushed the call center industry to consider more cost efficient alternatives to the traditional IVR. Platform as a Service technology, such as Zang, gives developers an opportunity to create a custom IVR through their application programming interface (API).
This article demonstrates how to create a basic system to handle incoming calls, play an IVR menu, allow selections through dual-tone multi-frequency signaling (DTMF also known as button presses), and eventually transfer the call to the appropriate unit.Basic requirements in building a Zang IVR:
- Zang account and phone number. If you don’t have one yet, you can get one for free here.
- Any programming language can be used to consume Zang APIs. For the purpose of this tutorial, PHP was used.
- And because of that, you must have an intermediate understanding of PHP.
Before starting, create a call handling process flow detailing how the call will branch out as the customer selects and narrows down their selection. Below is an example:
Figure 1: Basic IVR Process Flow
The diagram above shows a simple IVR process flow wherein upon receiving an inbound call, the IVR gives three choices – Customer Service, Technical Support, and Sales & Marketing. Upon selection, another two to three options are played until the customer is transferred to a live agent to discuss and resolve their current issues.
Once you’ve already defined your process flow, you can follow this simple hierarchical input process output model (HIPO) to serve as guide in creating your program.
Figure 2: Input-Output Process Hierarchy
Creating a custom IVR using Zang API involves three easy steps.First, create the web service, which will render the menu system (see Figure 1). Second, create your output so that it follows the Zang InboundXML format. Third, initiate your code through Zang’s Representational state transfer (RESTful) API which will render it to the contacted party.