---
id: TST-COM-FUL-065
title: Merchandise claims
kind: integration
product_area: commerce
module: fulfillment
revision: 1
status: draft
source_sha:
  services-commerce: c8b66a98e2490617aec38ba5c8165dd9bd0a8f9b
  react-console: baf6dae382d6f41dce976c7f848667ccc37e076f
repository: services-commerce
files:
  - modules/inventory/tests/integration/services/stock/merchandise-claims.integration.spec.js
implements:
  - ATS-COM-FUL-018-01
  - ATS-COM-FUL-018-02
  - ATS-COM-FUL-018-03
  - ATS-COM-FUL-018-04
  - ATS-COM-FUL-018-07
environment: local
implementation_state: implemented
latest_result: not-run
latest_run_at: null
latest_run_ref: null
conformance: not-verified
estimated_minutes: 3
isolation: >-
  Run-created workspace identifiers and fixture records in the prepared test database; concurrency
  cases own their extra connections.
evidence:
  - repository: services-commerce
    path: modules/inventory/tests/integration/services/stock/merchandise-claims.integration.spec.js
    test_titles:
      - >-
        answers ok with one committed claim for the SKU and the quantity, under the claim ref the
        line is stamped with
      - >-
        writes one committed unit per unit on the first location in allocation order, unit 0 and 1,
        each stamped with the order and the line
      - >-
        answers the same claim again for the same line without writing twice (idempotent on the
        line)
      - >-
        is refused insufficient_stock with nothing written when the product prohibits backorders
        (the last cap)
      - takes the location with the next pick priority once the first is empty
      - >-
        commits what exists and backorders the rest when the product allows it (A12), the shortfall
        counting as backordered, never against available
      - >-
        backorders a SKU no item holds yet by making its item at the first sellable location, when
        the product allows it
      - 'refuses a resource key that is not a SKU’s, unknown_resource'
      - 'converts the held unit to committed on the line, answering the hold’s ref as the claim'
      - 'refuses a hold that is not held (converted already, or never made): hold_not_found'
      - >-
        releases a line’s committed units on a void, giving the stock back; a release naming nothing
        live answers released: []
      - releases a checkout item’s held units when the checkout stands as the order (D-P2-03)
      - lets the first claim commit everything the shelf had
      - 'answers the second, once it gets the row, insufficient_stock, with nothing written for it'
      - leaves the SKU with nothing available and exactly the winner’s units allocated
      - 'lets the shipment commit, taking the unit off the shelf'
      - >-
        answers the claim, once it gets the row, insufficient_stock: the unit the shipment took is
        not claimed twice
    scenario_anchors:
      - >-
        services-commerce:modules/inventory/tests/integration/services/stock/merchandise-claims.integration.spec.js#answers
        ok with one committed claim for the SKU and the quantity, under the claim ref the line is
        stamped with
      - >-
        services-commerce:modules/inventory/tests/integration/services/stock/merchandise-claims.integration.spec.js#writes
        one committed unit per unit on the first location in allocation order, unit 0 and 1, each
        stamped with the order and the line
      - >-
        services-commerce:modules/inventory/tests/integration/services/stock/merchandise-claims.integration.spec.js#answers
        the same claim again for the same line without writing twice (idempotent on the line)
      - >-
        services-commerce:modules/inventory/tests/integration/services/stock/merchandise-claims.integration.spec.js#takes
        the location with the next pick priority once the first is empty
      - >-
        services-commerce:modules/inventory/tests/integration/services/stock/merchandise-claims.integration.spec.js#is
        refused insufficient_stock with nothing written when the product prohibits backorders (the
        last cap)
      - >-
        services-commerce:modules/inventory/tests/integration/services/stock/merchandise-claims.integration.spec.js#commits
        what exists and backorders the rest when the product allows it (A12), the shortfall counting
        as backordered, never against available
      - >-
        services-commerce:modules/inventory/tests/integration/services/stock/merchandise-claims.integration.spec.js#backorders
        a SKU no item holds yet by making its item at the first sellable location, when the product
        allows it
      - >-
        services-commerce:modules/inventory/tests/integration/services/stock/merchandise-claims.integration.spec.js#answers
        the second, once it gets the row, insufficient_stock, with nothing written for it
      - >-
        services-commerce:modules/inventory/tests/integration/services/stock/merchandise-claims.integration.spec.js#answers
        the claim, once it gets the row, insufficient_stock: the unit the shipment took is not
        claimed twice
      - >-
        services-commerce:modules/inventory/tests/integration/services/stock/merchandise-claims.integration.spec.js#converts
        the held unit to committed on the line, answering the hold’s ref as the claim
      - >-
        services-commerce:modules/inventory/tests/integration/services/stock/merchandise-claims.integration.spec.js#refuses
        a hold that is not held (converted already, or never made): hold_not_found
      - >-
        services-commerce:modules/inventory/tests/integration/services/stock/merchandise-claims.integration.spec.js#releases
        a line’s committed units on a void, giving the stock back; a release naming nothing live
        answers released: []
---

# Merchandise claims

## Verification Boundary

This suite checks merchandise claims against the prepared PostgreSQL database. Its entry points are the persistence and service functions used by the tests.

## What This Suite Proves

The bound scenarios identify the assertions this suite contributes. Source anchors retain the exact test cases; where a capability scenario has several contributing suites, a single binding does not imply that every branch runs here.

## What It Does Not Prove

Direct service and persistence calls do not establish the full HTTP permission contract, deployed scheduling or browser behavior. No execution result is claimed by this register.

## Real Dependencies and Test Doubles

The database and imported Commerce persistence services are real. Fixtures create the records owned by this run. Time-sensitive cases use a controlled clock where the source fixture supplies one.

## Must Not Be Doubled

Keep the database constraints, row visibility and persistence writes real when claiming this integration coverage. A canned repository response cannot replace the boundary being checked.
