---
id: WF-COM-ORD-012
title: Apply a promotion after the sale
trigger: Staff submit a promotion code and explanation for an eligible standing sale.
product_area: commerce
module: orders
revision: 1
status: draft
design_intent: proposed
implementation_evidence: observed
inference: []
source_sha:
  services-commerce: c8b66a98e2490617aec38ba5c8165dd9bd0a8f9b
implements:
  - CAP-COM-ORD-015
  - CAP-COM-ORD-004
moves:
  - STATE-COM-ORD-010
crosses:
  - SVC-COM-ORD-orders
  - SVC-ACC-TRX-transactions
  - SVC-PFM-OPS-audit
idempotency: >-
  An order cannot redeem the same promotion again. Amendment status and keyed settlement prevent repeating its
  financial effect.
concurrency: >-
  The sale lock protects discounts and the evaluated plan. Promotion-counter locks and conditional limits
  determine the last permitted redemption.
hops:
  - 'n': 1
    actor_or_service: Orders route
    action: >-
      Authorize staff promotion application to eligible standing sale lines and freeze the promotion areas'
      qualification answers.
    anchor: 'services-commerce:modules/orders/services/amendments/promotion-amendment.ts'
    seam: sync
    on_failure: Unavailable qualification refuses before document creation.
    left_inconsistent: No promotion amendment has been persisted.
    observer: Observed through the staff caller.
    provenance: test
    source: 'services-commerce:modules/orders/tests/e2e/apply-promotion-amendment.e2e.spec.js'
  - 'n': 2
    actor_or_service: Promotion plan
    action: >-
      Evaluate the entered code on placed gross prices and the saved Standard basis, refusing restrictions
      without an eligibility verdict.
    anchor: 'services-commerce:modules/orders/services/amendments/promotion-amendment-plan.ts'
    seam: sync
    on_failure: Library refusal records a rejected amendment without settlement.
    left_inconsistent: The rejected request remains in sale history.
    observer: Observed through the staff caller.
    provenance: test
    source: 'services-commerce:modules/orders/tests/e2e/promotion-alternatives.e2e.spec.js'
  - 'n': 3
    actor_or_service: Promotion transaction
    action: >-
      Commit line and order discounts, redemption, intervention, adjustment request and executing status
      together.
    anchor: 'services-commerce:modules/orders/services/amendments/promotion-amendment.ts'
    seam: sync
    on_failure: Redemption refusal rolls back the discounts and settlement request.
    left_inconsistent: Offer use cannot commit separately from its credit plan.
    observer: Observed through sale history.
    provenance: observed
    source: 'services-commerce:modules/orders/services/amendments/promotion-amendment.ts'
  - 'n': 4
    actor_or_service: Adjustment worker (fulfilment module)
    action: 'Execute and settle the adjustment, retaining executing while processor confirmation remains outstanding.'
    anchor: 'services-commerce:modules/orders/services/adjustments/resume-adjustments.ts'
    seam: sync
    on_failure: Refusal creates an exception; pending refunds resume from receivable facts or reconciliation.
    left_inconsistent: Stored discounts can precede their financial effect.
    observer: Observed through observed through adjustment exceptions.
    provenance: observed
    source: 'services-commerce:modules/orders/services/adjustments/resume-adjustments.ts'
branches:
  - Outstanding terms reduce the balance rather than return collected money.
waits:
  - Financial settlement awaits Accounting confirmation.
evidence:
  - >-
    services-commerce at c8b66a98: modules/orders/services/amendments/promotion-amendment*.ts;
    services/adjustments/resume-adjustments.ts; tests/e2e/apply-promotion-amendment.e2e.spec.js,
    promotion-alternatives.e2e.spec.js.
controls: [TC-IAM-006, 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-TEN-004, TC-CRY-001, TC-DAT-001, TC-DAT-002, TC-DAT-003, TC-LOG-001, TC-LOG-002, TC-LOG-003, TC-LOG-004, TC-LOG-005, TC-AVL-004, TC-MON-001, TC-MON-002, TC-MON-004, TC-PI-001, TC-PI-002, TC-PI-003, TC-PI-004, TC-PI-005, TC-VEN-001, TC-VEN-002, TC-VEN-003, TC-PRV-001, TC-PRV-002]
---

# Apply a promotion after the sale

## What It Does

Staff can add an eligible offer to a standing sale using its stored prices. The resulting amendment records discounts and redemption with a settlement plan rather than replacing the original pricing agreement.

## The Flow

```mermaid
sequenceDiagram
  participant S as Staff
  participant O as Orders
  participant P as Promotion library and areas
  participant W as Adjustment worker
  participant X as Accounting
  S->>O: apply code (reason)
  O->>P: which lines qualify (frozen answers)
  O->>P: judge on placed prices
  O->>O: one transaction: discounts, redemption, intervention, adjustment requested
  W->>X: memo, refund or credit
  O->>O: settle
```

## When Something Fails

Discount and redemption commit with the credit request. Financial completion is eventual and resumes through the adjustment machinery. Eligibility-restricted offers are refused when this path lacks the required verdict.

## Open Design Questions

After-sale eligibility needs a supported evaluation boundary. Intervention audit delivery remains incomplete.
