Bug: Shipments stuck in Picked and Shipping status — not advancing to Shipped #1

Open
opened 2026-06-29 08:18:05 +00:00 by van · 1 comment
No description provided.
rob added this to the eStack Sprint Board project 2026-06-29 09:36:26 +00:00
Owner

Page: Shipments (/retail/shipments) / Shipment Detail (/retail/shipments/{id})

Description

Shipments are getting stuck at two different points in the status flow and never reaching Shipped, which means parent orders never reach Complete. The pattern is channel-specific:

  • eBay (ShipStation) shipments → stuck in Picked
  • Walmart shipments → stuck in Shipping

Because neither group advances to Shipped, parent orders remain Active and SKU allocations are never released. The SKU widget shows these as active Retail Shipments, reducing Available to Sell incorrectly.

Example: Shipment #5280 (eBay) — tracking number present, Reported Back = Yes, Status = Picked. Parent Order #62765 = Active.

From the Shipments list (1,727 total), the majority of recent shipments are in Picked or Shipping — only a small number show Shipped. This is affecting a large volume of shipments across all stores and all dates including current shipments.

Expected status flow

New → Picking → Picked → Shipping → Shipped → (Order → Complete)

The rule is simple: if a shipment has a tracking number, it is considered shipped and must complete the full status cycle through to Shipped. The parent order must then automatically advance to Complete.

Channel-specific suspected causes

eBay / ShipStation — stuck in Picked:
The Picked → Shipping transition is not being triggered after label generation. Either:

  • The label generation action is not firing the status transition, or
  • shippedAt timestamp is not being set, blocking the state machine condition

Walmart — stuck in Shipping:
Shipments are reaching Shipping (submitted to Walmart) but not advancing to Shipped. Either:

  • The Walmart fulfillment acknowledgment/confirmation is not being received or processed, or
  • A polling job that checks Walmart for shipment confirmation is not running or failing silently, or
  • The Shipping → Shipped transition requires a callback from Walmart that is no longer working

Impact

  • Affects the majority of shipments across all channels and all dates
  • Parent orders remain Active instead of Complete
  • SKU allocations are never released — Available to Sell understated across all affected SKUs
  • SKU widget shows phantom Retail Shipments allocations for already-shipped stock

Steps to reproduce

  1. Navigate to Retail Shipments (/retail/shipments)
  2. Observe: the majority of shipments are in Picked (eBay) or Shipping (Walmart) status
  3. Open any Picked shipment with a tracking number — status has not advanced
  4. Open any Walmart Shipping shipment — status has not advanced

Backfill required

Once the root cause is fixed, a backfill script is needed to advance all currently stuck shipments:

Rule: any shipment with a tracking number that is in Picked or Shipping status must be advanced to Shipped.

Backfill sequence Van must follow in order:

  1. Find all shipments where status IN ('Picked', 'Shipping') AND tracking_number IS NOT NULL AND tracking_number != ''
  2. Advance each to Shipped status and set shippedAt if not already set
  3. For each affected parent order where all shipments are now Shipped, advance order to Complete
  4. Confirm SKU allocations are released after status changes

This applies to all dates — there is no cutoff. Any shipment with a tracking number is considered shipped regardless of when it was created.

Files to check

File What to check
Shipment entity / status state machine Transition conditions for Picked → Shipping → Shipped
Label generation controller Whether it sets shippedAt and triggers Picked → Shipping transition
Report Back action Whether successful report-back triggers status transition
Walmart channel connector Whether Walmart shipment confirmation is being received and processed
Order completion logic Whether Order → Complete triggers automatically when all shipments reach Shipped
Scheduled jobs / cron Whether status-advance jobs are running for both eBay and Walmart channels

Priority

Critical — affects the majority of shipments and orders site-wide; inventory allocations are significantly incorrect across all SKUs

**Page:** Shipments (`/retail/shipments`) / Shipment Detail (`/retail/shipments/{id}`) ### Description Shipments are getting stuck at two different points in the status flow and never reaching **Shipped**, which means parent orders never reach **Complete**. The pattern is channel-specific: - **eBay (ShipStation) shipments** → stuck in **Picked** - **Walmart shipments** → stuck in **Shipping** Because neither group advances to Shipped, parent orders remain Active and SKU allocations are never released. The SKU widget shows these as active Retail Shipments, reducing Available to Sell incorrectly. **Example:** Shipment #5280 (eBay) — tracking number present, Reported Back = Yes, Status = Picked. Parent Order #62765 = Active. From the Shipments list (1,727 total), the majority of recent shipments are in Picked or Shipping — only a small number show Shipped. This is affecting a large volume of shipments across all stores and all dates including current shipments. ### Expected status flow ``` New → Picking → Picked → Shipping → Shipped → (Order → Complete) ``` **The rule is simple: if a shipment has a tracking number, it is considered shipped and must complete the full status cycle through to Shipped. The parent order must then automatically advance to Complete.** ### Channel-specific suspected causes **eBay / ShipStation — stuck in Picked:** The Picked → Shipping transition is not being triggered after label generation. Either: - The label generation action is not firing the status transition, or - `shippedAt` timestamp is not being set, blocking the state machine condition **Walmart — stuck in Shipping:** Shipments are reaching Shipping (submitted to Walmart) but not advancing to Shipped. Either: - The Walmart fulfillment acknowledgment/confirmation is not being received or processed, or - A polling job that checks Walmart for shipment confirmation is not running or failing silently, or - The Shipping → Shipped transition requires a callback from Walmart that is no longer working ### Impact - Affects the majority of shipments across all channels and all dates - Parent orders remain Active instead of Complete - SKU allocations are never released — Available to Sell understated across all affected SKUs - SKU widget shows phantom Retail Shipments allocations for already-shipped stock ### Steps to reproduce 1. Navigate to Retail Shipments (`/retail/shipments`) 2. Observe: the majority of shipments are in Picked (eBay) or Shipping (Walmart) status 3. Open any Picked shipment with a tracking number — status has not advanced 4. Open any Walmart Shipping shipment — status has not advanced ### Backfill required Once the root cause is fixed, a backfill script is needed to advance all currently stuck shipments: **Rule: any shipment with a tracking number that is in Picked or Shipping status must be advanced to Shipped.** Backfill sequence Van must follow in order: 1. Find all shipments where `status IN ('Picked', 'Shipping') AND tracking_number IS NOT NULL AND tracking_number != ''` 2. Advance each to **Shipped** status and set `shippedAt` if not already set 3. For each affected parent order where all shipments are now Shipped, advance order to **Complete** 4. Confirm SKU allocations are released after status changes This applies to all dates — there is no cutoff. Any shipment with a tracking number is considered shipped regardless of when it was created. ### Files to check | File | What to check | |---|---| | Shipment entity / status state machine | Transition conditions for Picked → Shipping → Shipped | | Label generation controller | Whether it sets `shippedAt` and triggers Picked → Shipping transition | | Report Back action | Whether successful report-back triggers status transition | | Walmart channel connector | Whether Walmart shipment confirmation is being received and processed | | Order completion logic | Whether Order → Complete triggers automatically when all shipments reach Shipped | | Scheduled jobs / cron | Whether status-advance jobs are running for both eBay and Walmart channels | ### Priority Critical — affects the majority of shipments and orders site-wide; inventory allocations are significantly incorrect across all SKUs
Sign in to join this conversation.