Web Application

Tracking Customer Service Hold Times

Using Python Flask, Twilio, and Next.js to measure and track Eastlink's customer service hold times

Updated by Brian Stever on

Next.js
Python
Twilio

Scope

Why Did I Do This?

It all began when my mom spent two hours on hold trying to cancel her Eastlink service. Eventually, she gave up and hung up. This wasn't just a one-off incident - friends had shared similar stories of endless hold music and frustration. When she told me about her experience, I was skeptical. Could it really be that bad?

As someone who had already used Twilio's API for other projects, an idea started forming in my mind. I wondered: Were Eastlink's hold times consistently this long? And more importantly, could I prove it?

I realized I could use Twilio to create a system to navigate Eastlink's phone tree and measure exactly how long it took to reach a human representative. The goal was straightforward, if a bit unconventional: build a system to call Eastlink during business hours and record the wait times.

This wasn't just about satisfying my curiosity anymore. It was about gathering solid data to prove what everyone suspected - that Eastlink's hold times were ridiculously long. No more relying on anecdotes. If their customer service really did suck as much as we thought, I was going to have the numbers to back it up.

UI

Visualizing the Data

Eastlink Call Wait Timer UI

Note the hour-plus hold time at 2 PM. Yikes! (Click to enlarge)

Technology

The Tech Stack

Python Flask
Twilio API
Next.js
React
      Python Flask: Because apparently, I wanted to learn about web servers and make my life more difficult.
      Twilio API: Turning our little server into a very persistent "customer" that never hangs up.
      Next.js & React: Because if you're going to display wait times, why not do it with style and unnecessary complexity?

A hodgepodge of technologies, proving that sometimes the journey is more important than the destination (or getting through to customer service).

How It Works

Why Wait When You Can Automate?

  1. Start the Python Flask server (it's alive!)
  2. Server uses Twilio to call Eastlink every hour during business hours
  3. Measure time until the call is disconnected - eventually someone will pick up and when they don't hear anything, they'll hang up. This is the time we're interested in.
  4. Store wait time data in a database (for science!)
  5. Next.js app fetches and displays data in real-time
  6. Marvel at the pretty graphs and concerning wait times

All this runs automatically, because who has time to manually call customer service 8 times a day? (Don't answer that, mom.)

Final Thoughts

What I Learned from This Brief Experiment

This quirky project turned into a crash course in web servers, APIs, and the art of automated phone calls. Who knew you could learn so much from trying to cancel your TV package?

My Findings

So what did I learn? Perhaps not surprisingly, wait times peaked in the middle of the day but were shorter early morning and late afternoon. If you called right when they opened, you might only wait a few minutes. However, wait times rapidly increased shortly after opening hours. On the first day, we recorded a maximum wait time of just over an hour. If you ask me, that's pretty unacceptable for a company that prides itself on customer service although not the reported 2 hours my mom experienced.

Challenges and Solutions

Building this project wasn't all smooth sailing. Here are some of the challenges I faced and how I tackled them:

  • Managing Twilio call costs: Waiting on hold isn't just frustrating, it's expensive! I optimized my code to minimize unnecessary call time and set up alerts to monitor my Twilio balance.
  • Handling calls outside business hours: I implemented a scheduling system that only placed calls during Eastlink's operating hours, avoiding wasted calls and costs.
  • Determining the optimal number of daily calls: Through trial and error, I found a balance between getting enough data and managing costs. I settled on calling every hour during business hours, with a cooldown period between calls to the same number.
  • Navigating the phone tree efficiently: I manually mapped out the phone tree, then programmed Twilio to input the right numbers at the right times. This required some fine-tuning to account for variations in response times.
  • Deciding when to disconnect the call: I relied on the representatives ending the call when they didn't hear a voice on the other end. This worked well and mimicked a dropped call, which is a common occurrence anyway.

Did I solve the problem of long wait times? Not really. But I did create a pretty cool way to visualize just how long those waits can be. And hey, if Eastlink ever stumbles upon this, maybe they'll be inspired to bump up their customer service game. (A guy can dream, right?)