Automated Communications: Modern Way to Grow and Compete

by Vladimir Gordienko & Denis Sheremetov

Quality communication is vital for every company: customer engagement and customer relationships are a source of sustainable growth. Simultaneously, maximum automation of business processes can help businesses stay competitive. Cloud communications enable companies to meet both requirements.

Internet-based communications facilitate smoother communication with customers, employees, suppliers, and business partners. Businesses can engage their constituents via voice, SMS, and video, all in a single platform, and manage their applications, storage, and switching. Data protection, access to state-of-the-art technology, and the ability to add and remove users flexibly are some of the key benefits.

But what is cloud communications’ primary advantage over traditional providers? Imagine an automated contact center that responds to most of your customers’ queries over several communication channels. It’s integrated with your CRM system and can assist with sales, marketing, post-sales customer service, or technical support. And more than that, you’re saving costs on the infrastructure and human resources, as well as on software development. If you’re looking for this type of automated communications solution, this post is for you.

The marketplace doesn’t lack cloud communications services providers and platforms. For example, Twilio is a leading developer platform whose clients range from small startups to the world’s leaders like Airbnb, Lyft, Netflix, Uber, and Zendesk. The first part of this article briefly explains why Twilio may be right for your business as well. The subsequent sections explore its API capabilities in real-life scenarios.

Meet Twilio Cloud Communications Platform

Twilio is currently helping 40,000+ businesses embed telecommunications features into their web and mobile applications. Whether it’s voice phone calls in a contact center or things like Facebook Messenger, developers can incorporate them using Twilio. The building blocks to add communication capabilities to applications are:

1. Voice & Video: The API and SDKs help to build calling capabilities within apps. Businesses can connect to landlines, mobile devices or WebRTC clients to make calls from apps or power multinational call centers. Real-time video infrastructure and SDKs allow embedding video collaboration and context-sharing into apps. A global infrastructure handles signaling, registration, and media relay. Businesses can make, receive, and control calls from any app, and design workflows with an API for advanced call control.

2.Messaging: Twilio’s API and SDKs enable companies to send and receive SMS, MMS, and chat messages globally from web and mobile apps. Intelligent delivery features help ensure deliverability.

3.Authentication: Two-factor authentication service helps to strengthen or even replace traditional username and password login for websites, SaaS products, and mobile apps.

Behind these APIs is Twilio Super Network, a software layer that connects and optimizes communications networks around the world.

Twilio’s clients can build applications with any programming language that communicates standard HTTP. New features can be iterated leveraging their existing tech stack. The volume can be scaled up and down on short notice without any code changes.

The Twilio business model is neither a traditional on-premise software nor SaaS. Companies pay only for what they use, with no contracts required, and scale up on demand. Namely, customers can:

  • connect and route voice calls for a low per-minute price;
  • provision IP infrastructure with global voice connectivity;
  • communicate over VoIP to any browser or mobile application for a low per-minute price;
  • access free STUN lookup and low-cost TURN media relay capabilities distributed across five continents;
  • send SMS and MMS to almost 200 countries;
  • orchestrate interactions within CRM, Support workflows, and IoT using a vendor-agnostic API for intelligent task routing;
  • explore connectivity, termination coverage, and instantly provisionable local, national, toll-free, and short code number availability in almost 200 countries;
  • identify local-friendly number formats, reduce undelivered messages, and protect from spam/fraud.

Connections such as phone calls, SMS, and video sessions are measured in gigabytes. The contact center Twilio Flex is measured in the amount of time the agents spend using it. (You can view the prices for all services on https://www.twilio.com/pricing.) There are also automatic volume discounts which scale up and down with usage and discounts on support plans.

What’s most important, though, is that instead of building communication capabilities from scratch, you can focus on tailoring customer experiences. Let’s see how it can be done using the Twilio Voice API.

Introduction to Programmable Voice-Based Communications

Generally, Twilio interacts with an application through webhooks or Voice API. Your Twilio phone number can be configured to point to your application’s URL. When Twilio receives a call or SMS, it will send caller data/inputs and other required information as a request to the URL specified in that phone number’s configuration.

Request parameters contain the following required fields:

NameDescription
CallSidTwilio-generated unique identifier for the call
AccountSidYour Twilio account ID (34 characters long and starting with the letters AC)
FromThe call initiator’s phone number or client identifier
ToThe phone number or client identifier of the called party
CallStatusDescriptive status of the call, e.g., queued, ringing, etc.
ApiVersionThe Twilio API version that is used to handle the call
DirectionA string describing the direction of the call
ForwardedFromThis parameter is set when Twilio receives a forwarded call; its value depends on the information included by the caller’s carrier when forwarding
CallerNameThis parameter is set when the IncomingPhoneNumber has had its VoiceCallerIdLookup value set to true ($0.01 per lookup)
ParentCallSidA unique identifier for the call that created the current leg

The parameters can also contain geographic data, such as the city, state, postal code, and country of the caller and the called party in the format FromCity, ToCountry, etc.

The cloud will send back corresponding instructions as XML file TwiML (the Twilio Markup Language). TwiML tells Twilio what to do when you receive an incoming call or SMS. The application should also respond to Twilio with TwiML instructions.

There are three groups of TwiML elements: the root Response element, verbs, and nouns.

1) Response

<Response> is the root element of Twilio’s XML markup. In any TwiML response to a Twilio request, all verb elements must be nested within <Response>.

2) TwiML Verbs

Most elements in a TwiML document are verbs. They tell Twilio what actions to take on a given call. Verb names and their attribute names are case sensitive. Here is a short list of verbs for Programmable Voice:

NameDescriptionEnables to
ConnectInstructs Twilio to connect an incoming phone call to a RoomThe child Room noun allows to connect to a named video conference Room and talk with other participants connected to that Room.
DialConnects the current caller to another party.If the party answers the call, the two parties can communicate until one hangs up.– Assign caller to queues- Create conferences- Call to programmable Wireless SIM- Call to any SIP endpointAfter the dial ends, we can receive call status parameters like the status, duration, and URL to the recorded conversation.
EnqueueAdds the caller to a queue of callers.The maximum length of the queue is 100 by default but can be modified.– Set music that will be played while the user is waiting in a queue- Periodically get queue parameters like QueuePosition, QueueTime, AvgQueueTime, and CurrentQueueSize, and provide new instructions.
GatherCollects digits the caller types on the keypad or transcribes speech during the call– Collect user keyboard input- Collect user speech and get the result of the text transcription- Set expected words that we need to get from the user to improve recognition- Set the speaker language for recognition- Get the speech transcribed in real time
HangupEnds the call
Leave
Removes the caller from a queue of callers.Transfers the control of a call that is in a queue. The caller exits the queue and execution continues with the next verb after the original Enqueue.
PauseAllows to wait before executing more instructionsWait silently for a specified number of seconds before picking up the call.
PlayPlay for the caller an audio file whichTwilio retrieves from a client-provided URL– Set number of file repeats- Play DTMF tones
PayCaptures and processes credit card data during the call– Set the amount that has to be charged- Set currency- Set valid type(s) of credit cards- Set various payment connectors- Change default prompts for the payment process
RecordRecords the caller’s voice and returns the URL of a file containing the audio recording– Set up finish timeout or finish key- Trim leading and trailing silence- Transcribe the speech and get text instead of audio
RedirectRedirects the call flow to a different TwiML document at a different URL. All verbs after Redirect are unreachable and ignored.
RejectDeclines an incoming call to your Twilio number without being billed, thus blocking unwanted calls– Set reject reason
SayConverts text to speech and reads the text aloud to the caller– Set reader voice- Repeat text at set times- Set message language

3) TwiML Nouns

Nouns describe the phone numbers and API resources you need to take action on. Effectively, it’s anything nested inside a TwiML verb that is not itself a verb. It’s whatever the verb is acting on, e.g., the Number and Conference nouns within the Dial verb.

Using Twilio’s Voice REST API, you can

  • Make outgoing calls
  • Modify calls in progress
  • Query metadata about calls you’ve created

Twilio’s Programmable Voice offers more advanced call features: programmatic call control, call recording, creation of conference calls and call queues, etc. The API also allow routing voice calls with global reach to phones, browsers, SIP domains, and mobile applications.

Let’s take a look at a couple of business cases where the technology can be integrated.

Regarding the cost, the automated communications solutions appear to be extremely cost-effective.

For example, if the latter system serves 4 doctors, each working at least 20 days monthly and having 10 visits per day, that amounts to at least 800 visits per month. Let’s assume that only 10% of the patients will call to your automated contact center, and each call is about 5 minutes long. 50% of these patients will decide to connect with a doctor or operator. With Twilio’s prices for voice calls, we can calculate as follows: 

  • 800 SMS reminders per month: 0.0075 * 800 = $6.0/month
  • 400 min incoming calls per month: 0.0085 * 400 = $3.4/month
  • 200 min outcoming calls per month: 0.013 * 200 = $2.6/month

Total: $12.0/month

The Takeaway

The move to cloud communication solutions implies multiple strategic, financial, and technical benefits for businesses. Such services and platforms help to provide better customer experiences while automating processes and reducing the costs of hardware and software, support, maintenance, and IT staffing.

Amazon Connect, Twilio, and similar platforms facilitate quick and inexpensive automation for any business, ranging from small companies’ customer services to powerful banking support systems. This post has cited only a few programmable communications using voice API for a virtual contact center. Generally, everything related to phone calls, SMS, voice menus, voice recognition, chats, emails, video, and other business communication needs can be automated.

Are you tired of dealing with expensive contracts and equipment? Would you like to add communications into your businesses’ workflow easily? How about embedding voice, messaging, and video directly into your applications? Let us help you reinvent your company through an appropriate communications solution!

Register today.
For outstanding results and excellent customer service

* Required