Pipeline Router
Route events to different downstream pipelines based on configurable matching rules. This enables conditional fan-out, event filtering, and multi-path processing within your Signal deployment.
This integration is currently in beta. Configuration and behaviour may change.
Overview
The Pipeline Router is an internal Signal feature that evaluates incoming events against a set of rules and forwards them to different pipelines based on the result. This is useful when you need different vendors or processing logic for different event types, user segments, or traffic sources.
For example, you might route purchase events to your conversion tracking pipeline while sending page views to your analytics pipeline, or split traffic by geographic region.
Prerequisites
Understand Your Event Flow
Before configuring routing rules, identify which event fields you want to match on (e.g. event name, user properties, page URL) and which pipelines should receive each type of event.
Create Target Pipelines
Ensure the pipelines you want to route events to already exist in Signal. You will need their Pipeline IDs, which are visible on the pipeline detail page or via the Management API.
Plan Your Routing Rules
Map out your routing logic:
- Which field on each event determines the route?
- What values should match each pipeline?
- What happens to events that don’t match any rule (drop or send to a default pipeline)?
Configuration
| Field | Type | Required | Description |
|---|---|---|---|
rules_json | string | Yes | JSON array of routing rules. Each rule has a match expression and a pipeline_id to route matching events to. |
default_pipeline_id | string | No | The pipeline ID to route events to when no rules match. If not set, unmatched events are dropped. |
match_field | string | No | The event field path to evaluate against routing rules. Defaults to the full event object. |
Rules Format
The rules_json field accepts a JSON array of rule objects. Each rule is evaluated in order; the first match wins.
[
{
"match": "event_type == 'purchase'",
"pipeline_id": "pipe-conversion-tracking"
},
{
"match": "event_type == 'page_view'",
"pipeline_id": "pipe-analytics"
},
{
"match": "properties.country == 'GB'",
"pipeline_id": "pipe-uk-processing"
}
]Match Expressions
Rules support the following match expressions:
| Expression | Example | Description |
|---|---|---|
| Equality | event == 'Purchase' | Exact string match |
| Contains | context.page.url contains '/checkout' | Substring match |
| Starts with | event starts_with 'Product' | Prefix match |
| Regex | event matches '^Order.*' | Regular expression match |
| Exists | properties.order_id exists | Field is present and non-null |
| Numeric comparison | properties.total > 100 | Greater than, less than, etc. |
Signal Setup
Management UI
- Go to Integrations and open the Integration Library tab.
- Find Pipeline Router or filter by Other.
- Click Install and configure:
- Rules JSON: Enter your routing rules as a JSON array
- Default Pipeline ID (optional): The fallback pipeline for unmatched events
- Match Field (optional): The event field to evaluate
- Click Install Integration.
Management API
curl -X POST http://localhost:8084/v1/admin/integration-catalog/pipeline_router/install \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"name": "Pipeline Router",
"variant": "default",
"config": {
"rules_json": "[{\"match\": \"event == '\''Purchase'\''\", \"pipeline_id\": \"pipe-conversions\"}, {\"match\": \"event == '\''Page Viewed'\''\", \"pipeline_id\": \"pipe-analytics\"}]",
"default_pipeline_id": "pipe-catch-all",
"match_field": "event"
},
"delivery_mode": "server_side"
}'Delivery
The Pipeline Router operates entirely server-side within your Signal infrastructure. Events are evaluated and forwarded internally — no external HTTP requests are made. Routed events appear in the target pipeline’s processing flow as if they had been sent there directly.
The Pipeline Router does not modify events. It only controls which pipeline processes them. If you need to transform events before routing, apply transformations in the source pipeline before the router.
Example Configurations
Route by Event Type
Send conversion events to one pipeline and engagement events to another:
{
"rules_json": [
{ "match": "event == 'Purchase'", "pipeline_id": "pipe-conversions" },
{ "match": "event == 'Add to Cart'", "pipeline_id": "pipe-conversions" },
{ "match": "event == 'Page Viewed'", "pipeline_id": "pipe-engagement" },
{ "match": "event == 'Product Viewed'", "pipeline_id": "pipe-engagement" }
],
"default_pipeline_id": "pipe-engagement"
}Route by Traffic Source
Split processing based on where the user came from:
{
"rules_json": [
{ "match": "context.page.referrer contains 'google.com'", "pipeline_id": "pipe-paid-search" },
{ "match": "context.page.referrer contains 'facebook.com'", "pipeline_id": "pipe-social" }
],
"default_pipeline_id": "pipe-organic"
}Route by User Property
Direct events to different pipelines based on user attributes:
{
"rules_json": [
{ "match": "traits.plan == 'enterprise'", "pipeline_id": "pipe-enterprise" },
{ "match": "traits.plan == 'pro'", "pipeline_id": "pipe-pro" }
],
"default_pipeline_id": "pipe-free-tier"
}Testing
- Install the Pipeline Router with your rules configuration.
- Trigger events on your site that match different rules.
- Check each target pipeline’s event log to confirm events are arriving in the correct pipeline.
- Trigger an event that matches no rules and verify it either goes to the default pipeline or is dropped (depending on your configuration).
- Verify rule priority by triggering an event that could match multiple rules — only the first matching rule should apply.
Troubleshooting
| Problem | Solution |
|---|---|
| Events not being routed | Check that rules_json is valid JSON. A syntax error will prevent all routing. |
| Events going to wrong pipeline | Rules are evaluated in order; the first match wins. Reorder your rules so more specific matches come first. |
| All events being dropped | You have no default_pipeline_id set and no rules match. Either add a default pipeline or broaden your rules. |
| Invalid pipeline ID errors | Verify the target pipeline IDs exist. Check for typos or stale IDs from deleted pipelines. |
| Match expression not working | Check field paths use dot notation (e.g. properties.order_id, not properties[order_id]). Ensure string values are quoted in expressions. |
| Performance concerns | The router evaluates rules sequentially. For large rule sets (50+), consider consolidating rules or using multiple routers with simpler rule sets. |