Skip to content

CAP-COM-FUL-016Organize warehouses and stock locations

Markdown

CAP-COM-FUL-016

Organize warehouses and stock locations

Markdown
  • DocumentDraft
  • Product intentProposed
  • ImplementationObserved

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 and location priorities guide stock selection.Restricted stock places are excluded from ordinary selling.
Surfaces
api

Controls

21 controls apply, from the corpus control catalogue.

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-004 TC-LOG-005 TC-PI-001 TC-PI-003 TC-PI-005 TC-PRV-001 TC-PRV-002

Permissions

KeyChecked atScope
commerce.inventory.readapitenant
commerce.inventory.createapitenant
commerce.inventory.updateapitenant
commerce.inventory.deleteapitenant

Business Rules

8 rules, 7 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
Warehouse identity is supplied or derived from its name and remains stable, with duplicate identities and negative priorities rejected.
validationservice, databasetest
02must prove
Proposed
Allocation order sorts warehouses by increasing priority, puts unset priorities last and breaks ties by name and identity.
calculationservicetest
services-commerce:modules/inventory/tests/integration/services/persistence/inventory-configuration.integration.spec.js#lists the warehouses in allocation order (priority first, none last), the active ones alone on request, and by search
03must prove
Proposed
Warehouse and location replacement reject stale versions and locked records, while deletion is prevented by dependent locations, items or counts.
validationservice, databasetest
services-commerce:modules/inventory/tests/e2e/inventory.e2e.spec.js#reads the warehouse made with the shelf, lists it, replaces it at the version read (a stale one 409) and refuses its delete while locations belong to it (409)
04must prove
Proposed
Locations retain their owning warehouse, have unique codes within it and select bin, zone, receiving, quarantine, returns or damaged, defaulting to bin.
validationservice, databasetest
services-commerce:modules/inventory/tests/integration/services/persistence/inventory-configuration.integration.spec.js#refuses a code twice in one warehouse (400), a warehouse the tenant has not (400), and a kind outside the six (400)
05must prove
Proposed
Sellable locations include bins, zones and receiving areas ordered by warehouse and pick priority, excluding quarantine, returns and damaged areas.
policyservicetest
services-commerce:modules/inventory/tests/integration/services/persistence/inventory-configuration.integration.spec.js#answers the sellable locations across warehouses in allocation order: the main warehouse (priority 1) before the depot (2), bins by pick priority, quarantine and returns left out
06must prove
Proposed
A stock location holding an item rejects deletion.
invariantservice, databasetest
services-commerce:modules/inventory/tests/integration/services/persistence/inventory-configuration.integration.spec.js#refuses deleting a warehouse its locations belong to (409) and a location an item is held at (409); deletes them once free, 404 after
07must prove
Proposed
Readers can inspect warehouses, locations and stock records, writes require administrator permissions, application-denied callers are rejected and other workspaces' records are unavailable.
permissionapi, databasetest
services-commerce:modules/inventory/tests/e2e/inventory.e2e.spec.js#lets a reader list and read everything, and refuses it every write 403 permission_missing
08
Proposed
A warehouse, location and stock console workspace is not established by the pinned screen evidence.
policyconsoleunknown

Scenarios

IdGivenWhenThenProvenance
01The main warehouse has priority one and the depot priority two.Read the locations eligible to supply stock.Main-warehouse bins lead in pick-priority order and quarantine is excluded.test
services-commerce:modules/inventory/tests/integration/services/persistence/inventory-configuration.integration.spec.js#answers the sellable locations across warehouses in allocation order: the main warehouse (priority 1) before the depot (2), bins by pick priority, quarantine and returns left out

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.