Senders
A Sender is a messaging profile that represents “who” is sending the message. Senders can be configured with multiple channels (SMS, WhatsApp, Email) and Zavu intelligently routes messages through them.What is a Sender?
Think of a sender as your messaging identity. It contains:- Phone number: For SMS and WhatsApp
- Email address: For email channel
- WhatsApp Business Account: For WhatsApp messaging
- Allowed destinations: Countries you can send to
Default Sender
Every project has a default sender. When you send a message without specifying a sender, Zavu uses the default.Zavu-Sender header:
Smart Routing
Zavu’s smart routing system automatically selects the optimal channel for each message based on cost, deliverability, and contact history.Smart routing only applies to outbound messages. When replying to an inbound message, Zavu always responds on the same channel the contact used.
When Smart Routing Applies
| Message Type | Routing Behavior |
|---|---|
| Outbound (you initiate) | Smart routing selects optimal channel |
| Inbound reply (direct response) | Always use the contact’s channel |
How It Works
For outbound messages, the router checks if the contact has previously messaged you. If they have, this affects channel availability:Channel Selection Algorithm
The router evaluates channels in this order:- Filter viable channels: Remove channels that can’t deliver (e.g., WhatsApp without open window)
- Sort by cost: Cheapest channels first
- Check success rate: Channel must have at least 80% success rate (or fewer than 3 attempts for exploration)
- Select best option: First channel meeting all criteria
Cost Optimization
| Channel | Approximate Cost |
|---|---|
| ~$0.01/message | |
| SMS | ~$0.05/message |
WhatsApp 24-Hour Window
WhatsApp has a strict rule: you can only send free-form messages within 24 hours of the last message received from the contact.Channel Metrics
Zavu tracks delivery metrics for each contact and channel:- Avoid channels with low success rates (below 80%)
- Prefer faster channels when speed matters
- Explore new channels (first 3 attempts get a chance regardless of stats)
Automatic Fallback
When a message fails on one channel, Zavu automatically retries on an alternate channel.Fallback Flow
Fallback Rules
| Rule | Description |
|---|---|
| Max 2 attempts | Each message is tried on at most 2 channels |
| 5-second delay | Wait 5 seconds before retry to avoid race conditions |
| No duplicate channels | Never retry on a channel that already failed |
| Sender must support both | Fallback only works if sender has both channels configured |
Enabling/Disabling Fallback
Fallback is enabled by default. Messages track which channels have been attempted:Rate Limiting
Zavu implements fair rate limiting to ensure reliable delivery for all users.Limits by Channel
| Channel | Rate Limit | Level |
|---|---|---|
| SMS | 10 messages/second | Global |
| 14 messages/second | Global | |
| 60 messages/second | Per WABA |
Round-Robin Fairness
When multiple projects are sending messages, Zavu uses round-robin scheduling to ensure fairness:Messages are never dropped due to rate limiting. They’re queued and sent at the next available slot.
Email Channel
Email works differently from SMS and WhatsApp. It’s a separate channel that must be explicitly selected and does not participate in smart routing or automatic fallback.Key Differences
| Feature | SMS / WhatsApp | |
|---|---|---|
| Smart Routing | No - must specify channel: "email" | Yes - auto-selected |
| Automatic Fallback | No | Yes (SMS / WhatsApp) |
| Recipient Type | Email address | Phone number (E.164) |
| Delivery Tracking | No webhooks | Yes - status updates |
| Setup Required | Domain verification (DKIM) | Phone number |
Why Email is Separate
Email addresses and phone numbers are fundamentally different identifiers. A contact might have both, but they represent different communication preferences. Smart routing between email and SMS/WhatsApp doesn’t make sense because:- Recipients are different (email vs phone)
- User expectations differ (email is async, SMS/WhatsApp is immediate)
- Delivery semantics differ (no read receipts, different spam handling)
Sending Email
To send an email, explicitly setchannel: "email" and provide a subject:
HTML Emails
You can send rich HTML emails by includinghtmlBody:
Email Requirements
| Field | Required | Description |
|---|---|---|
to | Yes | Valid email address |
channel | Yes | Must be "email" |
subject | Yes | Email subject line (max 998 chars) |
text | Yes | Plain text body |
htmlBody | No | Optional HTML version |
replyTo | No | Reply-To address |
Domain Verification
Before sending emails, your sender must have a verified domain. This involves:- Adding your domain in the Zavu dashboard
- Adding DKIM records to your DNS
- Waiting for verification (usually minutes)
Managing Senders
List Senders
Create Sender
Update Sender
Webhook Configuration
Each sender can have one webhook configured to receive real-time notifications for events like incoming messages and delivery updates.Create Sender with Webhook
Update Webhook
Regenerate Webhook Secret
If your webhook secret is compromised:Available Webhook Events
| Event | Description |
|---|---|
message.inbound | Customer sent you a message |
message.sent | Your message was sent to the carrier |
message.delivered | Your message was delivered |
message.failed | Message delivery failed |
conversation.new | First message from a new contact |
For more details on webhook payloads and security, see the Webhooks guide.
Best Practices
Configure Multiple Channels
Set up both SMS and WhatsApp on your sender to enable automatic fallback.
Use Templates for Outreach
When initiating conversations, use WhatsApp templates to avoid 24-hour window issues.
Monitor Metrics
Check your contact metrics to understand channel performance in your region.
Set Allowed Destinations
Restrict senders to specific countries to control costs and compliance.