Skip to content

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).

FieldTypeRequiredDescription
namestringYes

Human-readable rule name.

Max length: 180

priorityintegerNo

Lower numbers are evaluated first.

Default: 100 · Minimum: 1

is_activebooleanNo

Set to false to disable without deleting.

Default: true

conditions_jsonstringNo

JSON-serialised array of condition objects. Each object should have "field", "op", and "value" keys.

actions_jsonstringNo

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}]"}'
Loading