← Back to list

Building a 24/7 Support Bot While Working Customer Service: My Journey

From 3 AM Wake-Up Calls to Engineering a 24/7 Multi-Lingual WhatsApp Support System

Glaine Justin · 2026-05-27 13:39 · 0 claps · 4.1 min read
#customer-service #automation #streamlit #python #whatsapp
Open on Medium ↗

Building a 24/7 Support Bot While Working Customer Service: My Journey

From 3 AM Wake-Up Calls to Engineering a 24/7 Multi-Lingual WhatsApp Support System

The breaking point came at 3:17 AM. After handling another support ticket through our website, my inbox was a graveyard of the exact same questions. I had the operational skills and a deep understanding of customer flows, but I lacked the time to write the same reply for the fiftieth time.

I was waiting for the volume to drop. So I stopped waiting.

I took my knowledge of Python, the Twilio API, and operational workflows, and decided to build something that couldn’t be ignored: an automated support system designed specifically to navigate and pass the brutal constraints of 24/7 airport logistics customer service.

The result is a modular, state-driven support bot running multi-lingual chat across web and WhatsApp, backed by a strict intent-matching engine. In live deployment, it handles the noise, translates on the fly, and captures leads automatically.

Here is how I engineered it, and why I’m open-sourcing the entire repository.

The Engineering Problem: Intent, Not Just Keywords

Most retail support bots fail because they optimize for strict keywords and ignore how humans actually type. Handling customer service at scale is an exercise in managing intent. The constraints are unforgiving:

  • Maximum Accuracy: Must answer common questions instantly, even with typos.
  • Zero-Friction Localization: Must auto-translate 40+ languages without manual intervention.
  • Fail-Safes: Must gracefully capture leads or hand off to a human when it fails.
  • Overhead: Must cost practically nothing to run.

If a bot fails any of these criteria, it creates more work than it saves. My architecture had to enforce resolution at the code level, completely removing manual triage from the equation.

The Intent Guardian Architecture

I built a dedicated fuzzy matching module that overrides the limitations of naive chatbots. It evaluates customer messages in real-time before executing any response.

  • Fuzzy Matching Engine: Keyword matching is useless. The system actively monitors incoming text against keyword lists using similarity thresholds. If it detects typos or rephrased questions, it automatically adjusts the scoring to find the right FAQ.
  • Zero-Cost Translation Pipeline: The algorithm scales multi-language support using googletrans + langdetect. Instead of burning hundreds of dollars on paid APIs, it detects and translates natively.
  • State Machine Persistence: Integrating Twilio’s WhatsApp API required tracking conversational context. I built session persistence into a local JSON architecture so conversations, lead-capture states, and live-agent handoffs survive server restarts.
  • Security Guard: Lead capture is blocked from plain text vulnerabilities. The system utilizes HTML escaping to prevent XSS attacks and keeps sensitive data out of version control.

Strategy Implementation

The bot executes a combination of web integrations and direct messaging flows, primarily focusing on capturing leads and deflecting repetitive inquiries.

  • Omnichannel Execution: Algorithms monitor both web inputs via Streamlit and webhook payloads via FastAPI, ensuring the bot’s logic remains consistent regardless of where the customer messages from.
  • Live Agent Handoff Consensus: Instead of forcing the user into an endless loop, the bot derives when a conversation has hit a dead end. Trades are handed over to a human dashboard, pausing the bot logic for that specific session until an admin resolves it.

The Tech Stack and Setup

I built this using Python and the Twilio WhatsApp API integration. Because support needs constant oversight, I integrated a centralized admin dashboard via Streamlit. This allows me to query live WhatsApp sessions, adjust the FAQ knowledge base, or execute a live-agent takeover from my phone without needing complex infrastructure access.

Launching the System

git clone https://github.com/glainejustin/support-bot.git
cd support-bot
python -m venv venv
source venv/Scripts/activate 
pip install -r requirements.txt

Business parameters are centralized in a business_config.py file, allowing users to adapt the limits to their specific company's requirements:

# === Core Business Settings ===
COMPANY_NAME = "ARC Support"
PRIMARY_COLOR = "#0066cc"
REQUIRE_EMAIL_FOR_HANDOFF = True
ENABLE_WHATSAPP_WEBHOOK = True

The Brutal Reality of Automation

Building this was not a smooth process. It was a grind of debugging obscure API errors and edge cases.

I spent days fighting state errors on WhatsApp only to realize I needed a robust way to track phone numbers through the conversation funnel. I had to learn the hard way that storing customer leads in plain text is a nightmare, forcing me to implement HTML escaping and environment variables for admin credentials.

These are the engineering hurdles that tutorials skip. You only learn them by breaking things and patching them at 3 AM.

Why I’m Open-Sourcing This

  • Proof of Work: The tech landscape is highly competitive. A live, working SaaS project demonstrates API integration, state management, and real-world problem-solving better than any resume.
  • Transparency: Small businesses are often priced out of decent support automation by overpriced, enterprise-tier systems. I wanted to release something transparent and functional.

This bot is a culmination of years of operational experience — a foundation built on protecting my team’s time and efficiency. As a blood brother, I take responsibility for my circle, and I bring that same protective, solution-oriented mindset to the code I write.

It is not a guaranteed fix for bad customer service. It is a strict, programmatic tool designed to enforce efficiency.

I didn’t build this to replace my team; I built it to protect our time. Since implementing this solution, I’m no longer waking up at 3 AM to answer questions about Slack integrations. The bot handles the noise, flags the complex issues for human review, and captures the leads we were previously dropping.

It is an MVP, and it has its limitations, but it proves that you don’t need an enterprise budget to build an automated, multi-channel support pipeline that actually functions.

If you are tired of answering the same five questions every day and want to spin up your own instance, you can find the complete source code, installation guides, and security documentation below.

You can review the code, fork the repository, and test the architecture yourself here: GitHub Repository

Disclaimer: This software is provided for educational and operational purposes. Live deployment conditions, including Twilio rate limits and Streamlit hosting constraints, will impact execution. Deploy at your own risk.

Built with ❤️ by glainejustin.


메타데이터
post_id
d75de568dd02
slug
building-a-24-7-support-bot-while-working-customer-service-my-journey-d75de568dd02
url
https://medium.com/@glainejustin/building-a-24-7-support-bot-while-working-customer-service-my-journey-d75de568dd02
canonical_url
https://medium.com/@glainejustin/building-a-24-7-support-bot-while-working-customer-service-my-journey-d75de568dd02
author_url
https://medium.com/@glainejustin
status
ok
fetched_at
2026-06-09 15:37:30