Building a WhatsApp lead bot with human handover and fallback handling
A developer describes how they run a WhatsApp lead bot for a Dubai business, focusing on production concerns beyond basic reply logic. The bot uses the unofficial Baileys library for the WhatsApp connection and OpenRouter for model calls, with JSON files storing session, lead and follow-up state. It tries six LLM models in order with timeouts and sends a fixed reply if all fail, and it pauses automatically when a prospect asks for a human, alerting the owner. The author also covers an owner-controlled ignore list, a scheduler that sends at most one follow-up during Dubai business hours, and cautions about WhatsApp restrictions and UAE personal data law.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.
Discussion (0)
Log in to join the discussion and vote.
Log in