The agent that decides when to knock
outreachAI messages customers who haven't written to us — leads who never finished a profile, consent cards left unanswered, new matches worth announcing. There is no fixed schedule and no message templates ladder: an AI weighs each person's situation every cycle and decides — send, wait, or skip — the way a thoughtful human would.
flowchart TD
TICK["⏰ Every 15 minutes"] --> G1{"Master switch on?"}
G1 -->|"off"| S1["🛑 nothing sends, to anyone"]
G1 --> G2{"Between 9 AM and 9 PM
Pakistan time?"}
G2 -->|"no"| S2["💤 wait for morning"]
G2 --> G3{"Under today's
sending ceiling?"}
G3 -->|"no"| S3["🛑 done for today"]
G3 --> SCAN["Scan the journeys
🔒 launch whitelist applies"]
SCAN --> B1["Lead follow-up"]
SCAN --> B2["Ad-click leads
(72-hour window)"]
SCAN --> B3["Unanswered consent card"]
SCAN --> B4["New match waiting"]
B1 --> DEC
B2 --> DEC
B3 --> DEC
B4 --> DEC
DEC["🧠 DECIDE — per person:
send, wait, or skip?
reads the chat, the clock,
how often they reply"]
DEC -->|"wait / skip"| NEXT["looked at again next cycle"]
DEC -->|"send"| WRITE["✍️ COMPOSE
a better model writes the message"]
WRITE --> CHECKS["Final checks:
max 2 nudges between replies,
re-verify eligibility"]
CHECKS --> GW["📨 whatsappGateway"]
classDef gate fill:#f7edd8,stroke:#b4711a,color:#182420
classDef stop fill:#f6e3de,stroke:#a63a2b,color:#182420
classDef go fill:#e7f2ec,stroke:#166b4e,color:#182420
class G1,G2,G3 gate
class S1,S2,S3 stop
class DEC,WRITE,GW go
One cycle. Three hard gates before anyone is even considered; then a per-person decision.
Two switches that are often confused
| Switch | The question it answers | Today |
|---|---|---|
| Master switch | Is the post office open at all? | ON |
| Whitelist mode | Which addresses may receive mail? | HELD — test numbers only |
The whitelist is the launch gate: proactive outreach currently reaches only the test phone and the simulator band. Flipping it opens the door to every eligible real customer — a one-field change, made deliberately.
What paces the volume
- The AI itself — it reads the conversation, how much of today's sending window is left, and whether a better moment exists before a customer's free-messaging window closes.
- Two nudges, then silence — at most 2 proactive messages between a customer's replies. A reply resets the counter.
- A daily ceiling — a hard cap on total sends per day, Dashboard-editable, with a red warning on the staff overview at 80%. Test-band messages don't consume it.
- Proposals: 3 per day — Dashboard-editable, no weekly quotas.
The one message that can reach a closed chat
WhatsApp only allows free-form replies within 24 hours of a customer's last message. One journey — new-match notification — may cross that line, using a Meta-approved Urdu template. Everything else waits for an open window. If the template is ever missing from configuration, nothing is sent and an error is logged — no fallbacks, by owner ruling: the system never substitutes its own judgment for a missing instruction.