AI Sales Bot — Bilingual Lead Automation
Bilingual Arabic/English AI sales and support bot built for an AI training company. Handles inbound lead qualification, course routing, FAQ responses, and automated follow-up — integrated directly into the production CRM pipeline via webhooks and internal API.
Problem
An AI training company in Amman, Jordan was handling inbound sales inquiries manually — sales staff responding to leads one by one via messaging channels in both Arabic and English. High lead volume, inconsistent response times, and repetitive qualification questions were creating friction in the sales pipeline and slowing course enrollment.
The company needed an automated first-response layer that could handle inquiries at any hour, qualify leads in both languages, recommend the right course, and push structured lead data into the CRM — without requiring manual intervention for common cases.
Solution
Built a bilingual AI bot that acts as the first touchpoint for inbound leads. The bot handles the full qualification loop: greet the lead, understand their intent, ask targeted questions, recommend a course based on their profile, answer common questions, and push a structured lead record into the CRM for sales team follow-up.
The bot is language-aware: it detects whether the user is writing in Arabic or English and responds in kind throughout the conversation. For mixed-language inputs — common in Arabic-speaking markets — it defaults to the lead's dominant language. Low-confidence or escalation-flagged conversations are handed off to the human sales team with full context.
Conversation Flow
Bilingual Implementation
Language switching mid-conversation is handled gracefully: if the user switches languages, the bot follows on the next response. This reflects common communication patterns in the target market where users code-switch between Arabic and English.
Architecture
Tech Stack
Key Features
- Bilingual Arabic/English — Detects and responds in the user's language; follows mid-conversation language switches
- Structured intent classification — Per-turn intent label and confidence score drives conversation stage transitions
- Multi-turn qualification — Persists session state across messages; collects background, goal, schedule, and contact info
- Course recommendation engine — Rule-based routing with LLM-generated natural-language explanation
- CRM push on qualification — Structured lead payload delivered to CRM pipeline without manual intervention
- Graceful escalation — Low-confidence and complaint intents route to human with conversation summary
- Follow-up automation — Scheduled re-engagement for incomplete qualifications via node-cron
- Arabizi normalization — Pre-processing handles transliterated Arabic before NLP classification
Security & Privacy
Lead conversation data is processed in-transit and stored as structured session state only. No raw conversation transcripts are retained beyond the active session. CRM lead records contain only structured qualification fields — not free-text chat logs.
LLM API calls use server-side key management with no client-side credential exposure. Webhook payloads are validated using HMAC signature verification before processing. No user PII, conversation samples, or lead data is disclosed in this case study.
Source Code & Constraints
Source code is private. The bot is in active production use. This case study describes architecture, conversation flow design, and technology choices. No client data, conversation samples, prompt templates, API credentials, or proprietary routing logic is disclosed.
What I Would Improve Next
- Persistent conversation memory: store a summarised lead history so returning leads don't restart qualification from scratch
- A/B testing layer: run parallel prompt variants on qualification sequences to optimise completion rate
- Dialect expansion: extend Arabic support to Egyptian and Gulf dialects with dialect-specific fine-tuning or routing
- Analytics dashboard: track intent distribution, qualification drop-off points, and conversion rate by language
- Sentiment tracking: flag leads showing frustration signals for priority human handoff before they disengage