Version 1.0 · 2026 · Includes: Blueprint PDF + Reference Webhook Code + Go-Live Checklist
WhatsApp is where your customers already are. This blueprint walks you from zero to a bot that: answers common questions instantly, captures leads into a list you own, and escalates the conversations a human should handle — running on YOUR server, with YOUR model, no per-message fees.
Deliverables in this bundle: -
blueprint.pdf — this guide -
reference/webhook.py — Meta WhatsApp Cloud API webhook
(verify + receive + auto-reply) -
reference/go-live-checklist.md — the 12-point launch gate -
Single-business commercial license
Customer's WhatsApp
│ (Meta's cloud relay)
▼
Meta WhatsApp Cloud API ──HTTP POST──▶ YOUR WEBHOOK (the code in this bundle)
│
├─ instant template reply
├─ lead captured to leads.json
└─ needs-a-human? ▶ notify you (email/another chat)
Two facts people don’t tell you upfront: 1. You need a small “system prompt” layer in Meta’s UI (pre-approved templates for the first outbound message) — it’s free tier, not a purchase. 2. The webhook must respond < 20 seconds. Our pattern: reply instantly with an acknowledgment template, then send the real answer one second later. Customers read it as “typing fast.”
Step 1 — Meta developer account (10 min). Create at
developers.facebook.com. Add the “WhatsApp” product. The
sandbox panel gives you a test number immediately — build on the sandbox
first, migrate to production numbers after your checklist passes.
Step 2 — Point Meta at your server (10 min). Your
webhook needs a public HTTPS URL. Fastest local options, in order of
permanence: - A server you own with a real domain (best), - A free
tunnel for development
(e.g. cloudflared tunnel --url localhost:8080).
In Meta’s app: WhatsApp → Configuration → Webhooks → set URL +
VERIFY_TOKEN (any secret string you also put in the code
below) → subscribe to the messages field.
Step 3 — Drop in the reference code (10 min).
pip3 install flask requests, save
reference/webhook.py, run python3 webhook.py.
Send a WhatsApp message to your test number: you’ll get the auto-reply.
Your bot is alive.
Step 4 — Plug in your brain (10 min). The reference
code has a brain() stub. Replace it with your local model
(the AI Tron Starter Kit’s think() works as-is) or any API
you prefer. The rest of the code — verification, dedupe, lead capture,
guardrails — stays.
Step 5 — The business layer (5 min). Edit
BUSINESS FACTS near the top: hours, location, returns,
anything a customer asks weekly. The bot answers from facts, not
imagination.
leads.json: who, when, what they asked.The one customization that earns your money back: the router’s sales branch. A lead asking “do you offer X for Y scenario” is a buying signal — the code stamps it HOT and notifies you within seconds. Call within the hour; you’ll close more than any ad improvement.
| Template | When Meta sends it | Example |
|---|---|---|
| Welcome | first contact | “Thanks for reaching ACME — how can we help? (hours/repairs/booking)” |
| Away | outside hours | “We’re offline till 9am — leave your question and we’ll reply first thing.” |
| Escalation ack | HOT/human class | “Got it — a specialist will call you shortly. Reply here to add details.” |
Write these three in your voice and your bot already sounds like your best employee.
reference/go-live-checklist.md)□ sandbox message round-trips □ fact answers correct □ after-hours template fires □ lead lands in leads.json □ HOT notification received □ dedupe test (re-send) □ kill switch known
VERIFY_TOKEN mismatch
or URL not HTTPS.Ship the boring version first. Bots earn trust one correct answer at a time.
— All Is One. Build fast.