1. home
  2. work
  3. omnichannel-ai-sales-agent

Omnichannel AI Sales Agent

An autonomous LLM agent that sells, verifies payments and delivers orders across WhatsApp, Messenger and Instagram.

Role
Sole engineer — architecture, agent design, dashboard, deployment
Status
Active · 2026
Visibility
Private source
Area
AI & agents, Automation, Full-stack

Problem

Digital-product sellers answer hundreds of DMs a day on three different apps, then check payment screenshots by hand and deliver each order manually. Response time — and sales — suffer the moment nobody is online.

See it run

Store assistant online · replies instantly

Hi! Is the 1-year plan still available? How much?

Yes, it’s in stock — $12 for 12 months. Want it activated on this number?

Perfect, paying now

payment.jpg

vision.verify_payment TrxID 9KX2…41 · $12.00 ✓

Payment verified. Your plan is active — details are in your inbox.

order #1042 · completed in 38s · no human needed

Example conversation: a customer asks for a product, the AI agent quotes a price, verifies the payment screenshot with a vision model, and completes the order automatically.

How it flows

  1. Customer DM
  2. Channel adapters
  3. Agent + FSM
  4. LLM & vision OCR
  5. Payment check
  6. Fulfilment
  7. Dashboard

What I built

  1. One agent across WhatsApp (Baileys) and Messenger / Instagram (Graph API), sharing a single catalog, customer history and order book.
  2. The sales funnel is a finite-state machine (discovery → product → awaiting payment → completed): the LLM converses freely while state changes stay deterministic and auditable.
  3. Vision OCR reads payment screenshots (bKash, Nagad, crypto, bank), extracts the transaction ID and amount, and verifies them before anything is delivered.
  4. Automatic delivery for licences and credentials, plus guided hand-offs for products that need a human step.
  5. Human-like pacing — typing presence, delays and per-chat queues — to keep messaging accounts healthy.
  6. An operator dashboard for live catalog and inventory edits, a sandbox to test conversations, payment audit and one-click Facebook / Instagram connection, plus admin chat commands (pause, mute, ban, reload).
  7. Model routing across Gemini, OpenAI and OpenRouter; sessions, orders, chat history and channel auth all persisted in PostgreSQL.

Notes

An earlier single-channel version added language matching (English, Bangla, Banglish, Hindi, Urdu), bargaining with floor prices and automatic customer tagging.

Stack

TypeScriptNode.js 22BaileysMeta Graph APIGeminiOpenAIOpenRouterPostgreSQLDocker
↑↓ navigate ↵ open Esc close