Routers

Send queries to the right A/B tests using simple rules.

What are routers?

Routers dynamically route requests to the right A/B test based on what's in the request—message content, metadata, model, etc.

When do you use routers?

Use routers when you want to manage routing logic in the UI instead of hardcoding multiple A/B tests in your code. If you prefer, you can also handle routing directly in your application code.

How do routers work?

Rules are evaluated in order, and the first matching rule determines which A/B test handles the request. You can route based on any request property.