---
id: ADR-COM-ORD-003
title: Placement prepares outside a transaction and commits in one
product_area: commerce
module: orders
revision: 1
status: proposed
design_intent: proposed
source_sha:
  services-commerce: c8b66a98e2490617aec38ba5c8165dd9bd0a8f9b
  macroservice-libraries: 54536a441935c6e09fdb7f96f0bec71c52ba4e03
  react-console: baf6dae382d6f41dce976c7f848667ccc37e076f
decision: >-
  Prepare remotely before placement, then atomically commit the sale, application claim functions, offer uses,
  delivery obligations and cart completion.
constrains:
  - WF-COM-ORD-002
  - DOM-COM-ORD-001
  - DOM-COM-ORD-002
  - DOM-COM-ORD-003
  - SVC-COM-ORD-checkout
  - SVC-COM-ORD-orders
origin: >-
  services-platform docs/proposals/commerce-orders/02-architecture.md section 5.2 and 06 section 10, as cited
  by the code (not readable in this job, FND-COM-ORD-048)
alternatives:
  - option: Keep locks while requesting remote preparation
    why_not: Remote calls would keep database locks open for their latency and failures.
  - option: Commit resource claims independently before placement
    why_not: Placement failure would need to recover resources already committed elsewhere.
consequences:
  - The domain commit includes application claims and either succeeds completely or rolls back.
  - Eligibility and offers receive transactional rechecks after remote preparation.
  - Billing and lease confirmation need after-commit recovery.
supersedes: []
evidence:
  - >-
    services-commerce at c8b66a98: modules/orders/services/placement/place-order.ts;
    services/persistence/claims.ts.
---

# Placement prepares outside a transaction and commits in one

## Context

Placement needs authoritative seller preparation and scarce-resource protection without holding locks during remote calls.

## Decision

Separate remote preparation from the database commit. Application-published claim functions join the placement transaction in a consistent order.

## Alternatives Considered

Keeping a transaction across remote requests extends lock duration. Independently committed claims would instead require a reliable release mechanism after placement failure.

## Consequences

Applications must publish executable claim functions. Billing and leased-resource confirmation remain separate after-commit work with their own recovery.
