---
id: TST-COM-FUL-082
title: Return receiving
kind: integration
product_area: commerce
module: fulfillment
revision: 1
status: draft
source_sha:
  services-commerce: c8b66a98e2490617aec38ba5c8165dd9bd0a8f9b
  react-console: baf6dae382d6f41dce976c7f848667ccc37e076f
repository: services-commerce
files:
  - modules/shipping/tests/integration/services/returns/return-receiving.integration.spec.js
implements:
  - ATS-COM-FUL-015-01
  - ATS-COM-FUL-015-02
  - ATS-COM-FUL-015-03
  - ATS-COM-FUL-015-04
  - ATS-COM-FUL-015-05
  - ATS-COM-FUL-015-06
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/shipping/tests/integration/services/returns/return-receiving.integration.spec.js
    test_titles:
      - >-
        authorizes under the product policy and records the label shipment and the destination on
        the RMA
      - >-
        makes the return_label shipment of the three shipped units, packed in one parcel, addressed
        to the warehouse, labelled through UPS from the customer’s address
      - >-
        retires the UPS account for the rest of the suite (the local gateway’s happy path answers
        one tracking number, which this label carries): the counter takes the later labels (premise)
      - >-
        records the first receipt numbered against the RMA at the warehouse, the two units counted
        with the outbound shipment line, the document partially received with its RMA, nothing on
        the shelf and no money yet
      - 'answers the retried receipt as the one recorded, moving nothing'
      - >-
        records the inspection on the line and moves the receipt to inspected and the document to
        inspecting
      - >-
        restocks the two units at the bin they shipped from: the return_restock movement naming the
        disposition, on hand up two, the two reliefs reversed at 1500 with the restore_cogs fact of
        3000
      - >-
        takes the third unit damaged: the document received, the money on receipt for the three
        (nothing to move in this world) and financially settled
      - >-
        quarantines the damaged unit: return_restock then quarantine_in at the quarantine shelf, no
        cost restored, and the document completes with every unit back on the line
      - 'refuses a receipt against the completed return, 409 return_not_receivable'
      - >-
        refuses more than the line has left authorized (receipt_exceeds_authorized), writing no
        receipt
      - >-
        refuses a disposition beyond what the line received, a replacement, and a disposition the
        policy does not allow; nothing dispositioned
      - >-
        cancels the return label shipment (packed at the counter, no label bought yet) and pulls its
        parcel when the return is withdrawn
    scenario_anchors:
      - >-
        services-commerce:modules/shipping/tests/integration/services/returns/return-receiving.integration.spec.js#answers
        the retried receipt as the one recorded, moving nothing
      - >-
        services-commerce:modules/shipping/tests/integration/services/returns/return-receiving.integration.spec.js#refuses
        more than the line has left authorized (receipt_exceeds_authorized), writing no receipt
      - >-
        services-commerce:modules/shipping/tests/integration/services/returns/return-receiving.integration.spec.js#refuses
        a receipt against the completed return, 409 return_not_receivable
      - >-
        services-commerce:modules/shipping/tests/integration/services/returns/return-receiving.integration.spec.js#records
        the first receipt numbered against the RMA at the warehouse, the two units counted with the
        outbound shipment line, the document partially received with its RMA, nothing on the shelf
        and no money yet
      - >-
        services-commerce:modules/shipping/tests/integration/services/returns/return-receiving.integration.spec.js#takes
        the third unit damaged: the document received, the money on receipt for the three (nothing
        to move in this world) and financially settled
      - >-
        services-commerce:modules/shipping/tests/integration/services/returns/return-receiving.integration.spec.js#records
        the inspection on the line and moves the receipt to inspected and the document to inspecting
      - >-
        services-commerce:modules/shipping/tests/integration/services/returns/return-receiving.integration.spec.js#restocks
        the two units at the bin they shipped from: the return_restock movement naming the
        disposition, on hand up two, the two reliefs reversed at 1500 with the restore_cogs fact of
        3000
      - >-
        services-commerce:modules/shipping/tests/integration/services/returns/return-receiving.integration.spec.js#quarantines
        the damaged unit: return_restock then quarantine_in at the quarantine shelf, no cost
        restored, and the document completes with every unit back on the line
      - >-
        services-commerce:modules/shipping/tests/integration/services/returns/return-receiving.integration.spec.js#refuses
        a disposition beyond what the line received, a replacement, and a disposition the policy
        does not allow; nothing dispositioned
      - >-
        services-commerce:modules/shipping/tests/integration/services/returns/return-receiving.integration.spec.js#makes
        the return_label shipment of the three shipped units, packed in one parcel, addressed to the
        warehouse, labelled through UPS from the customer’s address
      - >-
        services-commerce:modules/shipping/tests/integration/services/returns/return-receiving.integration.spec.js#cancels
        the return label shipment (packed at the counter, no label bought yet) and pulls its parcel
        when the return is withdrawn
---

# Return receiving

## Verification Boundary

This suite checks return receiving 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.

## 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.
