Complete Twilio WhatsApp Setup Guide
π― What You're Building
Fleet creates request β Supplier company gets WhatsApp notification
β
Supplier replies "ACK" β Status updates to acknowledged
β
Fleet company gets notification β "Supplier acknowledged"π Prerequisites
Part 1: Twilio Setup (15 minutes)
Step 1.1: Create Twilio Account
Step 1.2: Enable WhatsApp Sandbox
Step 1.3: Get Credentials
Part 2: Supabase Configuration (10 minutes)
Step 2.1: Install Supabase CLI
Step 2.2: Login & Link Project
Step 2.3: Set Twilio Secrets
Part 3: Deploy Edge Functions (5 minutes)
Step 3.1: Deploy Send Function
Step 3.2: Deploy Webhook Function
Step 3.3: Test Send Function
Part 4: Configure Twilio Webhook (5 minutes)
Step 4.1: Set Incoming Message Webhook
Step 4.2: Test Incoming Webhook
Part 5: Hook Up to Service Requests (10 minutes)
Step 5.1: Add Notification to Request Creation
Step 5.2: Test End-to-End Flow
Part 6: Production Setup (Future)
Get Real WhatsApp Business Number
π§ͺ Testing Checklist
β
Outgoing Messages
β
Incoming Messages
β
End-to-End Flow
π Troubleshooting
"Twilio not configured on server"
"No routing target available"
"Unknown phone number" from webhook
Webhook not receiving messages
π Architecture Overview
π Key Concepts
Company-Owned Work (BIBLE Architecture)
Magic Links
Two-Way Messaging
π Related Files
β
Success Criteria
Last updated
Was this helpful?