Documentation
Policy Routing
Policy routing lets you define rules that guide how messages are routed based on business logic, without manually selecting each provider.
Policy components
A policy is a set of conditions and preferences that together determine routing behavior.
Destination filters
Country, operator, or prefix
Channel constraints
Only SMS, only WhatsApp, etc.
Provider preferences
Prioritize specific providers
Cost ceilings
Maximum acceptable price per message
Latency thresholds
Maximum acceptable delivery time
Trust score requirements
Minimum quality threshold
Example policies
OTP messages
Use lowest-latency provider with trust score ≥90
Marketing campaigns
Minimize cost, accept any trust score ≥70
Critical alerts
Use direct MNO routes only, failover to hub if unavailable
Policy evaluation
TrustRouter evaluates policies at send time against available routes. If no route matches the policy, the message is rejected with a clear error. If multiple routes match, TrustRouter selects based on the policy's optimization target (cost, latency, or trust score).