SLA Indicators

IndicatorMeaningThreshold
🟒 GreenWithin SLA β€” healthyMore than 25% of duration remaining
🟑 AmberWarning β€” approaching breachLess than 25% remaining (configurable)
πŸ”΄ RedSLA breached β€” escalation triggered0% remaining, clock passed deadline
⚫ GreyNo SLA configured for this case type or stageβ€”
⏸ PausedSLA clock paused (waiting for customer, etc.)Pause condition is true

SLA Settings Reference

SettingTypeDescriptionExample
DurationDuration stringTotal time allowed from SLA start to completion2h, 1d, 5d, 30m
Warning ThresholdPercentage (0–100)Amber indicator triggers when this % of duration remains25
Business Hours OnlyBooleanPause clock outside working hours and on holidaystrue
CalendarReferenceBusiness hours calendar to use (timezone + working hours)uk-standard
Escalation TargetUser / Group / RoleWho receives breach notificationRole: manager
Escalation ActionEnumWhat happens on breachnotify, auto-reassign, advance-to-stage
Advance Target StageStage referenceStage to advance to if action is advance-to-stageescalated-review
Pause ConditionsExpressionBoolean expression β€” SLA clock pauses while truestatus == "waiting_customer"
SLA ScopeEnumApply at case level (full lifecycle) or per stagecase or stage

Configuring an SLA in Studio

  1. Open a case type in the Studio Case Type editor. Navigate to the SLA tab.

  2. Click Add SLA Policy. Choose scope: Case (applies to the full case lifecycle) or Stage (applies only within that stage). For stage-level SLAs, select the target stage from the dropdown.

  3. Set Duration. Use plain English shorthand: 2h (2 hours), 1d (1 business day), 3d 4h (3 days 4 hours).

  4. Set Warning Threshold (default 25%). The amber indicator appears when this percentage of duration remains.

  5. Toggle Business Hours Only if the SLA should pause overnight and on weekends. Select or create a Calendar for the timezone and working hours definition.

  6. Set Escalation Target and Escalation Action. On breach, Velaris fires the action and logs it to the audit trail.

  7. Optionally set a Pause Condition expression (e.g. status == "waiting_customer"). The clock pauses while the condition is true and resumes when it becomes false.

  8. Click Save. The SLA applies to all new cases of this type. Existing cases continue on their current SLA until manually updated.

SLA Clock Mechanics

Case created / Stage entered β”‚ β–Ό SLA clock starts (sla_clocks row created) β”‚ β”œβ”€β”€> Pause condition becomes true ----> clock paused (pause_start recorded) β”‚ Pause condition becomes false ----> elapsed pause added, clock resumes β”‚ β”œβ”€β”€> Warning threshold reached ----> amber indicator, no escalation yet β”‚ β–Ό Duration elapsed β”‚ β–Ό Breach recorded > escalation_target notified > escalation_action fired Audit log entry: category=sla_breach, case_id, policy_id, breach_at

Business Hours Calendar Configuration

Navigate to Studio > SLA > Calendars. Each calendar defines:

FieldDescriptionExample
NameIdentifier used in SLA policiesuk-standard
TimezoneIANA timezone stringEurope/London
Working DaysDays of week when clock runsMon–Fri
Working HoursStart and end time in HH:MM (24h)09:00–17:30
HolidaysList of dates (YYYY-MM-DD) when clock pauses all day2026-12-25, 2026-01-01

Querying SLA Status via API

# List cases breaching SLA
curl -s "http://localhost:8200/api/v1/cases?sla_status=breached&per_page=50" \
  -H "Authorization: Bearer $TOKEN" | jq '.items[] | {ref, sla_status, current_stage}'

# List cases in warning state
curl -s "http://localhost:8200/api/v1/cases?sla_status=warning" \
  -H "Authorization: Bearer $TOKEN"
sla_status valueMeaning
okGreen β€” within SLA
warningAmber β€” below warning threshold
breachedRed β€” SLA breached
pausedClock paused by condition
noneNo SLA policy on this case

Best Practices

Existing cases are not retroactively affected when you change an SLA policy. New cases pick up the updated policy; existing cases continue on the policy that was active when they were created.