Chapter 4

An overview of the Twilio Flex plugin solution

What are the steps you would take to implement chat to video escalation? Let’s walk through an overview of what you need to do.

Prerequisites

Using the Twilio Flex Video Escalation plugin assumes you have the following baseline for your current agent-customer interaction tech stack:

  • On the agent side, you currently use Twilio Flex 2.0 as the central contact center platform for your agents.

  • On the customer side, you use a web-based chat application built on top of the Twilio Conversations API.

Introduction to Twilio Flex

Twilio Flex is a customer engagement platform that centralizes all customer interactions in a single place, regardless of the channels your customers use to engage with your company. Your agents can interact through chat—within a single interface—whether your customers are using SMS/MMS, WhatsApp, or a traditional web-based chat interface. Flex also accommodates inbound and outbound voice calling capabilities.

Although building a full-featured contact center with Flex may seem complicated, getting up and running is straightforward and fast. You can start by watching a video that walks you through how simple it is. Setting up your Twilio Flex instance will provision a new Twilio number for you. This number can accept voice calls and text messages.

Introduction to Twilio Conversations

While the agent-side of the interaction leverages Twilio Flex, your customers can chat within a traditional web-based chat client built on top of Twilio Conversations. Twilio Conversations is a set of APIs and SDKs used for building chat experiences using Twilio-supported channels. Developers can use the programming language of choice for building the client-side application, making calls to the Conversations API. Twilio also provides an SDK for building Android, iOS, and JavaScript-based applications.

You can refer to the following guides to quickly get up and running with Twilio Conversations:

A user using the chat-to-video escalation feature in Flex.

Overview of the Flex Plugin

The chat to video escalation feature is implemented as a Flex Plugin built for Flex 2.0. Code for the plugin is publicly accessible in this GitHub repository.

What are Flex Plugins?

The Flex UI is a fully programmable platform that allows developers to build a custom user experience and behaviors within the Flex contact center. The standard method of implementing these customizations is through building Flex Plugins. Flex Plugins are built on Node.js with React and ReactDOM

Plugins can access the frontend API for Flex, allowing developers to add or remove components, build custom handling for Flex actions and events, and manage notifications.

Twilio provides a Flex Plugins CLI for developers to build, test, and release plugins. Flex admins can manage their plugins through the Flex Plugins Dashboard. If you’re interested in trying out Flex Plugin development on your own, you can get started here.

User experience flow for agent and customer

When using the Chat to Video Escalation in Flex Plugin, the end user experience flow looks like this:

Agent side

After determining that the chat interaction should be escalated to video, the agent clicks on the video icon in the chat window:

A new tab is visible to the agent, who clicks on the button to Join Video Room.

After clicking the join button, the agent connects to the video room and can interact with the customer.

Now face-to-face, the agent can determine the root of the customer's problem, consider possible solutions, and work with the customer to fix their issue in real-time.

This allows your team to resolve user issues faster and more efficiently, while ensuring every customer service interaction meets (or exceeds) your users' expectations. 

Customer side

Behind the scenes, Twilio creates a new video room and generates a unique code and URL for joining the video room. The Flex UI auto-sends a message to the customer:

When the customer clicks the link in the message they received, their browser opens a new tab with a button to Join Video Room.

After clicking the button, the customer connects to the video room and can interact with the agent.

Technical details

Because this is custom-built for Flex, the plugin leverages many behind-the-scenes Twilio resources to facilitate a seamless transition from chat to video. Twilio Serverless Functions handle all of the complexities regarding video room setup, token generation, and authentication. These details are invisible to the end user and abstracted from developers using the plugin.

The plugin performs the following processes:

  • Generating a unique code to act as the name of the video room

  • Creating the video room

  • Generating the access token for the agent to use to connect to the video room

  • Generating the access token for the customer to use to connect to the video room

The plugin also provides the in-browser video room UI, along with all Twilio Serverless Assets and logic using Twilio’s Programmable Video JavaScript SDK. This customer-facing application is part of the plugin, built and delivered to the customer in the browser when they click on the Join Video Room button. 

Many organizations quickly see the value of Twilio APIs and SDKs for their omni-channel customer engagement needs. This includes leveraging platforms such as Twilio Flex as well as plugins for customizing the Flex UI, such as the Video Escalation Flex plugin.

While Twilio’s platform flexibility is a strategic opportunity, it can pose a challenge for some organizations that may benefit from guidance in order to build the right solution from the start. When customers need to accelerate their implementation, minimize risk, or solve innovative problems on Twilio, they turn to the expertise of Twilio’s Professional Services team.

For example, ride share app Lyft partnered with Twilio’s Professional Services team to build a completely customizable call center that serves associates, drivers, and customers better than ever before.

In Lyft’s previous customer support solution, contact center associates had to look up an average of 11 data fields for every contact, creating too much work for associates and wasting customer’s precious time. Now with Twilio Flex, associates have all the contextual information they need to respond to a customer query, allowing them to serve riders and drivers faster and more seamlessly.

Thanks to Twilio’s Professional Services team, Lyft was able to build a Flex-powered custom call center that helps the business assist customers, millions of interactions at a time.

Read the full case study → 

Twilio Professional Services works alongside your company to plan your project, provide expert guidance and developer resources, and support you from project ideation to project completion.