← All Case Studies

CASE STUDY · WHATSAPP AUTOMATION

Conversational AI AgentCompleted · Real Client

OTTO Food on Wheels — WhatsApp Ordering Agent

A fully automated conversational ordering agent running inside WhatsApp — understanding typed and voice messages, taking orders in Roman Urdu, and preventing duplicate orders without a single manual step.

n8nClaude (Anthropic)OpenAI WhisperBaileysGoogle Sheets

THE PROBLEM

Manual orders over WhatsApp

OTTO Food on Wheels (Islamabad) handled every customer order manually over WhatsApp — each message read and answered by a person. No automation, no safeguards against double-booked orders, and no visibility into AI usage costs as the business considered scaling.

  • Every order message handled manually by a person
  • No protection against duplicate or double-booked orders
  • No cost tracking for AI-assisted support at scale

THE SOLUTION

A conversational agent, end to end

A WhatsApp-native ordering agent that understands typed and voice messages, replies naturally in Roman Urdu, browses the menu, takes orders, confirms details, and hands off to a human only when it genuinely can't help — with no manual babysitting required.

  • Typed and voice (Whisper transcription) messages supported
  • Duplicate order detection via deterministic state machine
  • Per-conversation AI cost tracking built in from day one

0

Manual order interventions needed

0%

Orders with complete data records

Duplicate order loops avoided

THE HARD PROBLEM

Duplicate orders without annoying customers

The obvious approach — asking the AI to remember — broke immediately. Here's how the real fix worked.

🔁

The naive approach failed

Prompting the AI to "remember if it already confirmed this order" caused an infinite confirmation loop — the agent would re-verify a fact that couldn't change, producing a bad customer experience every time.

⚙️

State machines, not prompts

Duplicate detection state was moved out of the LLM's conversation memory and into a deterministic workflow layer. The agent flags a possible duplicate once, then hands off. A lightweight classifier — a second, smaller AI call given actual conversation context — interprets the customer's reply directly.

No duplicated logic, no drift

Confirmed orders — whether first-time or duplicate-resolved — re-use the exact same downstream pipeline. When the AI fails to send complete order data, the system flags it in the data itself instead of silently producing bad records.

"This is the kind of bug that doesn't show up in a demo — it shows up after a few dozen real conversations, when customers reply in ways you didn't script for."

CAPABILITIES

What it does

💬

Natural Roman Urdu Replies

The agent converses naturally in Roman Urdu — the way real customers text. No rigid command structures, no scripts to memorize.

🎙️

Voice Note Transcription

Customers can send WhatsApp voice notes. OpenAI Whisper transcribes them automatically, so the same ordering flow works for voice as for text.

📋

Menu Q&A and Order-Taking

Browses the menu, answers questions, takes items, quantities, and delivery details — all within a single natural conversation thread.

🔁

Duplicate Order Prevention

A deterministic state machine catches potential duplicate orders before they happen, flagging once and resolving via a lightweight AI classifier — no loops.

🤝

Graceful Human Handoff

When the agent genuinely cannot help, it escalates to a human operator cleanly — logging the handoff reason and conversation context into Google Sheets.

💰

Per-Conversation Cost Tracking

Every conversation tracks its own AI token usage cost, giving the business full visibility before committing to scale — no billing surprises.

TECHNOLOGY

Built with

⚙️ Orchestration

n8nWorkflow AutomationDeterministic State LogicWebhook Triggers

🤖 AI & Intelligence

Claude (Anthropic API)OpenAI WhisperTool Use / Function CallingLightweight Classifier

📱 Integration & Data

Baileys (WhatsApp Web)Google SheetsConversation HistoryCost Tracking

Need a conversational agent?

Whether it's WhatsApp, Telegram, or another channel — let's build something that actually works in production.