Skip to content

CAP-COM-FUL-012Prepare an order's goods for dispatch

Markdown

CAP-COM-FUL-012

Prepare an order's goods for dispatch

Markdown
  • DocumentDraft
  • Product intentProposed
  • ImplementationPartially observed

KindCapabilityProduct areaCommerceModuleFulfillment, Shipping and InventoryRevision1

Read atservices-commerce c8b66a98react-console baf6dae3

The Formal Contract

The narrative above explains; the sections below are authoritative — the rules, scenarios and tests this document binds.

Outcomes
Warehouse work follows the order's committed goods at their stock locations.Shipment history explains its warehouse progression.
Surfaces
apiconsole

Controls

34 controls apply, from the corpus control catalogue.

TC-IAM-006 TC-AZ-001 TC-AZ-002 TC-AZ-003 TC-AZ-004 TC-AZ-005 TC-AZ-006 TC-TEN-001 TC-TEN-002 TC-TEN-003 TC-CRY-001 TC-DAT-001 TC-DAT-002 TC-DAT-003 TC-DAT-004 TC-LOG-001 TC-LOG-002 TC-LOG-003 TC-LOG-004 TC-LOG-005 TC-AVL-004 TC-MON-001 TC-MON-002 TC-MON-004 TC-PI-001 TC-PI-002 TC-PI-003 TC-PI-004 TC-PI-005 TC-VEN-001 TC-VEN-002 TC-VEN-003 TC-PRV-001 TC-PRV-002

Permissions

KeyChecked atScope
commerce.shipments.readapitenant
commerce.shipments.createapitenant
commerce.shipments.updateapitenant
commerce.shipments.cancelapitenant
commerce.pick-lists.readapitenant
commerce.pick-lists.createapitenant
commerce.pick-lists.updateapitenant
orders.orders.shipconsoletenant

Business Rules

12 rules, 9 to be proved before approval. A rule's product intent is derived from its origin: 0 confirmed by a product decision, the rest inheriting this capability's proposed.

IdRuleKindEnforced atProvenance
01must prove
Proposed
Shipment creation groups committed and picked units not already assigned to a shipment into contiguous line ranges at the requested warehouse or the warehouse holding most units, using the order's destination, charge, strategy, carrier and service; an empty candidate set is rejected.
no proof recorded yet
validationservicetest
services-commerce:modules/shipping/tests/integration/services/fulfillment/shipping-flow.integration.spec.js#makes the shipment from the order’s three picked units as one line (units 0..2) at the warehouse, numbered, addressed from the order, charged what the order paid, on the strategy’s carrier and service
02must prove
Proposed
A later shipping wave can pick replenished backorders under their obligations and place those units on a new shipment.
no proof recorded yet
lifecycleservicetest
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
03must prove
Proposed
A pickup choice creates a shipment at the selected collection warehouse with no carrier or shipping charge.
origin: Decision L, Andrew 2026-10-18 ("add it now"): services-commerce:docs/migrations/shipping/README.md#D-P8S-14
no proof recorded yet
policyservicetest
services-commerce:modules/shipping/tests/integration/services/fulfillment/shipping-flow.integration.spec.js#makes a pickup shipment of the order at the pick-up warehouse, on no carrier, charged nothing
04must prove
Proposed
Releasing a shipment queues its lines for picking, and a warehouse pick list gathers released lines absent from another open list at their recorded stock locations.
no proof recorded yet
lifecycleservicetest
services-commerce:modules/shipping/tests/integration/services/fulfillment/shipping-flow.integration.spec.js#releases the shipment to the floor and lists its line for picking at the bin the ledger names, the shipment picking
05must prove
Proposed
Claimed pick lists identify the picker, accept full or short picks, raise SKU findings for shortages, complete after every line is decided and return unpicked cancelled-list lines to the queue.
no proof recorded yet
lifecycleservice, databasetest
services-commerce:modules/shipping/tests/integration/db/shipping-tables.table.integration.spec.js#holds a picked line to its whole quantity and a short one to less, by pick_list_lines_picked_check, and a claimed list to its picker, by pick_lists_claimed_check
06must prove
Proposed
Packing assigns picked, unpacked quantities to parcels, derives unstated parcel weights from their contents and marks the shipment packed when all live lines are packed.
no proof recorded yet
calculationservicetest
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
07
Proposed
Manifesting a labelled shipment closes its carrier manifest and advances the shipment, lines and parcels together.
lifecycleservicetest
08must prove
Proposed
Cancellation before handover cancels lines, releases shipment stamps while retaining order ownership, voids labels and pulls parcels; shipped or collected shipments reject cancellation.
no proof recorded yet
lifecycleservicetest
services-commerce:modules/shipping/tests/integration/services/fulfillment/shipping-flow.integration.spec.js#refuses a second handover (not packed any more) and the cancellation of a collected shipment
09must prove
Proposed
Shipment events are immutable and presented from oldest to newest.
no proof recorded yet
invariantdatabasetest
services-commerce:modules/shipping/tests/integration/db/shipping-tables.table.integration.spec.js#lets the application role insert an event and refuses it UPDATE, DELETE and TRUNCATE, 42501
10
Proposed
Shipment numbers and tracking numbers are unique within a workspace, parcel sequences are unique within a shipment, and line quantity agrees with its unit range.
invariantdatabasetest
services-commerce:modules/shipping/tests/integration/db/shipping-tables.table.integration.spec.js#writes a shipment of the order with a line of two units (premise), and refuses a second shipment with the same number, by shipments_number_uq
11must prove
Proposed
Shipment creation requires create authority, warehouse progression requires update authority and cancellation requires sensitive administrator authority.
no proof recorded yet
permissionapiobserved
12
Proposed
Order 360 offers shipment creation and label printing under their action permissions without exposing the remaining warehouse progression steps.
policyconsoletest
react-console:lib/commerce/order-flows/__tests__/live.test.ts#offers the active carriers and Manual, and creates the shipment from the chosen lines

Scenarios

IdGivenWhenThenProvenance
01Three paid shirts are ready at one warehouse.Create and release shipment work, pick, pack two parcels, label and manifest.The manifested shipment retains both parcels and a chronological record of its progression.test

Edge Cases

IdGivenWhenThenProvenance
02Every ordered unit has already been shipped.Request an additional wave.The service reports that no units remain to ship.test
services-commerce:modules/shipping/tests/e2e/shipping.e2e.spec.js#refuses a third wave: nothing is left to ship (409 nothing_to_ship)

The Markdown files under specs/ in rhythmsoftware/rhythm-v2-docs are the canonical source of truth. This reader is a generated, read-only projection of them.