Docs Blog Sign in

Automations

Automations are conditional rules that apply actions to tickets when specified conditions are met.

The automation object

AttributeTypeDescription
idstringUnique identifier
namestringAutomation name (max 128 characters)
descriptionstring | nullDescription (max 512 characters)
isActivebooleanWhether the automation is active
ruleobjectRule definition (see below)
positionintegerEvaluation order
createdAtstringCreation 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.