WhatsApp Sales Engine | a product by SocialTech MDA
WhatsApp Chat Automation Developed for SocialTech MDA
Overview
WhatsApp Sales Engine is a multi-tenant sales automation platform developed to enable businesses to manage their sales conversations on WhatsApp through an AI-powered, centralized system. The project consists of a React-based admin panel for the operations team, a NestJS API, a PostgreSQL database, and a scalable message processing infrastructure. The platform transforms incoming messages into sales signals, bringing together conversation management, lead tracking, AI training, human agent handoffs, and performance analytics into a single system.
The Challenge
The system was not limited to simply generating automated WhatsApp responses. Since every business has a unique brand voice, products, sales approach, and customer objections, the AI needed to make business-specific decisions. Additionally, securely processing high volumes of webhook traffic, blocking repetitive messages, identifying sales-ready leads, and seamlessly transferring conversations to a human agent when necessary were critical technical requirements. In a multi-tenant architecture, isolating user, conversation, and analytics data at the workspace level was also one of the system’s fundamental security requirements.
What Was Done
The application was developed in a monorepo structure where a React/Vite admin panel works in tandem with a NestJS-based modular API. Webhooks received via the Meta WhatsApp Business API are processed through validation, signature verification, rate limiting, and deduplication stages before being routed to the message processing queue. The BullMQ and Redis-based execution pipeline manages incoming message analysis, AI sales decisions, and outgoing response processing using retry, exponential backoff, and error logging.
The AI decision engine utilizes support from OpenAI and Gemini providers. The system generates brand-specific responses by combining conversation history, website and Instagram analytics, product information, FAQ records, prohibited responses, and handoff rules. Based on customer intent, sales stage, objection type, and the next best action, the system decides whether to provide an automated response or transfer the conversation to a human agent.
The management dashboard features a live chat screen, mini CRM, lead filtering, manual message sending, AI mode management, handoff control, funnel analytics, AI performance metrics, brand training, and WhatsApp connection health screens. A secure and traceable infrastructure was established using JWT-based session management, persistent session revocation, admin/agent/viewer roles, workspace isolation, encrypted integration keys, real-time SSE notifications, email alerts, and support for Swagger and Sentry.
Result
The result is a comprehensive SaaS infrastructure that transforms WhatsApp conversations into a sales-focused operations center. Businesses can manage conversations, lead stages, AI response behavior, brand information, agent handoffs, connection status, and performance metrics all from a single dashboard. The platform automates repetitive messaging workflows while highlighting critical leads and managing the transition between AI and human teams in a controlled manner. Thanks to its multi-tenant architecture, queue-based workflow, and production-grade security layers, it provides a sustainable foundation that can scale to accommodate various businesses.
Gallery