Skip to main content
Smart Routing is Zavu’s system that automatically selects the optimal channel for each message, maximizing delivery rates while minimizing costs.
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

How It Works

For outbound messages, the router checks if the contact has previously messaged you:
Since WhatsApp is cheaper than SMS, the router prefers WhatsApp when the 24-hour window is open.

Channel Selection Algorithm

The router evaluates channels in this order:
  1. Filter viable channels: Remove channels that can’t deliver (e.g., WhatsApp without open window)
  2. Sort by cost: Cheapest channels first
  3. Check success rate: Channel must have at least 80% success rate (or fewer than 3 attempts for exploration)
  4. Select best option: First channel meeting all criteria

Cost Optimization

Smart routing can reduce messaging costs by up to 80% by preferring WhatsApp when available.

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.
If the 24-hour window is closed and you don’t have a template configured, the smart router will automatically select SMS instead of failing.

Channel Metrics

Zavu tracks delivery metrics for each contact and channel:
The router uses these metrics to:
  • 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

Tracking Fallback

Messages track which channels have been attempted:
In this example, the message first tried WhatsApp, failed, and was successfully delivered via SMS.

Manual Override

To bypass Smart Routing for a specific message, specify the channel explicitly:
You can optionally specify a sender by passing zavuSender (TypeScript), zavu_sender (Python), or the Zavu-Sender header (cURL). If omitted, your project’s default sender is used.

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.

Keep Numbers Updated

Invalid numbers waste attempts across all channels.

Next Steps

Senders

Learn more about sender configuration

WhatsApp Templates

Create templates for outbound messaging