AI Smart Routing
Let AI automatically pick the best channel for each recipient based on their engagement history.
Growth plan required. AI Smart Routing is available on the Growth and Scale plans.
Overview
Instead of specifying email, sms, or voice, set channel: "auto"and YourSend's AI will analyze recipient engagement data to pick the channel most likely to get a response.
Usage
smart-send.ts
import { YourSend } from 'yoursend';
const ys = new YourSend('ys_live_...');
// AI picks the best channel for this recipient
await ys.send({
channel: 'auto',
to: 'user@example.com', // email for email channel
phone: '+14155551234', // phone for sms/voice fallback
subject: 'Your order shipped', // used if email is chosen
html: '<p>Your order has shipped!</p>',
body: 'Your order has shipped! Track: https://track.example.com/1234',
});How It Works
- Contact lookup — YourSend checks the recipient's engagement history (open rates, click rates, response rates per channel).
- AI scoring — Each channel is scored based on historical engagement, time of day, and message type.
- Channel selection — The highest-scoring channel is selected and the message is sent.
- Fallback — If the selected channel fails (e.g., invalid phone number), YourSend automatically falls back to the next best channel.