# Monitoring Dashboard — Feature Overview

**Product:** Go-Parts Central Admin (Filament)
**Feature Name:** Monitoring Dashboard
**Route:** `/monitoring`
**Date:** 2026-03-05
**Status:** Phase 1 Complete — Phases 3–7 Complete — Phase 2 Pending Approval

---

## What Is This?

The Monitoring Dashboard is a real-time order monitoring tool built into the Go-Parts Central admin panel. It replaces a manual, Excel-based workflow that the Operations team used to track order fulfillment and shipment status across all channels and suppliers.

Before this dashboard existed, the Ops team maintained two Excel workbooks:
- A **master order log** with monthly tabs, imported CSV data, and daily summary statistics
- A **daily monitoring workbook** with one tab per business day, tracking each order's shipment lifecycle manually

This required downloading CSVs, copying data between sheets, opening each order in Central one by one, visiting FedEx.com for tracking information, and manually flagging stuck shipments. The entire process was error-prone, time-consuming, and had no accountability trail.

The Monitoring Dashboard replaces all of it.

---

## Who Is It For?

The dashboard is designed for two distinct audiences:

### Operations Reps
Day-to-day order handlers who are each responsible for specific suppliers or channels (e.g., one rep handles USAuto/CarParts orders, another handles Keystone shipments). They need to:
- See only the orders relevant to their work
- Quickly identify what needs action today
- Flag issues, add remarks, set follow-up dates
- Hand off orders to other team members

### Director of Operations
High-level oversight role who needs to:
- Monitor supplier performance across all channels
- Identify patterns — which suppliers are causing delays, which issue types are recurring
- Review daily and monthly order flow metrics
- Ensure nothing is falling through the cracks

---

## The Five Tabs

### 1. My Queue
**For:** Operations Reps

A personal, filtered view of orders that belong to the logged-in user — either directly assigned to them or matching their designated supplier group.

- Orders assigned directly to the user appear at the top, highlighted
- Orders in their supplier group (e.g., all USAuto orders) appear below
- Badge count on the tab shows how many orders are assigned to them personally
- Empty state prompts them to check All Orders if their queue is clear

This is the first thing an ops rep sees when they open the dashboard. It tells them exactly where to start their day.

### 2. All Orders
**For:** Both

A complete, filterable table of all orders across all channels and suppliers. Default date range is the current month.

**Columns include:**
- Date placed, Order #, Customer/Company
- Carrier, Tracking # (clickable link to carrier tracking page)
- State, Warehouse, Supplier
- Order Total
- Pickup Date, Delivery Date
- Carrier Status (color-coded badge)
- Monitor Status (color-coded badge)
- Assigned To
- Remarks (editable inline)

**Filters available:**
- Date range (with presets: Today, Yesterday, This Week, This Month, Last Month)
- Supplier group (IN STOCK, EXPRS-MI, DEPO, TYC, PBI, CP)
- Channel (B2B/CarParts, B2C/Website)
- Monitor status (Monitoring, Flagged, Action Needed, Escalated, Resolved)
- Carrier status (Label Created, In Transit, Out for Delivery, Delivered, Exception)
- Assigned To (Everyone, Assigned to Me, Unassigned)

**Row actions:**
- Assign to a team member
- Flag for attention
- Set a follow-up date
- Mark as resolved
- Add/edit remarks

### 3. Flagged
**For:** Both

Auto-filtered view of orders that need immediate attention. An order appears here automatically when any of the following conditions are met:
- Label was created more than 48 hours ago with no carrier movement
- Carrier has reported an exception (lost, damaged, address issue, etc.)
- Delivery date has passed the estimated ETA with no delivery confirmed
- A follow-up date has passed and the order is still unresolved

Each flagged row shows how long the issue has been open and what action has been taken (if any). Action buttons allow the team to assign, escalate, set a follow-up date, or mark resolved.

### 4. Issues Log
**For:** Operations Reps

A structured log of all order items where a known issue has been identified. Issues are derived automatically from order statuses already recorded in Central — no manual classification needed.

**Issue types tracked:**
| Label | Meaning |
|---|---|
| LIT | Lost In Transit |
| RWP | Wrong Part Received |
| DMG | Damaged (returned or not) |
| BO/OOS | Backordered / Out of Stock |
| UNSHP | Unshipped past expected date |
| CANC | Cancelled |
| PND | Pending customer reply |
| OTHER | Other sub-status issues |

Filters allow narrowing by issue type. Each row shows the Central status, issue label, resolution status, and assigned rep.

### 5. Director View
**For:** Director of Operations

A read-only reporting and analytics view with no action buttons. It provides:

**Summary Stats (top row):**
- Total Orders (for the selected period)
- On-Time Delivery %
- Delayed Count
- Open Issues Count
- Unshipped Count

**Supplier Scorecard:**
One row per supplier category showing total orders, shipped, unshipped, delayed, issues count, on-time %, and average days in transit. Gives an at-a-glance view of which suppliers are performing well and which are causing problems.

**Daily Breakdown Table:**
Day-by-day totals broken down by supplier category — matching the format previously maintained manually in the Excel "REPORT" sheet. Auto-calculated from real data.

---

## Saved Filter Presets

Each user can save their current filter configuration as a named preset and reload it with one click.

**How it works:**
1. Set filters however you want (supplier, status, date range, channel, etc.)
2. Click **"Save Filters"** and give the preset a name
3. Optionally mark it as your **default** — it will auto-apply every time you open the dashboard
4. Access saved presets from the **"My Presets"** dropdown in the filter bar
5. Delete presets you no longer need

Presets are **per-user** — each team member's presets are private to them. A USAuto rep can save "USAuto Flagged This Week" and a Keystone rep can save "Keystone All Month" without interfering with each other.

This is especially useful for ops reps who monitor the same supplier every day — they set their filters once, save as default, and never have to configure them again.

---

## Assignment System

Orders can be assigned to individual team members directly from the dashboard. When an order is assigned:
- The assignee's name appears in the Assigned To column
- The order appears at the top of the assignee's My Queue tab, highlighted
- An assignment history record is created for audit purposes (who assigned, when)

Assignment can be done from any tab — All Orders, Flagged, Issues Log, or My Queue.

---

## Morning Alert Emails

Every morning at 7:00 AM PST, the system automatically sends an email digest to the Operations team summarizing overnight activity. The alerts are split by channel so each team only sees what's relevant to them.

**B2B Alert** (sent to CarParts/USAuto ops team):
- Urgent: orders flagged >48h with no resolution or assignment
- New Flags: orders auto-flagged since yesterday
- Unshipped: B2B orders placed >24h ago with no shipment
- Snapshot: yesterday's totals (orders, shipped, delayed, issues)

**B2C Alert** (sent to website/marketplace ops team):
- Same sections, filtered to non-B2B orders

Alerts skip weekends by default. On Mondays, the alert covers Saturday and Sunday activity.

---

## What This Replaces

| Old Manual Process | How the Dashboard Replaces It |
|---|---|
| Download CSV from CarParts portal, paste into Excel | Orders flow into the database automatically |
| Copy data between daily and monthly Excel sheets | Single source of truth — no copy-paste |
| Open each order in Central to find tracking number | Tracking number is a column in the table |
| Visit FedEx.com for each tracking number | Tracking numbers are clickable links; auto-sync planned (Phase 2) |
| Manually identify "Label Created" stalls | Auto-flagged after 48 hours of no movement |
| Email reps verbally about problem orders | Assign directly in dashboard; assigned orders surface at top of their queue |
| Maintain separate delayed orders sheet | Delayed Orders filter in All Orders tab |
| Calculate on-time %, delayed % manually in Excel | Auto-calculated and displayed in Director View |
| Track issues in a separate Excel sheet | Integrated Issues Log tab, derived from Central statuses |
| No proactive alerting — issues found when already late | 7 AM morning email digest with urgent/flagged/unshipped breakdown |

---

## Carrier Tracking Automation (Phase 2 — Pending Approval)

The current dashboard displays tracking numbers and order/shipment data from the existing database, but does **not** automatically check carrier status (e.g., whether a FedEx shipment is actually moving or stuck).

Phase 2 would integrate with the **ShipEngine Tracking API** to automatically:
- Poll carrier status for all active shipments every 2 hours
- Update carrier status badges (Label Created, In Transit, Delivered, Exception) in real time
- Auto-flag orders when a label has been sitting for >48 hours with no movement
- Auto-flag carrier exceptions immediately

**Estimated cost:** ~$53/month for all channels (6,281 packages/month at $0.0085/package), or ~$35/month for B2B only.

Without Phase 2, the Flagged tab's auto-detection for carrier issues will not trigger automatically. Ops can still manually flag orders and the rest of the dashboard functions fully.

---

## Technical Notes

- Built with **Laravel Filament 3** as a custom page with Livewire reactivity
- All data comes from the existing `orders`, `orders_items`, `shipments`, and `suppliers` tables — no data duplication
- A new `order_monitoring` table stores monitoring-specific data (flags, remarks, assignments, follow-up dates) without bloating core order tables
- Issue types are derived at query time from `orders_items.current_status` + `current_sub_status` — no parallel classification system
- Assignment reuses the existing `order_assignment` + `order_assignment_history` infrastructure already in Central
- Morning alerts are scheduled via Laravel's built-in task scheduler and sent via the existing mail configuration
