Docs Blog Sign in

SLA Policies

SLA policies define response and resolution time targets for tickets based on conditions and priority.

The SLA policy object

AttributeTypeDescription
idstringUnique identifier
namestringPolicy name (max 100 characters)
descriptionstring | nullPolicy description (max 500 characters)
isActivebooleanWhether the policy is active
timeModestringbusinessHours or calendarHours
conditionsarrayMatching conditions (see below)
targetsobjectTime targets by priority (see below)
positionintegerEvaluation order
createdAtstringCreation time (ISO 8601 UTC)

Conditions

[
  { "field": "priority", "operator": "is", "value": "urgent" },
  { "field": "tags", "operator": "contains_any", "value": ["vip"] }
]
FieldOperators
priorityis, is_not
typeis, is_not
statusis, is_not
tagscontains_any
assignee_idis, is_not, is_set, is_not_set
requester_domainis, is_not
customField:*is, is_not, is_set, is_not_set, contains_any

Targets

{
  "firstReply": { "urgent": 30, "high": 60, "normal": 240, "low": 480 },
  "nextReply": { "urgent": 30, "high": 120, "normal": 480, "low": 1440 },
  "resolution": { "urgent": 240, "high": 480, "normal": 1440, "low": 2880 }
}

Values are in minutes (minimum 1).

List SLA policies

GET /helpdesk/api/sla-policies

Create an SLA policy

POST /helpdesk/api/sla-policies

Requires admin role.

Update an SLA policy

PUT /helpdesk/api/sla-policies/:policyId

Delete an SLA policy

DELETE /helpdesk/api/sla-policies/:policyId

Reorder policies

PUT /helpdesk/api/sla-policies/reorder
{ "orderedIds": ["sla_1", "sla_2", "sla_3"] }

Test a policy

POST /helpdesk/api/sla-policies/test

Test which policy would match a sample ticket.

Get SLA state for a ticket

GET /helpdesk/api/sla-policies/ticket/:ticketId

Returns the current SLA status, deadlines, and breach state for the ticket.

Recompute SLA

POST /helpdesk/api/sla-policies/recompute

Recalculates SLA for all open tickets based on current policy definitions.