Reports
The Reports page lets you configure automated email reports with customizable schedules, recipients, and content.
Overview
Navigate to GSM Middleware → Reports to view and configure all available reports.
Key Features:
- 8 built-in reports covering order health, shipping, queue monitoring, and site issues
- Configurable schedules (hourly, daily, weekly, monthly, or custom cron)
- Per-report recipient lists and subject lines
- Test send capability for immediate previews
- Runs via external cron for reliability (not WordPress cron)
Permission Required: manage_options
Available Reports
| Report | Description | Default Schedule |
|---|---|---|
| Expedited Shipping | Daily list of orders using expedited (non-ground) shipping methods | Daily |
| Orders Backed Up (Queue) | Orders stuck in the processing queue | Hourly |
| Orders Backed Up (Navision) | Orders waiting for Business Central import | Hourly |
| Orders Not Imported | Orders that failed to import after 24+ hours | Daily |
| Site Issues | Summary of sync errors across all active sites | Daily |
| Shipping Report | General shipping activity summary | Daily |
| Daily Shipping | Daily shipment activity and tracking updates | Daily |
| Failed Queue Items | Daily summary of failed queue jobs with error details | Daily |
Interface
Report Summary Table
The main table displays all reports with:
| Column | Description |
|---|---|
| Report Name | Name and brief description |
| Schedule | Current schedule (e.g., "Daily at 08:00") |
| Recipients | Comma-separated email addresses |
| Last Run | Timestamp of most recent execution |
| Status | Active (green) or Disabled (gray) badge |
| Actions | Edit and Test Send buttons |
Editing a Report
Click Edit on any report to open the configuration modal:
Configurable Fields:
- Recipients — Comma-separated email addresses
- Subject Line — Email subject (supports report-specific defaults)
- Schedule Type — Hourly, Daily, Weekly, Monthly, or Custom
- Time of Day — Hour to send for daily/weekly/monthly (24-hour format)
- Day of Week — For weekly schedules (Monday–Sunday)
- Day of Month — For monthly schedules (1–28)
- Custom Cron — Full cron expression for advanced schedules
- Enabled — Toggle to activate/deactivate the report
Test Send
Click Test Send on any enabled report to immediately generate and email the report. This uses the current configuration and live data.
Schedule Configuration
Preset Schedules
| Schedule | Cron Expression | Example |
|---|---|---|
| Hourly | 0 * * * * | Every hour at :00 |
| Daily | 0 8 * * * | Daily at 08:00 |
| Weekly | 0 8 * * 1 | Monday at 08:00 |
| Monthly | 0 8 1 * * | 1st of month at 08:00 |
Custom Cron Expressions
For advanced schedules, use standard cron syntax:
┌───────────── minute (0-59)
│ ┌───────────── hour (0-23)
│ │ ┌───────────── day of month (1-31)
│ │ │ ┌───────────── month (1-12)
│ │ │ │ ┌───────────── day of week (0-7, 0 and 7 = Sunday)
│ │ │ │ │
* * * * *
Examples:
0 6,18 * * *— Twice daily at 6 AM and 6 PM0 9 * * 1-5— Weekdays at 9 AM*/30 * * * *— Every 30 minutes
External Cron Setup
Reports run via external cron, not WordPress cron. After configuring report schedules:
- Navigate to Tools → Crontab Generator
- Click Generate Crontab
- Copy the generated crontab entries (includes report schedules)
- Install on your server via
crontab -e - Click Mark as Installed to acknowledge
See Crontab Generator for full setup instructions.
Report Architecture
Data Flow
- External cron triggers
cron-reports.phpwith the report key Report_Managerloads the report class and configuration- Report generates data from database queries
- HTML email template renders the data
- Email sent to configured recipients
last_run_attimestamp updated
Database
Report configurations are stored in the rm_report_configs table:
| Column | Description |
|---|---|
id | Auto-increment primary key |
report_key | Unique identifier (e.g., expedited_shipping) |
name | Display name |
description | Brief description of what the report covers |
recipients | Comma-separated email addresses |
subject | Email subject line |
schedule_type | hourly, daily, weekly, monthly, or custom |
schedule_config | JSON with schedule details (hour, day, cron expression) |
is_enabled | Whether the report is active |
last_run_at | Timestamp of last execution |
settings | JSON for report-specific custom settings |
Related Documentation
- Crontab Generator — Generate and manage external cron entries
- Settings — Global plugin settings
- Cron Setup — Initial cron configuration