SLA Compliance Job #
The SLA Compliance job is the most frequently running background job. It evaluates open service requests against their assigned SLA templates every 15 minutes and detects breaches.
What DMSI Service Management Adds
SLA enforcement is entirely new to this extension. Core does not include SLA templates, response time targets, or resolution time targets.
What the Job Evaluates #
On each run, the job queries all open requests that have an SLA template assigned. For each request, it checks two targets:
Response Time Check #
Has a staff member added a note or changed the status since the request was created?
If not, the job calculates elapsed time from request creation to now. If elapsed time exceeds the SLA template’s response_time (stored in minutes), the request is marked as response-breached.
Resolution Time Check #
Has the request been closed (completed or cancelled)?
If not, the job calculates elapsed time from request creation to now. If elapsed time exceeds the SLA template’s resolution_time (stored in minutes), the request is marked as resolution-breached.
Business Hours Consideration #
SLA templates have a business_hours flag and a is_24_7 flag. When business hours mode is enabled and is_24_7 is false, elapsed time is calculated only within the defined business hours window. Time outside business hours does not count toward SLA targets.
What Happens on Breach #
When a breach is detected:
- The
dmsi_sm_sla_breachWordPress action hook is fired with the request ID and breach type. - An escalation-notification email is queued to the configured escalation recipients.
- The breach is recorded in the request’s SLA tracking data.
Breach records are used by the SLA Compliance widget and the SLA Compliance Report to calculate compliance rates.
Breach Idempotency #
A request that is already marked as breached will not trigger a second breach event on the next job run. The job checks the breach flag before evaluating and skips already-breached requests.
