SLA Breach Monitoring #
DMSI Service Management includes a background job that continuously monitors active requests for SLA breaches.
How the Background Job Works #
One of the eight Action Scheduler background jobs is dedicated to SLA monitoring. On each run, the job:
- Queries all open (non-completed, non-cancelled) requests that have an SLA template assigned
- Calculates elapsed business hours since the request was created
- Compares elapsed time against the template’s response and resolution targets
- Flags any request where elapsed time has exceeded a target
- Creates an escalation record for breached requests
Requests in On Hold status have their SLA timers paused. Time spent on hold does not count toward elapsed time.
Escalation on Breach #
When a breach is detected:
- An escalation record is created and appears in the Escalations section of Settings
- An
escalation-notificationemail can be sent to the designated escalation recipient - The
dmsi_sm_sla_breachWordPress action hook fires, allowing custom code to respond to the breach
The dmsi_sm_sla_breach Hook #
Developers can hook into breach events using:
add_action( 'dmsi_sm_sla_breach', function( $request_id, $breach_type ) {
// $breach_type is 'response' or 'resolution'
// Custom handling here
}, 10, 2 );
SLA Timer Display on Requests #
On each request detail page, an SLA timer shows the current status:
- Green – Within target time
- Yellow – Approaching target (within the final 20% of allowed time)
- Red – Target has been breached
The timer updates when the page is loaded.
