Step 2 — WhatsApp integration
Twilio WhatsApp Business API for instant first-touch messages with read receipts.
2 min read
Setting up WhatsApp
Step 1: Twilio WhatsApp sandbox
- Go to twilio.com/whatsapp/sandbox
- Follow the instructions to activate your test number
- Send the code shown to your phone to join the sandbox
Step 2: Send a message (Python)
from twilio.rest import Client
TWILIO_SID = "your_sid"
TWILIO_AUTH = "your_auth_token"
WHATSAPP_FROM = "whatsapp:+14155238886" # Twilio sandbox number
client = Client(TWILIO_SID, TWILIO_AUTH)
message = client.messages.create(
from_=WHATSAPP_FROM,
to=f"whatsapp:+971{lead['phone']}", # UAE numbers
body=f"Hi {lead['name'].split()[0]}! This is Neo from Steinhoff Systems. I saw you're interested in {lead['area']} properties. I have a few options — would you like me to send details?",
)
Step 3: Production WhatsApp Business API
The sandbox is for testing. For production:
- Apply for WhatsApp Business API through Twilio
- Submit your business for Facebook/Meta verification
- Get approved templates for your messages (Meta requires pre-approved templates)
Approved message templates (what you need)
| Template name | Use case |
|---|---|
lead_introduction | First WhatsApp message after lead capture |
appointment_reminder | Viewing confirmation |
follow_up | After no response to first message |
property_update | New matching properties |
Gotchas
- UAE numbers — strip the leading 0, prepend +971. Format:
whatsapp:+971501234567 - Read receipts — WhatsApp Business API provides
readstatus. Use it: only trigger the voice call if WhatsApp is unread after 30 seconds. - Rate limits — Twilio limits to ~1 message/second for new accounts. Queue messages if sending bursts.
- Template approval — Meta takes 24–48 hours to approve each template. Start the approval process before you have paying clients.
The follow-up sequence
- t+15s — WhatsApp intro message
- t+30s — If unread, voice call
- t+2min — If no WhatsApp response, follow-up WhatsApp
- t+15min — If still no response, second voice call (different message)
- t+1h — Final WhatsApp before archiving to CRM
This sequence recovers 37% of leads that would otherwise go cold.
AI Lead Automation · progress saved in this browser · sign in to sync across devices
Up next
Step 3 — Voice agent with Retell AI
Retell AI voice agent that calls leads, qualifies them, and handles Arabic/English switching.
2 min