---
id: WF-COM-CAT-009
title: Quote a price
trigger: >-
  The quote path returns calculated amounts and explanations for staff, members or visitors. It loads pricing
  inputs, evaluates qualification, runs configured extensions and asks the selected tax provider.
product_area: commerce
module: catalog
revision: 1
status: draft
design_intent: confirmed
implementation_evidence: partially-observed
inference: []
source_sha:
  services-commerce: c8b66a98e2490617aec38ba5c8165dd9bd0a8f9b
  react-console: baf6dae382d6f41dce976c7f848667ccc37e076f
implements:
  - CAP-COM-CAT-013
  - CAP-COM-CAT-010
  - CAP-COM-CAT-011
  - CAP-COM-CAT-012
  - CAP-COM-CAT-004
crosses:
  - SVC-COM-CAT-pricing
  - SVC-COM-CAT-configuration
idempotency: >-
  Quotes commit no price record and do not reserve an amount. Identical inputs return the same calculation
  while dependencies remain unchanged.
concurrency: >-
  Quotes run independently and observe inputs loaded for that request. Placement rereads and recalculates
  rather than preserving a previous quote.
hops:
  - 'n': 1
    actor_or_service: Pricing API
    action: >-
      Establish caller and priced party, reject anonymous person or cart references and portal-only
      assumptions, and limit the quote to fifty items.
    anchor: 'services-commerce:modules/pricing/services/quotes/price-quotes.ts:priceQuote'
    seam: sync
    on_failure: Reject an unauthorized or malformed quote request.
    left_inconsistent: No pricing record changes.
    observer: The requesting person or service receives the result and any returned refusal.
    provenance: test
    source: >-
      services-commerce:modules/pricing/tests/e2e/price-quotes.e2e.spec.js#refuses a body that names a
      subject, an acting contact, a recipient or a cart: nothing about a person is read anonymously
  - 'n': 2
    actor_or_service: Pricing service
    action: >-
      Read Accounting products and grids, Commerce settings and active audiences, current periods, exchange
      rates and store context; omit variant and modifier data.
    anchor: 'services-commerce:modules/pricing/services/inputs/pricing-inputs.ts:loadPricingInputs'
    seam: sync
    on_failure: Fail the quote when inputs cannot be loaded.
    left_inconsistent: No pricing record changes.
    observer: The requesting person or service receives the result and any returned refusal.
    provenance: test
    source: >-
      services-commerce:modules/pricing/tests/integration/services/inputs/pricing-inputs.integration.spec.js#loads
      the active audiences in rank order, the inactive left out, and the period each schedule is in at the
      instant
  - 'n': 3
    actor_or_service: Pricing service to membership facts and Platform eligibility
    action: Load party membership facts and batch the display eligibility decisions needed by the lines.
    anchor: 'services-commerce:modules/pricing/services/eligibility/commerce-eligibility-port.ts'
    seam: sync
    on_failure: Use Standard and line warnings for unavailable or indeterminate qualification.
    left_inconsistent: The display may lack a qualified audience result.
    observer: The requesting person or service receives the result and any returned refusal.
    provenance: test
    source: >-
      services-commerce:modules/pricing/tests/unit/engine/step-2-audience-resolution.spec.js#does not qualify
      for an ineligible decision, an indeterminate one, a provisional one or one under review, and says why
  - 'n': 4
    actor_or_service: Pricing engine with extensions
    action: >-
      Run deterministic pricing, invoke product and order-price extensions, incorporate their answers and
      round the resulting amounts.
    anchor: >-
      services-commerce:modules/pricing/services/extensions/priced-with-extensions.ts:priceCheckoutWithExtensions
    seam: sync
    on_failure: Skip failed display extensions and flag context-dependent pricing with handler warnings.
    left_inconsistent: A displayed line may lack its configured extension adjustment.
    observer: The requesting person or service receives the result and any returned refusal.
    provenance: observed
    source: 'services-commerce:modules/pricing/services/extensions/failure-policy.ts'
  - 'n': 5
    actor_or_service: Pricing service to tax provider
    action: >-
      Calculate tax through the selected zone-table or Accounting provider; address-free display requests
      receive zero with notice.
    anchor: 'services-commerce:modules/pricing/services/tax/commerce-tax-port.ts'
    seam: sync
    on_failure: Reject unknown provider configuration or an unavailable Accounting tax dependency.
    left_inconsistent: No quote result is persisted.
    observer: The requesting person or service receives the result and any returned refusal.
    provenance: test
    source: >-
      services-commerce:modules/pricing/tests/unit/tax/commerce-tax-port.spec.js#is zone-table when the
      variable is unset or blank
branches:
  - Staff preview can assume audiences or another date and identifies those assumptions.
  - A cart-context quote can include its items and invoke store preprocessing.
  - >-
    Visitor display returns Standard and configured public audience amounts without establishing
    qualification.
waits:
  - Participant and extension calls each have five-second limits within the overall request budget.
evidence:
  - >-
    services-commerce at c8b66a98: modules/pricing/services/quotes/price-quotes.ts;
    services/inputs/pricing-inputs.ts; services/engine/engine.ts;
    services/extensions/priced-with-extensions.ts, failure-policy.ts, commerce-extensions.ts;
    services/tax/*.ts; services/eligibility/commerce-eligibility-port.ts; aws/api/price-quotes.routes.ts (the
    fixture membership facts and extension factory).
  - 'services-commerce at c8b66a98: docs/milestones/COMM-M1-set-up-what-you-sell.md (D5, D6, D10, D14).'
controls: [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-004, TC-LOG-005, TC-AVL-005, TC-PI-001, TC-PI-003, TC-PI-005, TC-PRV-001, TC-PRV-002]
---

# Quote a price

## What It Does

The quote path returns calculated amounts and explanations for staff, members or visitors. It loads pricing inputs, evaluates qualification, runs configured extensions and asks the selected tax provider.

## The Flow

```mermaid
sequenceDiagram
  participant Q as Caller
  participant P as Pricing service
  participant A as Accounting tables
  participant M as Membership facts (fixture)
  participant E as Platform eligibility
  participant X as Extension handlers (fixture)
  participant T as Tax provider
  Q->>P: quote (items, subject, store, currency)
  P->>A: products, grids, rates (one transaction)
  P->>M: facts per party
  P->>E: one batched display evaluation
  P->>P: engine pass
  P->>X: product pricing functions, order price review
  P->>P: engine pass with answers, rounding
  P->>T: tax on net lines
  P-->>Q: prices, provenance, warnings
```

## When Something Fails

Reject an unauthorized or malformed quote request. No pricing record changes. Fail the quote when inputs cannot be loaded. No pricing record changes. Use Standard and line warnings for unavailable or indeterminate qualification. The display may lack a qualified audience result. Skip failed display extensions and flag context-dependent pricing with handler warnings. A displayed line may lack its configured extension adjustment. Reject unknown provider configuration or an unavailable Accounting tax dependency. No quote result is persisted.

## Open Design Questions

Runtime wiring and dependency coverage remain limited as recorded in the module findings. Quotes run independently and observe inputs loaded for that request. Placement rereads and recalculates rather than preserving a previous quote.
