---
id: CAP-COM-ORD-002
title: Select and preserve the sale’s checkout policy
feature: FEAT-COM-ORD-01
product_area: commerce
module: orders
revision: 1
status: draft
product_intent: confirmed
implementation_evidence: observed
supersedes:
  - CAP-COM-CHK-016
  - CAP-COM-CHK-007
source_sha:
  services-commerce: c8b66a98e2490617aec38ba5c8165dd9bd0a8f9b
  react-console: baf6dae382d6f41dce976c7f848667ccc37e076f
intent_sources:
  - 'services-commerce:docs/milestones/COMM-M1-set-up-what-you-sell.md#D9'
  - 'services-commerce:docs/milestones/plans/COMM-M2-plan.md#A6'
  - 'services-commerce:docs/milestones/plans/COMM-M2-plan.md#COMM-M2-X02'
purpose: Staff establish the commercial settings for a sale and retain them as part of its history.
outcomes:
  - Staff can explain the currency and business unit selected for a cart.
  - An existing order retains the commercial policy recorded at sale.
concepts:
  - CON-COM-ORD-001
  - CON-COM-ORD-002
actors:
  - ACT-COM-014
  - ACT-COM-016
surfaces:
  - console
  - api
preconditions: []
postconditions: []
permissions:
  - key: commerce.checkouts.update
    where_checked: api
    scope: tenant
  - key: commerce.checkouts.create
    where_checked: api
    scope: tenant
rules:
  - id: BR-CAP-COM-ORD-002-01
    proved_by: [ATS-COM-ORD-001-19, ATS-COM-ORD-002-01, ATS-COM-ORD-005-19, TST-COM-ORD-033]
    statement: >-
      Policy resolution uses an explicit choice, then the store, the first main item’s selling context, its
      application default and the workspace default, recording the source of the result.
    kind: calculation
    enforced_at:
      - service
    must_prove: true
    provenance: test
    source: >-
      services-commerce:modules/checkout/tests/e2e/ordering-profile-resolution.e2e.spec.js#takes the tenant
      default when the item’s application has no default, source tenant_default: an item without a context
      resolves by its participant
    origin: 'services-commerce:docs/milestones/COMM-M1-set-up-what-you-sell.md#D9'
  - id: BR-CAP-COM-ORD-002-02
    proved_by: [ATS-COM-ORD-001-15, ATS-COM-ORD-002-02, ATS-COM-ORD-002-10, TST-COM-ORD-033]
    statement: >-
      A conflicting policy resolved by a main item prevents both cart creation and later addition, identifies
      the two policies and stores no conflicting item.
    kind: invariant
    enforced_at:
      - service
    must_prove: true
    provenance: test
    source: >-
      services-commerce:modules/checkout/tests/e2e/ordering-profile-resolution.e2e.spec.js#refuses a later
      main item whose context resolves another profile, 409 ordering_profile_conflict naming both, nothing
      added
    origin: 'services-commerce:docs/milestones/plans/COMM-M2-plan.md#A6'
  - id: BR-CAP-COM-ORD-002-03
    proved_by: [ATS-COM-ORD-002-08, TST-COM-ORD-033]
    statement: Items attached to a bundle parent do not determine the cart’s checkout policy.
    kind: calculation
    enforced_at:
      - service
    must_prove: true
    provenance: test
    source: >-
      services-commerce:modules/checkout/tests/e2e/ordering-profile-resolution.e2e.spec.js#ignores a bundled
      item (one with a parent) when deciding, and decides at a later add
    origin: none
  - id: BR-CAP-COM-ORD-002-04
    proved_by: [ATS-COM-ORD-002-03, TST-COM-ORD-033]
    statement: >-
      Only staff can explicitly switch an open cart to an existing active policy, updating its currency and
      history; an item that locks the policy prevents the switch.
    kind: permission
    enforced_at:
      - api
      - service
    must_prove: true
    provenance: test
    source: >-
      services-commerce:modules/checkout/tests/e2e/ordering-profile-resolution.e2e.spec.js#lets staff switch
      it explicitly, the currency following, audited; never a portal member
    origin: 'services-commerce:docs/milestones/plans/COMM-M2-plan.md#A6'
  - id: BR-CAP-COM-ORD-002-05
    proved_by: [ATS-COM-ORD-002-09, TST-COM-ORD-033]
    statement: >-
      An explicit staff policy choice allows items whose selling contexts would otherwise resolve another
      policy.
    kind: policy
    enforced_at:
      - service
    must_prove: true
    provenance: test
    source: >-
      services-commerce:modules/checkout/tests/e2e/ordering-profile-resolution.e2e.spec.js#takes an item of
      another context under an EXPLICIT profile: staff chose, the items’ own contexts are not held against it
    origin: 'services-commerce:docs/milestones/plans/COMM-M2-plan.md#A6'
  - id: BR-CAP-COM-ORD-002-06
    proved_by: [ATS-COM-ORD-002-04, TST-COM-ORD-033]
    statement: An explicitly selected policy rejects a requested currency that differs from its own.
    kind: validation
    enforced_at:
      - api
      - service
    must_prove: true
    provenance: test
    source: >-
      services-commerce:modules/checkout/tests/e2e/ordering-profile-resolution.e2e.spec.js#carries the profile
      named on the create with source explicit, and refuses a currency that is not the profile’s, 400
      currency_mismatch
    origin: none
  - id: BR-CAP-COM-ORD-002-07
    proved_by: [ATS-COM-ORD-002-05, TST-COM-ORD-033]
    statement: >-
      Placement stops until a checkout policy can be resolved, and a cart with a policy still fails placement
      when it contains no items.
    kind: validation
    enforced_at:
      - service
    must_prove: true
    provenance: test
    source: >-
      services-commerce:modules/checkout/tests/e2e/ordering-profile-resolution.e2e.spec.js#refuses placing
      without a profile, 409 placement_refused with ordering_profile_required, the refusal on the trail; then
      places once staff name one
    origin: none
  - id: BR-CAP-COM-ORD-002-08
    proved_by: [ATS-COM-ORD-002-06, ATS-COM-ORD-002-11, ATS-COM-ORD-002-12, ATS-COM-ORD-005-15, TST-COM-ORD-033]
    statement: >-
      Placement preserves the selected policy’s identity, version, origin, context and settlement settings on
      the order, independently of later policy edits.
    kind: invariant
    enforced_at:
      - service
      - database
    must_prove: true
    provenance: test
    source: >-
      services-commerce:modules/checkout/tests/e2e/ordering-profile-resolution.e2e.spec.js#keeps a placed
      order’s snapshot when the profile is edited afterwards: the profile moves to version 2, the order stays
      at 1 with its rules (D24)
    origin: 'services-commerce:docs/milestones/plans/COMM-M2-plan.md#COMM-M2-X02'
  - id: BR-CAP-COM-ORD-002-09
    proved_by: [ATS-COM-ORD-002-07, TST-COM-ORD-138]
    statement: >-
      Main item applications determine the order classification: one application supplies its kind, multiple
      applications produce a mixed order, and no application produces a general order.
    kind: calculation
    enforced_at:
      - service
    must_prove: true
    provenance: test
    source: >-
      services-commerce:modules/orders/tests/unit/placement/classify-order.spec.js#classifies an order whose
      item lines two applications sold as mixed, the kinds in line order
    origin: none
  - id: BR-CAP-COM-ORD-002-10
    proved_by: []
    statement: Policy-resolution errors use the customer terms checkout policy and workspace.
    kind: policy
    enforced_at:
      - service
    must_prove: false
    provenance: test
    source: >-
      services-commerce:modules/checkout/tests/e2e/ordering-profile-resolution.e2e.spec.js#says checkout
      policy and workspace, never ordering profile or tenant, when nothing resolves one (COMM-M2 R2-5)
    origin: none
scenarios:
  - id: SC-CAP-COM-ORD-002-01
    given: A conference cart receives a membership renewal with a different policy context.
    when: 'Staff first add the conflicting renewal, then explicitly select the required policy.'
    then: 'The conflict blocks the first addition, while the deliberate staff choice permits it.'
    provenance: unknown
    source: FND-COM-ORD-032
edge_cases: []
constraints: []
depends_on: []
related:
  - CAP-COM-ORD-001
  - CAP-COM-ORD-005
  - CAP-COM-ORD-007
journeys:
  - JNY-COM-ORD-001
open_questions: []
evidence:
  - 'Examined reference: services-commerce:docs/milestones/COMM-M1-set-up-what-you-sell.md#D9'
  - 'Examined reference: services-commerce:docs/milestones/plans/COMM-M2-plan.md#A6'
  - 'Examined reference: services-commerce:docs/milestones/plans/COMM-M2-plan.md#COMM-M2-X02'
  - >-
    Examined reference:
    services-commerce:modules/checkout/tests/e2e/ordering-profile-resolution.e2e.spec.js#carries the profile
    named on the create with source explicit, and refuses a currency that is not the profile’s, 400
    currency_mismatch
  - >-
    Examined reference:
    services-commerce:modules/checkout/tests/e2e/ordering-profile-resolution.e2e.spec.js#ignores a bundled
    item (one with a parent) when deciding, and decides at a later add
  - >-
    Examined reference:
    services-commerce:modules/checkout/tests/e2e/ordering-profile-resolution.e2e.spec.js#keeps a placed
    order’s snapshot when the profile is edited afterwards: the profile moves to version 2, the order stays at
    1 with its rules (D24)
  - >-
    Examined reference:
    services-commerce:modules/checkout/tests/e2e/ordering-profile-resolution.e2e.spec.js#lets staff switch it
    explicitly, the currency following, audited; never a portal member
  - >-
    Examined reference:
    services-commerce:modules/checkout/tests/e2e/ordering-profile-resolution.e2e.spec.js#refuses a later main
    item whose context resolves another profile, 409 ordering_profile_conflict naming both, nothing added
  - >-
    Examined reference:
    services-commerce:modules/checkout/tests/e2e/ordering-profile-resolution.e2e.spec.js#refuses placing
    without a profile, 409 placement_refused with ordering_profile_required, the refusal on the trail; then
    places once staff name one
  - >-
    Examined reference:
    services-commerce:modules/checkout/tests/e2e/ordering-profile-resolution.e2e.spec.js#says checkout policy
    and workspace, never ordering profile or tenant, when nothing resolves one (COMM-M2 R2-5)
  - >-
    Examined reference:
    services-commerce:modules/checkout/tests/e2e/ordering-profile-resolution.e2e.spec.js#takes an item of
    another context under an EXPLICIT profile: staff chose, the items’ own contexts are not held against it
  - >-
    Examined reference:
    services-commerce:modules/checkout/tests/e2e/ordering-profile-resolution.e2e.spec.js#takes the tenant
    default when the item’s application has no default, source tenant_default: an item without a context
    resolves by its participant
  - >-
    Examined reference:
    services-commerce:modules/orders/tests/unit/placement/classify-order.spec.js#classifies an order whose
    item lines two applications sold as mixed, the kinds in line order
controls: [TC-AZ-001, TC-AZ-002, TC-AZ-003, TC-AZ-004, TC-AZ-006, TC-TEN-001, TC-TEN-002, TC-TEN-003, TC-TEN-004, TC-CRY-001, TC-DAT-001, TC-DAT-002, TC-DAT-003, 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-ORD-01-01, FAS-COM-ORD-01-04]
suites: [TST-COM-ORD-033, TST-COM-ORD-138]
---

# Select and preserve the sale’s checkout policy

## Purpose

Staff establish the commercial settings for a sale and retain them as part of its history. Later configuration can govern future business without obscuring earlier sales.

## How It Works

The clerk sees the policy selected for the cart and where that selection comes from. Commerce considers the declared selling context and the defaults available to the workspace. A conflicting item prompts the clerk to resolve the policy rather than continue with an ambiguous sale. An authorized staff choice can establish a different policy. Placement records the selected settings with the order. Readers can later distinguish the sale’s preserved policy from current configuration.

## Relationships

Cart construction supplies selling contexts, while payment and billing use the preserved policy to process the resulting order.
