# FleetLume v14 - Daily Operations Workspace

## Purpose

Version 14 turns the existing dispatch, telematics, compliance, payroll, document, and accounting modules into a faster daily-use workspace. The release emphasizes fewer clicks, reusable work, role-specific queues, safe automation, and clear exception handling rather than adding disconnected administration pages.

## 1. Universal Operations Inbox

The **Operations** page now creates one role-aware queue from live records. It can surface:

- Loads that still need a driver or truck
- Late pickup and delivery activity
- Open operational exceptions
- Delivered loads missing a POD
- Documents nearing expiry
- Telematics connections requiring attention
- Overdue invoices
- Payroll statements awaiting review
- Failed accounting synchronizations
- Upcoming maintenance
- Current driver trips and trip alerts

Users may acknowledge, snooze for two hours, resolve, or open the related record. Inbox state is stored per user so one person's workflow does not hide another person's work.

## 2. Global search and command actions

The global command search now provides fast suggestions across supported operational records. Keyboard navigation is supported, and role-appropriate quick actions are available for common work such as creating a load, opening dispatch, uploading documents, running payroll, opening live tracking, and synchronizing accounting.

## 3. Recurring loads and duplication

**Dispatch / Load Templates** provides:

- Reusable lane templates
- Copy-from-existing-load setup
- Daily, weekday, weekly, biweekly, and monthly schedules
- Configurable next-run date
- Automatic generation through Autopilot
- One-click load duplication with an optional replacement pickup date

Generated records receive new load references and remain available for dispatcher review before commitment.

## 4. Smart dispatch recommendations

The dispatch recommendation endpoint ranks eligible driver and truck combinations using available operational data, including:

- Current or last-known truck position
- Empty-mile distance to pickup
- Driver assignment and availability
- Equipment availability
- HOS availability where a current clock exists
- Existing assignment validation
- Compliance and operational validation inherited from the command-center workflow

Recommendations explain the scoring factors. The dispatcher still approves the final assignment.

## 5. ETA and automatic milestone support

Autopilot records updated ETA snapshots for active route plans. The included default provider is a configurable traffic-adjusted heuristic using remaining route distance, driver status, and the configured traffic factor. Existing geofences and telematics events continue to drive pickup, border, delivery, and exception workflows.

A live traffic provider can be connected later through the existing routing integration boundary. The packaged default does not claim live traffic API data without provider credentials.

## 6. Simplified driver daily experience

The driver application keeps the current trip as the main task and adds:

- Current-week pay estimate
- Camera-first paperwork upload
- Document classification after upload
- Voice-to-text hurdle notes where browser speech recognition is available
- Existing recorded audio updates
- Navigation, trip status, stop, inspection, and hurdle actions
- Offline-safe form queueing and replay when connectivity returns

Browser background GPS remains subject to mobile operating-system limitations. Connected telematics remains the recommended source for continuous tracking.

## 7. Document classification

Uploaded documents can be classified as POD, BOL, fuel receipt, lumper receipt, scale ticket, border document, inspection, repair receipt, or another supported type. Classification uses file metadata and related record context first. When Gemini is configured and classification is enabled, AI may assist low-confidence cases. Users can review or rerun the classification.

## 8. Two-way QuickBooks workflow

The v13 QuickBooks connection is extended with:

- Manual two-way sync
- Scheduled two-way synchronization through Autopilot
- Pulling supported customer payment changes
- Updating linked FleetLume invoice balances and payment status
- Webhook intake, signature verification, event logging, and retry visibility
- Existing outbound invoice, expense, and payroll synchronization

The connection requires an Intuit application, cURL, valid OAuth credentials, entity mappings, and staging verification.

## 9. Reconciliation workspace

**Finance / Reconciliation** shows bank activity, cheque references, customer payments, and matching status. Accounting users can manually reconcile transactions or run safe automatic matching where both amount and a trusted linked reference agree. Ambiguous records remain open for human review.

## 10. One-click weekly payroll controls

The existing weekly payroll wizard, bulk payslip generation, fuel handling, cheque preparation, and accounting export now include payroll-period locking. Once locked, regular mutations are blocked until an authorized owner or administrator records an unlock. Drivers can view a clearly labelled current-week estimate before final approval.

## 11. Saved views and personal dashboards

Users may save filtered views for supported lists. Dashboard metric visibility and compact spacing are stored per user. The Operations page shows role-specific metrics, quick actions, setup progress, recent activity, and integration health.

## 12. Bulk actions

The load list supports selecting multiple loads to:

- Change status
- Notify assigned drivers
- Assign a dispatcher

Existing bulk payroll, cheque, accounting, export, and import actions remain available in their respective modules.

## 13. Improved CSV and Excel imports

The Import Center now provides:

- Upload preview before commit
- Source-column to target-field mapping
- Saved mappings
- Duplicate-aware insert/update behavior
- Row-level error records
- Downloadable error CSV
- Import change logging
- Undo for supported recent imports
- Secure scheduled drop folders scanned by Autopilot

External email, SFTP, or storage services may deposit files into the protected drop folders. The application does not bundle credentials for those external delivery services.

## 14. Notification preferences and escalation

Users can configure in-app, browser, email, and SMS channels, minimum severity, and quiet hours. Critical exception and accounting-failure escalation rules create timed escalation events for the configured roles. External delivery still requires working email/SMS infrastructure.

## 15. Unified load timeline

The load timeline combines supported status, stop, GPS, document, communication, exception, rate, invoice, payment, and automation events. Customer tracking uses a restricted customer-safe timeline and does not expose internal financial, driver, or compliance details.

## 16. Daily summaries and profitability

Autopilot can generate role-specific morning/evening summaries. The profitability workspace reports revenue, driver pay, expenses, estimated costs, and margin by load and supports date/customer/driver/truck filtering.

## 17. Backup and Integration Health centers

The Backup Center can create database, uploads, or full restore-point archives, record SHA-256 checksums, provide protected downloads, and prune records according to retention settings. Production copies should still be moved to encrypted off-site storage.

The Integration Health Center reports application status for supported telematics, QuickBooks, routing configuration, email/SMS, Autopilot, storage, and backup activity.

## 18. Help and onboarding

Role-aware help checklists explain the most important next steps. Completion and dismissal state are stored per user. Existing company onboarding and sample setup workflows remain available.

## Installation

1. Back up the database, files, configuration, and uploads.
2. Upload the v14 package over the existing installation.
3. Run:

```text
/install.php?unlock=1
```

4. Keep the unified Autopilot runner active every minute:

```cron
* * * * * /usr/bin/php /absolute/path/to/fleetlume/operations_autopilot.php >> /absolute/path/to/fleetlume/storage/operations-autopilot.log 2>&1
```

5. Open **Company Settings / Daily Use Automation** and review all switches.
6. Test recurring loads, smart dispatch, driver offline replay, payroll locking, QuickBooks Sandbox, scheduled imports, and backups on staging.

## Server requirements

- PHP with PDO MySQL
- cURL for QuickBooks and external HTTP integrations
- Zip and SimpleXML for XLSX imports
- Zip for full backup archives
- Sodium or OpenSSL for protected integration credentials
- A writable protected `storage` directory

