Skip to content

DOM-COM-CAT-004Price

Markdown

DOM-COM-CAT-004

Price

Markdown
  • DocumentDraft
  • ImplementationPartially observed

Planning

Specified by
CON-COM-CAT-004

Design

Owned by
SVC-COM-CAT-pricing

KindDomain objectProduct areaCommerceModuleCatalog and Selling ConfigurationRevision1

Read atservices-commerce c8b66a98react-console baf6dae3

Relationships

ToCardinalityOwnershipCrosses a serviceOn archive or delete
DOM-COM-CAT-003one price per product per lineAccounting retains the product and price grid; Commerce retains the product’s purchasing settings and handler reference.no
DOM-COM-CAT-001many prices to one policy currencyThe checkout policy establishes the currency used by sale pricing.no
DOM-COM-CAT-005one price to many promotion alternativesPromotion evaluation applies discounts to the audience or Standard basis returned by pricing.no
DOM-COM-CAT-006one quote per offer candidateRecommendation candidates use the quote service without reserving the displayed price.no

Invariants

InvariantProtectsEnforced atProvenance
INV-DOM-COM-CAT-004-01
Provisioning supplies Standard and Member; the service prevents their deletion and the database protects their kinds.
service, databasetest
services-commerce:modules/pricing/tests/e2e/pricing-audiences.e2e.spec.js#lists standard for everyone at rank 0 and member by eligibility at rank 10, built in, member shown to visitors, with no binding yet
INV-DOM-COM-CAT-004-02
Audiences require distinct nonnegative ranks and names distinct after case and spacing normalization.
service, databasetest
services-commerce:modules/pricing/tests/integration/services/persistence/pricing-audiences.integration.spec.js#refuses a create to the same name in other letter case and spacing, 409 audience_name_taken naming the existing audience
INV-DOM-COM-CAT-004-03
Price-row references block audience deletion; deactivation retains those rows but excludes the audience from selection.
servicetest
services-commerce:modules/pricing/tests/integration/services/persistence/pricing-audiences.integration.spec.js#refuses 409 audience_in_use, naming the products and their count, and keeps the audience
INV-DOM-COM-CAT-004-04
At commit, schedule intervals must meet exactly, with an open start only on the first and an open end only on the last.
databasetest
services-commerce:modules/pricing/tests/integration/db/member-pricing-tables.table.integration.spec.js#refuses an overlap, a second open end and an open start that is not first
INV-DOM-COM-CAT-004-05
Used periods retain their name and start; a current end can move to now or later if adjacency remains valid, while elapsed periods refuse edits and first-sale stamps remain fixed.
databasetest
services-commerce:modules/pricing/tests/integration/db/member-pricing-tables.table.integration.spec.js#lets a sold-in current period end a week later, the next period starting where it ends
INV-DOM-COM-CAT-004-06
A referenced schedule cannot be disabled or removed, and purchasing settings cannot select an inactive schedule.
service, databasetest
services-commerce:modules/pricing/tests/integration/services/persistence/pricing-schedules.integration.spec.js#refuses with schedule_in_use, the count in the sentence, and the count and the first five product ids in the details
INV-DOM-COM-CAT-004-07
Periods belong to their workspace; the retained schedule request contract accepts no owner.
api, databasetest
services-commerce:modules/pricing/tests/e2e/pricing-schedules.e2e.spec.js#answers 400 to an event owner (a schedule has none, COMM-M1 D2), to a property outside the contract and to a tenant_id other than the path’s
INV-DOM-COM-CAT-004-08
Calculation rounds to whole minor currency units and resolves exact halves away from zero.
servicetest
services-commerce:modules/pricing/tests/unit/engine/rounding.spec.js#rounds a negative half down, away from zero, where Math.round would answer -2
INV-DOM-COM-CAT-004-09
Quotes do not bind a price; placement calculates the amount again.
servicetest
services-commerce:modules/pricing/tests/unit/engine/quote-tolerance.spec.js#differs with the changes when a price moved, never answering the previewed price
INV-DOM-COM-CAT-004-10
Placement rechecks eligibility-priced lines transactionally and rejects lapsed qualification instead of silently selecting another price.
servicetest
services-commerce:modules/pricing/tests/integration/services/placement/audience-settlement.integration.spec.js#refuses the placement for a lapsed member, one audience_lapsed problem per line with the portal sentence, stamping nothing
INV-DOM-COM-CAT-004-11
A Standard currency prohibition excludes purchasing in that currency for every audience.
servicetest
services-commerce:modules/pricing/tests/unit/engine/step-3-base-price.spec.js#refuses a currency the product is prohibited in for everyone (a prohibit on standard)
INV-DOM-COM-CAT-004-12
Purchasing-settings replacement resets omitted values to defaults.
service, databasetest
services-commerce:modules/pricing/tests/e2e/product-purchasing-settings.e2e.spec.js#gives a setting the PUT leaves out its default, the whole record being stated

The Markdown files under specs/ in rhythmsoftware/rhythm-v2-docs are the canonical source of truth. This reader is a generated, read-only projection of them.