Skip to Content

Routing Tools

Define and simulate message routing rules that determine which provider, channel, or template to use based on event properties. 3 tools in this category.

routing.propose_rule

Propose a new routing rule. Rules are evaluated in priority order when a message is routed.

Roles: ADMIN_ONLY | draftByDefault: true

FieldTypeRequiredDescription
namestringYesRule name
brandIduuidYesBrand identifier
conditionobjectYesMatching condition
condition.fieldstringYesEvent field to match (e.g., channel, source)
condition.operatorenum(eq|neq|in|not_in|gt|lt)YesComparison operator
condition.valueanyYesValue to match against
actionobjectYesRouting action
action.providerstringNoOverride delivery provider
action.templateIdstringNoOverride template
action.channelstringNoOverride channel
priorityintegerNoRule priority (lower = evaluated first)
{ "tool": "routing.propose_rule", "input": { "name": "Transactional email via Postmark", "brandId": "brand-uuid", "condition": { "field": "channel", "operator": "eq", "value": "email" }, "action": { "provider": "postmark" }, "priority": 10 } }

routing.simulate

Simulate message routing to see which rules match and what provider/template would be selected.

Roles: ALL_ROLES

FieldTypeRequiredDescription
eventNamestringYesEvent type to simulate
payloadobjectYesSample event payload
{ "tool": "routing.simulate", "input": { "eventName": "lead.captured.v1", "payload": { "brandId": "brand-uuid", "email": "user@example.com", "source": "vsl_form", "channel": "email" } } }

routing.list

List all routing rules.

Roles: ALL_ROLES

FieldTypeRequiredDescription
brandIduuidNoFilter by brand
activebooleanNoFilter by active status
{ "tool": "routing.list", "input": { "brandId": "brand-uuid", "active": true } }