Create routing rule
POST/omnichannel/routing-rules
Creates a new condition-action routing rule. Conditions and actions are supplied as JSON objects in conditions_json and actions_json fields respectively. Lower priority numbers are evaluated first. Use to implement skill-based routing, VIP escalation, or channel fallback logic.
Request
Request body
Content type application/json (required).
| Field | Type | Required | Description |
|---|---|---|---|
name | string | Yes | Human-readable rule name. Max length: 180 |
priority | integer | No | Lower numbers are evaluated first. Default: |
is_active | boolean | No | Set to false to disable without deleting. Default: |
conditions_json | string | No | JSON-serialised array of condition objects. Each object should have "field", "op", and "value" keys. |
actions_json | string | No | JSON-serialised array of action objects. Each object should have a "type" key and any required parameters. |
Example
{
"name": "VIP customer — assign to senior agents",
"priority": 10,
"is_active": true,
"conditions_json": "[{\"field\":\"priority\",\"op\":\"eq\",\"value\":\"urgent\"}]",
"actions_json": "[{\"type\":\"assign_profile\",\"profile_id\":5}]"
}
Responses
201 Routing rule created
422 Validation failed — check JSON field formats
Example request
curl -X POST "https://{tenant}.faciotech.net/api/v1/omnichannel/routing-rules" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{"name": "VIP customer — assign to senior agents", "priority": 10, "is_active": true, "conditions_json": "[{\"field\":\"priority\",\"op\":\"eq\",\"value\":\"urgent\"}]", "actions_json": "[{\"type\":\"assign_profile\",\"profile_id\":5}]"}'