---
id: JNY-COM-FUL-003
title: Warehouse staff dispatch an order in successive waves
feature: FEAT-COM-FUL-03
product_area: commerce
module: fulfillment
revision: 1
status: draft
product_intent: proposed
implementation_evidence: observed
supersedes: []
source_sha:
  services-commerce: c8b66a98e2490617aec38ba5c8165dd9bd0a8f9b
  react-console: baf6dae382d6f41dce976c7f848667ccc37e076f
actor: ACT-COM-010
goal: >-
  Send available goods first and complete the remaining delivery after backorder
  replenishment.
capabilities:
  - CAP-COM-FUL-011
  - CAP-COM-FUL-018
  - CAP-COM-FUL-012
  - CAP-COM-FUL-013
  - CAP-COM-FUL-014
  - CAP-COM-FUL-017
screens: []
steps:
  - 'n': 1
    surface: previewCheckout (Orders module)
    action: Preview shipping for five shirts addressed to Texas.
    capability: CAP-COM-FUL-011
    expected: The zone's shipping choices appear with an initial selection.
    provenance: test
    source: >-
      services-commerce:modules/shipping/tests/e2e/shipping.e2e.spec.js#answers
      shipping_required true with the Texas zone’s two options, the flat one
      selected, the charge in the totals
  - 'n': 2
    surface: placeCheckout (Orders module)
    action: Place and pay the order with three units available and two backordered.
    capability: CAP-COM-FUL-018
    expected: Delivery instructions pick available units while the shortage waits.
    provenance: test
    source: >-
      services-commerce:modules/shipping/tests/e2e/shipping.e2e.spec.js#dispatches
      the five unit obligations once paid; the participant picks the three on
      the shelf and leaves two waiting
  - 'n': 3
    surface: createShipment
    action: Create shipment work for the first three units.
    capability: CAP-COM-FUL-012
    expected: The first wave contains the initial unit range and saved shipping charge.
    provenance: test
    source: >-
      services-commerce:modules/shipping/tests/e2e/shipping.e2e.spec.js#makes
      the first wave of the three picked units (0..2), charged what the order
      paid, and walks it to the handoff
  - 'n': 4
    surface: 'releaseShipment, createPickList, pickPickListLine, packShipment'
    action: Pick the released work and pack its parcels.
    capability: CAP-COM-FUL-012
    expected: Recorded picks and packed quantities retain parcel weight information.
    provenance: test
    source: >-
      services-commerce:modules/shipping/tests/integration/services/fulfillment/shipping-flow.integration.spec.js#packs
      the three units into two parcels, the second weighed from nothing (the
      shirt has no weight), the line packed, the shipment packed with two
      packages
  - 'n': 5
    surface: purchasePackageLabel
    action: Purchase the parcel labels.
    capability: CAP-COM-FUL-013
    expected: Each successful purchase stores tracking and cost.
    provenance: test
    source: >-
      services-commerce:modules/shipping/tests/integration/services/fulfillment/shipping-flow.integration.spec.js#buys
      the first label through UPS under package:<id>:1 (the intent then the
      outcome), the tracking number and the cost on the label, the package
      labelled
  - 'n': 6
    surface: 'manifestShipment, handoffShipment'
    action: Manifest the shipment and confirm carrier departure.
    capability: CAP-COM-FUL-014
    expected: >-
      Three units leave, their obligations complete and the order remains partly
      shipped.
    provenance: test
    source: >-
      services-commerce:modules/shipping/tests/e2e/shipping.e2e.spec.js#leaves
      the order partially shipped after the first wave: three obligations
      completed, two still in progress, three units shipped on the line
  - 'n': 7
    surface: recordInventoryMovement
    action: Receive replenishment stock.
    capability: CAP-COM-FUL-017
    expected: The receipt commits the waiting backorders.
    provenance: test
    source: >-
      services-commerce:modules/shipping/tests/e2e/shipping.e2e.spec.js#fills
      the two backorders at the receipt, and the second wave picks the filled
      units at its creation (3..4) and ships them
  - 'n': 8
    surface: createShipment … handoffShipment
    action: Prepare and hand off the replenished units.
    capability: CAP-COM-FUL-014
    expected: All five units have shipped and their obligations are complete.
    provenance: test
    source: >-
      services-commerce:modules/shipping/tests/e2e/shipping.e2e.spec.js#completes
      the order’s shipping: every unit shipped, every obligation completed, the
      shelf down five, the cost facts emitted per wave
alternates:
  - from_step: 1
    condition: The buyer selects pickup.
    path: >-
      Create collection work and record the collecting person at counter
      handover.
    outcome: The pickup completes without shipping charge.
    provenance: test
    source: >-
      services-commerce:modules/shipping/tests/e2e/shipping.e2e.spec.js#hands
      the pick-up over through the route: collected by the buyer, the line
      shipped, the order’s shipping complete
  - from_step: 5
    condition: The carrier accepts a purchase but loses its answer.
    path: Recover the retained attempt by querying the carrier before resending.
    outcome: The same purchased label is retained without a second sale.
    provenance: test
    source: >-
      services-commerce:modules/shipping/tests/integration/services/fulfillment/shipping-flow.integration.spec.js#settles
      the purchase in flight by the lookup: the label the carrier holds recorded
      on attempt 1, the package labelled, never bought twice
failures:
  - from_step: 6
    condition: A shipment unit lacks delivery authorization.
    path: Reject handoff and record its finding.
    outcome: No unit moves from stock.
    provenance: test
    source: >-
      services-commerce:modules/shipping/tests/integration/services/fulfillment/shipping-flow.integration.spec.js#refuses
      units_not_authorized, naming the obligation still pending, and moves
      nothing: the unit committed, nothing shipped, the shipment still
      manifested
  - from_step: 6
    condition: Cancellation has fenced a shipment line.
    path: Reject departure while the parcel requires removal.
    outcome: Retained goods need separate shipment work.
    provenance: test
    source: >-
      services-commerce:modules/shipping/tests/integration/services/fulfillment/shipping-flow.integration.spec.js#refuses
      the handoff shipment_cancelled_pull_package, naming the fenced line, and
      moves nothing
rules_in_play:
  - BR-CAP-COM-FUL-011-01
  - BR-CAP-COM-FUL-018-02
  - BR-CAP-COM-FUL-012-01
  - BR-CAP-COM-FUL-012-02
  - BR-CAP-COM-FUL-013-02
  - BR-CAP-COM-FUL-014-01
  - BR-CAP-COM-FUL-014-02
  - BR-CAP-COM-FUL-017-07
assertions:
  - id: AS-JNY-COM-FUL-003-01
    statement: >-
      Completing both waves ships all five units and completes their delivery
      obligations.
    provenance: test
    source: >-
      services-commerce:modules/shipping/tests/e2e/shipping.e2e.spec.js#completes
      the order’s shipping: every unit shipped, every obligation completed, the
      shelf down five, the cost facts emitted per wave
  - id: AS-JNY-COM-FUL-003-02
    statement: 'After every unit ships, another wave is rejected as empty.'
    provenance: test
    source: >-
      services-commerce:modules/shipping/tests/e2e/shipping.e2e.spec.js#refuses
      a third wave: nothing is left to ship (409 nothing_to_ship)
  - id: AS-JNY-COM-FUL-003-03
    statement: >-
      Each departure invokes the configured cost-relief path for its outgoing
      goods.
    provenance: test
    source: >-
      services-commerce:modules/shipping/tests/e2e/shipping.e2e.spec.js#completes
      the order’s shipping: every unit shipped, every obligation completed, the
      shelf down five, the cost facts emitted per wave
e2e_policy: required
e2e_reason: >-
  The service evidence crosses checkout, stock, delivery and carrier fixtures;
  warehouse browser coverage awaits usable floor screens.
evidence:
  - >-
    services-commerce at c8b66a98e2490617aec38ba5c8165dd9bd0a8f9b: the
    end-to-end and integration suites named in the step and assertion sources.
  - >-
    react-console at baf6dae382d6f41dce976c7f848667ccc37e076f: the console pages
    and adapters named in the steps.
proved_by: []
---

# Warehouse staff dispatch an order in successive waves

## Story

Warehouse staff dispatch the stock already available for a paid order, then use replenishment to complete the remaining units. Each wave passes through picking, packing and departure. Cancellation and authorization checks protect the moment goods leave, while carrier uncertainty is resolved through the retained purchase attempt.
