Skip to content

CAP-COM-CAT-011Maintain dated pricing periods

Markdown

CAP-COM-CAT-011

Maintain dated pricing periods

Markdown
  • DocumentDraft
  • Product intentProposed
  • ImplementationInconsistent

KindCapabilityProduct areaCommerceModuleCatalog and Selling ConfigurationRevision1

Read atservices-commerce c8b66a98react-console baf6dae3

The Formal Contract

The narrative above explains; the sections below are authoritative — the rules, scenarios and tests this document binds.

Outcomes
A price edits exactly at a period boundary.Each past charge stays explainable by the period that priced it.
Surfaces
api
Intent sources
services-commerce:docs/milestones/COMM-M1-set-up-what-you-sell.md#D2services-commerce:docs/milestones/COMM-M1-set-up-what-you-sell.md#D6services-commerce:docs/milestones/COMM-M1-set-up-what-you-sell.md#D4-F1services-commerce:docs/debt/pricing-schedules-owned-by-event.md

Controls

22 controls apply, from the corpus control catalogue.

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-CRY-004 TC-DAT-004 TC-LOG-004 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

Permissions

KeyChecked atScope
commerce.pricing-schedules.readapitenant
commerce.pricing-schedules.createapitenant
commerce.pricing-schedules.updateapitenant
commerce.pricing-schedules.deleteapitenant
commerce.pricing-schedules.bulkapitenant

Business Rules

11 rules, 10 to be proved before approval. A rule's product intent is derived from its origin: 0 confirmed by a product decision, the rest inheriting this capability's proposed.

IdRuleKindEnforced atProvenance
01must prove
Proposed
The implemented price schedule holds workspace periods without ownership and rejects an owner such as an event in its request.
origin: COMM-M1 D2 (docs/milestones/COMM-M1-set-up-what-you-sell.md)
no proof recorded yet
policyapi, 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
02must prove
Proposed
A period includes its start boundary and excludes its end in the schedule’s time zone.
origin: COMM-M1 D6 (docs/milestones/COMM-M1-set-up-what-you-sell.md)
no proof recorded yet
calculationservice, databasetest
services-commerce:modules/pricing/tests/integration/services/persistence/pricing-schedules.queries.integration.spec.js#finds the period containing an instant: the open start, a boundary belonging to the period it starts, the open end
03must prove
Proposed
Adjacent periods share boundaries without gaps or overlaps, with an open start permitted only first and an open end only last.
origin: COMM-M1 D6 (docs/milestones/COMM-M1-set-up-what-you-sell.md)
no proof recorded yet
invariantservice, 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
04must prove
Proposed
Elapsed or used periods retain their names and boundaries and prevent their own and their schedule’s deletion, except for the permitted current-end adjustment; the first-sale marker is permanent.
origin: COMM-M1 D6 (docs/milestones/COMM-M1-set-up-what-you-sell.md)
no proof recorded yet
invariantservice, databasetest
services-commerce:modules/pricing/tests/integration/db/member-pricing-tables.table.integration.spec.js#records the first sale once, never cleared or moved, after which the period keeps its name and is never deleted, nor its schedule
05must prove
Proposed
Staff may adjust a current period’s end no earlier than now, shifting the next period’s start with it even after a sale, while preserving prior charges.
origin: COMM-M1 D6 (docs/milestones/COMM-M1-set-up-what-you-sell.md)
no proof recorded yet
lifecycleservice, databasetest
services-commerce:modules/pricing/tests/e2e/pricing-schedules.e2e.spec.js#extends the sold-in Early Bird by a week, Regular starting where it now ends, its first sale untouched
06must prove
Proposed
A period identity belongs to one workspace schedule, and reuse by another schedule is refused with the identity identified.
no proof recorded yet
validationservice, databasetest
services-commerce:modules/pricing/tests/e2e/pricing-schedules.e2e.spec.js#answers 400 with the problem code period_id_taken, naming the id, to a second schedule taking a period id, creating nothing
07must prove
Proposed
Referenced schedules cannot be deactivated or deleted, with product counts and up to five product references reported; inactive schedules cannot be selected by products.
origin: COMM-M1 D4-F1 (docs/milestones/COMM-M1-set-up-what-you-sell.md)
no proof recorded yet
lifecycleservice, 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
08must prove
Proposed
A versioned schedule replacement retains unchanged periods, updates permitted changes, inserts additions and removes omitted periods where allowed.
no proof recorded yet
invariantservicetest
services-commerce:modules/pricing/tests/integration/services/persistence/pricing-schedules.integration.spec.js#answers the replaced record at version 2: the kept period at version 1, the changed one at version 2, the new one inserted, the one left out gone
09
Proposed
Staff see a product’s schedule periods as pricing-grid columns, without a standalone schedules screen.
origin: COMM-M1 walkthrough ruling R5 (docs/debt/pricing-schedules-owned-by-event.md)
policyconsoledocumented
10must prove
Proposed
Schedule inspection requires read permission and schedule writes require administrator permissions.
no proof recorded yet
permissionapitest
11must prove
Proposed
A full lock prevents replacing a schedule, and either full or deletion-only locking prevents removing it.
no proof recorded yet
policyserviceobserved

Scenarios

IdGivenWhenThenProvenance
01Early Bird’s end is the following period’s startCalculate just before and exactly at that boundaryThe earlier instant selects Early Bird and the boundary selects Regulardocumented
02Current Early Bird already has a first-sale markerExtend its end by one weekRegular’s start moves with it and the earlier sale remains associated with Early Birdtest
services-commerce:modules/pricing/tests/e2e/pricing-schedules.e2e.spec.js#still reads a sale made before the change in the same period, and now a day after the old end in Early Bird too

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.