Automations
Automations are conditional rules that apply actions to tickets when specified conditions are met.
The automation object
| Attribute | Type | Description |
|---|---|---|
id | string | Unique identifier |
name | string | Automation name (max 128 characters) |
description | string | null | Description (max 512 characters) |
isActive | boolean | Whether the automation is active |
rule | object | Rule definition (see below) |
position | integer | Evaluation order |
createdAt | string | Creation time (ISO 8601 UTC) |
Rule format
{
"all": [{ "field": "priority", "op": "equals", "value": "urgent" }],
"any": [{ "field": "tags", "op": "containsoneormoreof", "value": ["vip"] }],
"actions": [{ "field": "group_id", "value": "grp_abc123" }]
}
Condition operators
equals, notequal, greaterthan, greaterthanorequalto, lessthan, lessthanorequalto, contains, notcontain, startswith, notstartwith, endswith, notendwith, containsoneormoreof, containsnoneof
List automations
GET /helpdesk/api/automations
Create an automation
POST /helpdesk/api/automations
Requires admin role.
Request body
{
"name": "Auto-escalate urgent tickets",
"description": "Assign urgent tickets to the escalation group",
"isActive": true,
"rule": {
"all": [{ "field": "priority", "op": "equals", "value": "urgent" }],
"actions": [{ "field": "group_id", "value": "grp_escalation" }]
}
}
Update an automation
PUT /helpdesk/api/automations/:automationId
Delete an automation
DELETE /helpdesk/api/automations/:automationId
Reorder automations
PUT /helpdesk/api/automations/reorder
{ "orderedIds": ["aut_1", "aut_2", "aut_3"] }
Automations are evaluated top to bottom. The first matching automation applies.