Hour Usage Alert Emails #
Hour usage alert emails notify the customer and admin when a service contract’s hour consumption crosses a configured threshold. This gives both parties advance warning before the contract runs out of hours.
What DMSI Service Management Adds
Hour usage alerting is new to this extension. Core has no hour-based contract concept. The two alert thresholds and the background job that checks them are all part of Service Management.
When Alerts Are Sent #
The Hour Alerts background job runs every hour. On each run, it checks every active contract and compares hours used against hours allocated. An alert email is sent when usage crosses either threshold:
| Threshold | Default Value | Setting Location |
|---|---|---|
| First alert | 70% | Services > Settings > Alerts > Hour Alert Threshold 1 |
| Second alert | 90% | Services > Settings > Alerts > Hour Alert Threshold 2 |
Each threshold fires exactly once per contract per threshold crossing. If a contract recovers below a threshold (e.g., through contract adjustment), the alert may fire again if usage crosses the threshold again.
Who Receives Alert Emails #
Both the customer associated with the contract and the WordPress admin email address receive the hour usage alert. The email identifies:
- The contract name and number
- The current usage percentage
- The number of hours remaining
- A link to the contract in the admin area (admin email only)
Adjusting Thresholds #
To change the alert thresholds:
- Navigate to Services > Settings > Alerts.
- Adjust the Hour Alert Threshold 1 and Hour Alert Threshold 2 values (enter as whole numbers, e.g.,
70for 70%). - Click Save Changes.
Changes take effect on the next run of the Hour Alerts background job.
Disabling Hour Alerts #
To disable hour usage alert emails entirely, navigate to Services > Settings > Notifications and uncheck the hour-usage-alert toggle.
