AI sales agent on WhatsApp · SaaS · Conversational AI · WhatsApp
Pratika Sales
An AI sales agent that serves a business's customers on WhatsApp, shows the catalogue and takes the order.
- Role
- Founder & Software Engineer — product, architecture, AI agent, WhatsApp integration, billing
- Organisation
- Pratika
- Period · status
- 2026 – Present · In production
- TypeScript
- Next.js
- Supabase
- PostgreSQL
- WhatsApp Cloud API
- LLM APIs
- Stripe
- Playwright
Overview
Pratika Sales turns a small business's WhatsApp number into a digital salesperson: it greets customers, presents products with photos and the right prices, answers questions, checks availability, calculates totals, books appointments and takes the order — handing over to a person when it should.
The owner manages the catalogue, conversations, orders and the agent's knowledge from a web panel, and each business also gets a public online catalogue. It is live at sales.pratika.io with a 7-day trial and plans priced in Kwanza, USD, EUR and BRL.
Problem
In Angola most small businesses sell through WhatsApp, and the owner answers every message by hand — the same price questions, the same catalogue, at all hours. Messages that arrive while they are busy become lost sales.
An AI agent is only useful here if it never invents a price, a product or a promise. The product had to make the business's own data the authority and keep the owner in control of what the agent says.
Role
I defined the product and built it end-to-end: the data model and multi-tenancy, the WhatsApp Cloud API integration, the agent pipeline, the merchant panel, the public catalogue, billing and the admin back-office.
Architecture
- One Next.js application (UI, route handlers and server actions) deployed on Vercel, with Supabase (PostgreSQL, Auth, Storage, Vault) as the system of record and row-level security isolating every business.
- WhatsApp Cloud API webhook that acknowledges immediately and processes in the background, idempotent by payload hash and message id, with a short debounce so a burst of messages gets one coherent reply.
- Agent pipeline behind a provider interface: the LLM decides the intent (show catalogue, send photos, build an order, book an appointment) and the server writes the exact parts — catalogue lists, order summaries, prices and photos — from the database. Voice notes are transcribed before reaching the agent.
- Embedded Signup with Coexistence so a business connects its own number (keeping the WhatsApp Business app), channel tokens stored in Vault, daily jobs for customer memory, reminders and token expiry, and subscriptions via Stripe abroad and manual/local payment in Angola.
Technical decisions
- The AI never does the maths
- The model proposes an order by product id; prices, delivery fees and totals are computed on the server. A price guard blocks any reply that mentions an amount not registered in the catalogue and hands the conversation to the owner instead.
- Hand-off is not silence
- An unanswerable question flags the conversation for the owner and alerts them on WhatsApp, while the agent keeps answering everything else. It goes quiet only when the customer asks for a person or the owner takes over.
- The owner approves what the agent learns
- Past conversations and the owner's manual replies become suggested knowledge; only answers the owner approves reach the prompt, and per-customer memory is rewritten daily from new messages.
- Evaluate before changing the agent
- Prompt, flow or model changes go through a scenario evaluation against the real model, on top of unit, row-level-security and end-to-end tests — the agent's behaviour is treated as code that can regress.
Stack
- TypeScript
- Next.js
- Supabase
- PostgreSQL
- WhatsApp Cloud API
- LLM APIs
- Stripe
- Playwright
Engineering challenges
- Making an LLM reliable enough to talk to paying customers: no invented prices, products or promises, and graceful fallback when a provider is slow or down.
- Meta's platform constraints — 24-hour messaging window, approved templates, token expiry, media upload rules — designed into the product rather than discovered in production.
- Multi-tenant isolation across conversations, catalogues, tokens and billing, verified by integration tests against the database policies.
Outcome
Live at sales.pratika.io since October 2026: WhatsApp agent proven end-to-end with real messages, merchant panel (catalogue, conversations, orders, appointments, insights), public online catalogue, trial and subscription plans, and an admin back-office.
What I learned
- With an AI agent, the product is the guardrails: deciding what the model may decide, and what must always come from the database.
- Platform rules (Meta's in this case) are part of the architecture, not an integration detail.
