---
id: CAP-COM-FUL-016
title: Organize warehouses and stock locations
feature: FEAT-COM-FUL-04
product_area: commerce
module: fulfillment
revision: 1
status: draft
product_intent: proposed
implementation_evidence: observed
supersedes:
  - CAP-COM-INV-009
  - CAP-COM-INV-010
  - CAP-COM-INV-027
source_sha:
  services-commerce: c8b66a98e2490617aec38ba5c8165dd9bd0a8f9b
  react-console: baf6dae382d6f41dce976c7f848667ccc37e076f
intent_sources: []
purpose: >-
  Administrators define where stock is held and how sellable locations are
  selected.
outcomes:
  - Warehouse and location priorities guide stock selection.
  - Restricted stock places are excluded from ordinary selling.
concepts:
  - CON-COM-FUL-005
actors:
  - ACT-COM-009
surfaces:
  - api
preconditions: []
postconditions: []
permissions:
  - key: commerce.inventory.read
    where_checked: api
    scope: tenant
  - key: commerce.inventory.create
    where_checked: api
    scope: tenant
  - key: commerce.inventory.update
    where_checked: api
    scope: tenant
  - key: commerce.inventory.delete
    where_checked: api
    scope: tenant
rules:
  - id: BR-CAP-COM-FUL-016-01
    proved_by: [ATS-COM-FUL-016-01, TST-COM-FUL-059, TST-COM-FUL-060]
    statement: >-
      Warehouse identity is supplied or derived from its name and remains
      stable, with duplicate identities and negative priorities rejected.
    kind: validation
    enforced_at:
      - service
      - database
    must_prove: true
    provenance: test
    source: >-
      services-commerce:modules/inventory/tests/integration/services/persistence/inventory-configuration.integration.spec.js#refuses
      a second warehouse under one id (400) and a negative priority (400)
    origin: none
  - id: BR-CAP-COM-FUL-016-02
    proved_by: [ATS-COM-FUL-016-01, TST-COM-FUL-059, TST-COM-FUL-060]
    statement: >-
      Allocation order sorts warehouses by increasing priority, puts unset
      priorities last and breaks ties by name and identity.
    kind: calculation
    enforced_at:
      - service
    must_prove: true
    provenance: test
    source: >-
      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
    origin: none
  - id: BR-CAP-COM-FUL-016-03
    proved_by: [ATS-COM-FUL-010-08, ATS-COM-FUL-016-02, ATS-COM-FUL-016-09, TST-COM-FUL-057, TST-COM-FUL-059, TST-COM-FUL-060]
    statement: >-
      Warehouse and location replacement reject stale versions and locked
      records, while deletion is prevented by dependent locations, items or
      counts.
    kind: validation
    enforced_at:
      - service
      - database
    must_prove: true
    provenance: test
    source: >-
      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)
    origin: none
  - id: BR-CAP-COM-FUL-016-04
    proved_by: [ATS-COM-FUL-016-03, TST-COM-FUL-057, TST-COM-FUL-060]
    statement: >-
      Locations retain their owning warehouse, have unique codes within it and
      select bin, zone, receiving, quarantine, returns or damaged, defaulting to
      bin.
    kind: validation
    enforced_at:
      - service
      - database
    must_prove: true
    provenance: test
    source: >-
      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)
    origin: none
  - id: BR-CAP-COM-FUL-016-05
    proved_by: [ATS-COM-FUL-016-04, ATS-COM-FUL-016-07, ATS-COM-FUL-017-10, ATS-COM-FUL-018-13, TST-COM-FUL-060]
    statement: >-
      Sellable locations include bins, zones and receiving areas ordered by
      warehouse and pick priority, excluding quarantine, returns and damaged
      areas.
    kind: policy
    enforced_at:
      - service
    must_prove: true
    provenance: test
    source: >-
      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
    origin: none
  - id: BR-CAP-COM-FUL-016-06
    proved_by: [ATS-COM-FUL-016-02, TST-COM-FUL-057, TST-COM-FUL-059, TST-COM-FUL-060]
    statement: A stock location holding an item rejects deletion.
    kind: invariant
    enforced_at:
      - service
      - database
    must_prove: true
    provenance: test
    source: >-
      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
    origin: none
  - id: BR-CAP-COM-FUL-016-07
    proved_by: [ATS-COM-FUL-016-05, TST-COM-FUL-057]
    statement: >-
      Readers can inspect warehouses, locations and stock records, writes
      require administrator permissions, application-denied callers are rejected
      and other workspaces' records are unavailable.
    kind: permission
    enforced_at:
      - api
      - database
    must_prove: true
    provenance: test
    source: >-
      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
    origin: none
  - id: BR-CAP-COM-FUL-016-08
    proved_by: []
    statement: >-
      A warehouse, location and stock console workspace is not established by
      the pinned screen evidence.
    kind: policy
    enforced_at:
      - console
    must_prove: false
    provenance: unknown
    source: FND-COM-FUL-004
    origin: none
scenarios:
  - id: SC-CAP-COM-FUL-016-01
    given: The main warehouse has priority one and the depot priority two.
    when: Read the locations eligible to supply stock.
    then: >-
      Main-warehouse bins lead in pick-priority order and quarantine is
      excluded.
    provenance: test
    source: >-
      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
edge_cases: []
constraints: []
depends_on: []
related:
  - CAP-COM-FUL-017
  - CAP-COM-FUL-018
  - CAP-COM-FUL-010
journeys: []
open_questions: []
evidence:
  - repository: services-commerce
    sources:
      - >-
        services-commerce:modules/inventory/tests/integration/services/persistence/inventory-configuration.integration.spec.js#refuses
        a second warehouse under one id (400) and a negative priority (400)
      - >-
        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
      - >-
        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)
      - >-
        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)
      - >-
        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
      - >-
        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
      - >-
        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
  - repository: react-console
    sources: []
controls: [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]
exercised_by: [FAS-COM-FUL-04-01, FAS-COM-FUL-04-04]
suites: [TST-COM-FUL-057, TST-COM-FUL-059, TST-COM-FUL-060]
---

# Organize warehouses and stock locations

## Purpose

Administrators define where stock is held and how sellable locations are selected.

## How It Works

An administrator creates warehouses and the locations within them. Names, codes and priorities help staff recognize those places and explain allocation order. Location kinds distinguish sellable areas from goods needing separate treatment. Configuration replacements use the version staff read. Existing stock and dependent records can prevent removal of a place. The current evidence does not establish a warehouse-management console workflow. The product should provide one that makes those dependencies visible before deletion.

## Relationships

- Keep stock movements and transfers accountable supplies or consumes related delivery records.
- Allocate stock and explain what buyers can obtain supplies or consumes related delivery records.
- Configure shipping coverage and collection options supplies or consumes related delivery records.
