Shift Overdue
The Shift Overdue trigger fires when a device's active shift has exceeded a configured hours threshold. Use it to catch workers who forgot to end a shift, drivers who blew past their hours-of-service window, or trackers left in "on shift" mode overnight.
What It Does
A scheduled scanner inspects every active shift in your workspace and computes the elapsed hours since shift_started_at. When the elapsed time crosses the configured threshold_hours, the workflow fires with a payload that includes the shift start time, the elapsed hours, and the device's current location.
When to Use
- Catch field workers who forgot to clock out and remind them (or their manager)
- Enforce hours-of-service ceilings for compliance with labor regulations
- Detect trackers left in "on shift" mode overnight that should have ended hours ago
- Surface long-running shifts that may indicate the worker is stranded or in distress
Configuration
| Knob | Type | Default | Min / Max | Description |
|---|---|---|---|---|
threshold_hours | integer | (required) | 1 / 168 (1 week) | Fire once the shift's elapsed duration exceeds this many hours. |
repeat_policy | string | once_until_seen | enum | once_until_seen fires once per overdue shift and re-arms only after the shift ends. every_interval re-fires every cooldown. |
cooldown_minutes | integer | none | 1 / 10080 | Required when repeat_policy is every_interval. Minutes between repeat fires for the same still-overdue shift. |
device_filters | object | {} (all devices) | — | Optional filter: device_ids, exclude_device_ids, device_types (mobile, vehicle, iot, tracker, other), metadata_match. |
For typical 8-hour shifts, threshold_hours: 10 gives a 2-hour grace buffer for overtime without crying wolf. For hours-of-service compliance (US trucking), threshold_hours: 14 aligns with the FMCSA on-duty limit. Pair with repeat_policy: every_interval and a short cooldown if you want escalating reminders.
Trigger Payload
When the trigger fires, the following trigger_data envelope is delivered to every downstream action. Optional fields are only present when the underlying data is available.
{
"event_type": "shift_overdue",
"signal_type": "shift_overdue",
"device_id": "phone-jane-d",
"device_name": "Jane D. (iPhone)",
"device_type": "mobile",
"workspace_id": "a1b2c3d4-5678-90ab-cdef-1234567890ab",
"shift_started_at": "2026-05-20T06:00:00+00:00",
"hours_elapsed": 10.5,
"threshold_hours": 10,
"repeat_policy": "once_until_seen",
"shift_status": "active",
"location": {
"latitude": 37.7749,
"longitude": -122.4194
}
}
Template Variables
Reference these in any action body using the standard {{trigger.xxx}} syntax.
| Variable | Resolved Value |
|---|---|
{{trigger.event_type}} | "shift_overdue" |
{{trigger.signal_type}} | "shift_overdue" (mirrors event_type for signal-aware consumers) |
{{trigger.device_id}} | External device identifier (customer-assigned) |
{{trigger.device_name}} | Human-readable device name |
{{trigger.device_type}} | "mobile", "vehicle", "iot", "tracker", or "other" |
{{trigger.workspace_id}} | UUID of the workspace that owns the device |
{{trigger.shift_started_at}} | ISO 8601 timestamp of when the shift began |
{{trigger.hours_elapsed}} | Numeric hours elapsed since shift_started_at (integer or float) |
{{trigger.threshold_hours}} | The threshold the trigger was configured with (echoed back) |
{{trigger.repeat_policy}} | "once_until_seen" or "every_interval" |
{{trigger.shift_status}} | Current shift status (when present) — typically "active" |
{{trigger.location.latitude}} | Current latitude (only present when a location is available) |
{{trigger.location.longitude}} | Current longitude (only present when a location is available) |
Example Use Case
Scenario. A residential cleaning company schedules 8-hour shifts for its crews. Forgetting to clock out is the single biggest source of payroll disputes — and crews regularly leave the app running long after they have actually gone home. Operations wants two reminders: a gentle one at 10 hours, then escalating pings every hour after 12.
Workflow A — Gentle reminder.
- Trigger: Shift Overdue with
threshold_hours: 10andrepeat_policy: once_until_seen. - Action: Send the worker a friendly SMS via Twilio:
Hey {{trigger.device_name}}, looks like your shift has been running for {{trigger.hours_elapsed}} hours. If you are done, please clock out in the app.
Workflow B — Escalation.
- Trigger: Shift Overdue with
threshold_hours: 12,repeat_policy: every_interval,cooldown_minutes: 60. - Action: Notify
#ops-supervisorsSlack channel so the on-call supervisor can phone the worker directly.
Related Recipes
End-to-end runnable guides for routing this trigger to external systems:
- Slack Alerting — incoming webhook + copy-pasteable JSON
- PagerDuty Alerting — Events API v2 incident payload
- Generic HTTP Alerting — minimal curl-testable pattern
See Also
- Device Offline — device has stopped reporting entirely
- Device Stuck — device is reporting, but not moving
- Workflows In Depth — actions, templates, and execution model