A router is a single lead-submission endpoint that's able to distribute lead submissions to any one of an account's various Flows, based on evaluation of rules.
The first rules that match are used to select the Flow and Source; subsequent rules are ignored.
Only one Router for a given integration (module-id) should exist in an account.
id | string (ID) ^[0-9a-fA-F]{24}$ ID of this router |
module_id | string (ID) ^[0-9a-fA-F]{24}$ A pointer to the integration code to use for this router |
Array of objects (Route) The routes to be evaluated by this router | |
created_at | string <date-time> (Timestamp) |
updated_at | string <date-time> (Timestamp) |
{- "id": "5fd4371e940df5a34a3888b2",
- "module_id": "5fd4371e940df5a34a3888b2",
- "routes": [
- {
- "id": "1aacd0",
- "flow_id": "5fd4371e940df5a34a3888b2",
- "source_id": "5fd4371e940df5a34a3888b2",
- "rule_set": {
- "id": "1aacd0",
- "op": "and",
- "rules": [
- {
- "id": "1aacd0",
- "lhv": "lead.state",
- "op": "is equal to",
- "rhv": "TX",
- "rule_set": { }
}
]
}
}
], - "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z"
}
[- {
- "id": "5fd4371e940df5a34a3888b2",
- "module_id": "5fd4371e940df5a34a3888b2",
- "routes": [
- {
- "id": "1aacd0",
- "flow_id": "5fd4371e940df5a34a3888b2",
- "source_id": "5fd4371e940df5a34a3888b2",
- "rule_set": {
- "id": "1aacd0",
- "op": "and",
- "rules": [
- {
- "id": "1aacd0",
- "lhv": "lead.state",
- "op": "is equal to",
- "rhv": "TX",
- "rule_set": { }
}
]
}
}
], - "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z"
}
]
Create a new custom router, adding it to the list of all routers in the account.
Create a new Router
Array of objects (Route) The routes to be evaluated by this router |
Created
{- "routes": [
- {
- "rule_set": {
- "op": "and",
- "rules": [
- {
- "lhv": "lead.state",
- "op": "is equal to",
- "rhv": "TX",
- "rule_set": { }
}
]
}
}
], - "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z"
}
[- {
- "id": "5fd4371e940df5a34a3888b2",
- "module_id": "5fd4371e940df5a34a3888b2",
- "routes": [
- {
- "id": "1aacd0",
- "flow_id": "5fd4371e940df5a34a3888b2",
- "source_id": "5fd4371e940df5a34a3888b2",
- "rule_set": {
- "id": "1aacd0",
- "op": "and",
- "rules": [
- {
- "id": "1aacd0",
- "lhv": "lead.state",
- "op": "is equal to",
- "rhv": "TX",
- "rule_set": { }
}
]
}
}
], - "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z"
}
]
{- "id": "5fd4371e940df5a34a3888b2",
- "module_id": "5fd4371e940df5a34a3888b2",
- "routes": [
- {
- "id": "1aacd0",
- "flow_id": "5fd4371e940df5a34a3888b2",
- "source_id": "5fd4371e940df5a34a3888b2",
- "rule_set": {
- "id": "1aacd0",
- "op": "and",
- "rules": [
- {
- "id": "1aacd0",
- "lhv": "lead.state",
- "op": "is equal to",
- "rhv": "TX",
- "rule_set": { }
}
]
}
}
], - "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z"
}
Update an existing custom router. Standard routers cannot be updated.
OK
{- "routes": [
- {
- "rule_set": {
- "op": "and",
- "rules": [
- {
- "lhv": "lead.state",
- "op": "is equal to",
- "rhv": "TX",
- "rule_set": { }
}
]
}
}
], - "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z"
}
[- {
- "id": "5fd4371e940df5a34a3888b2",
- "module_id": "5fd4371e940df5a34a3888b2",
- "routes": [
- {
- "id": "1aacd0",
- "flow_id": "5fd4371e940df5a34a3888b2",
- "source_id": "5fd4371e940df5a34a3888b2",
- "rule_set": {
- "id": "1aacd0",
- "op": "and",
- "rules": [
- {
- "id": "1aacd0",
- "lhv": "lead.state",
- "op": "is equal to",
- "rhv": "TX",
- "rule_set": { }
}
]
}
}
], - "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z"
}
]