Skip to content

CAP-COM-CAT-003Configure a store’s offered assortment

Markdown

CAP-COM-CAT-003

Configure a store’s offered assortment

Markdown
  • DocumentDraft
  • Product intentProposed
  • ImplementationObserved

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
The console supports store preparation and subsequent maintenance.Category assortment determines the store offering.
Surfaces
consoleapi
Intent sources
services-commerce:docs/milestones/COMM-M1-set-up-what-you-sell.md#D3services-commerce:docs/milestones/plans/COMM-M1-plan.md#2. Scope (item 2)services-commerce:docs/milestones/plans/COMM-M1-plan.md#D3. Build the Stores screen?

Controls

22 controls apply, from the corpus control catalogue.

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-001 TC-CRY-004 TC-DAT-001 TC-DAT-002 TC-DAT-003 TC-DAT-004 TC-LOG-004 TC-LOG-005 TC-PI-001 TC-PI-003 TC-PI-005 TC-PRV-001 TC-PRV-002

Permissions

KeyChecked atScope
commerce.stores.readapitenant
commerce.stores.createapitenant
commerce.stores.updateapitenant
commerce.stores.deleteapitenant
commerce.stores.bulkapitenant

Business Rules

13 rules, 9 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
Every store references a checkout policy in its workspace; an omitted or unknown policy produces a field-specific refusal.
origin: COMM-M1 D3 (docs/milestones/COMM-M1-set-up-what-you-sell.md)
no proof recorded yet
validationapi, service, database, consoletest
services-commerce:modules/configuration/tests/e2e/stores.e2e.spec.js#answers 400 to an ordering profile the tenant does not have, naming the property
02must prove
Proposed
Commerce rejects business-unit or currency fields on a store because its checkout policy supplies those values.
no proof recorded yet
validationapitest
services-commerce:modules/configuration/tests/e2e/stores.e2e.spec.js#answers 400 to a currency or a business unit on the body: the store carries neither since D23
03
Proposed
Staff define an assortment as all categories, selected categories, or all categories except selected exclusions.
origin: COMM-M1 D3 (docs/milestones/COMM-M1-set-up-what-you-sell.md)
policyapi, database, consoletest
04must prove
Proposed
Assortment references must resolve to categories in the store’s workspace; categories from another workspace are treated as unknown.
no proof recorded yet
validationservicetest
services-commerce:modules/configuration/tests/integration/services/persistence/stores.integration.spec.js#refuses a category id the tenant does not have, 400 naming category_ids and the id, creating nothing
05must prove
Proposed
The chosen home category must satisfy the store’s inclusion or exclusion rule.
origin: COMM-M1 D3 (docs/milestones/COMM-M1-set-up-what-you-sell.md)
no proof recorded yet
validationservicetest
services-commerce:modules/configuration/tests/integration/services/persistence/stores.integration.spec.js#refuses a home category an "all_but" rule leaves out, 400 naming home_category_id
06
Proposed
Without configured purchasing roles, a store permits any affiliated contact to purchase for an organization.
policyservice, databasetest
services-commerce:modules/configuration/tests/integration/services/persistence/stores.integration.spec.js#defaults the purchasing roles to none: any affiliated contact may buy for an organization
07
Proposed
A store retains its supplied or name-derived identity, and creation under an occupied identity is refused.
validationservicetest
services-commerce:modules/configuration/tests/e2e/stores.e2e.spec.js#derives the id from the name when the request names none, and defaults the purchasing roles to none
08must prove
Proposed
Commerce refuses removal of a store referenced by a checkout or order and identifies that store.
no proof recorded yet
lifecycleservice, databasetest
09
Proposed
The shared asset pipeline retains a store’s default picture; replacement detaches the previous image for retirement, and store deletion detaches the current image.
origin: COMM-M1 D11 (docs/milestones/COMM-M1-set-up-what-you-sell.md)
lifecycleservicetest
10must prove
Proposed
Saving a store preserves its two pricing-extension references without verifying that registered handlers exist for them.
no proof recorded yet
policyserviceobserved
11must prove
Proposed
Store replacement requires the complete record at its read version and rejects stale versions.
no proof recorded yet
invariantapi, servicetest
services-commerce:modules/configuration/tests/e2e/stores.e2e.spec.js#replaces a store at the version read, the purchasing roles with it, and answers 409 to the stale version after
12must prove
Proposed
Store inspection requires read permission; creating, replacing and deleting require the corresponding administrator permissions.
no proof recorded yet
permissionapi, consoletest
13must prove
Proposed
A full lock prevents replacing a store, and either full or deletion-only locking prevents removing it.
no proof recorded yet
policyserviceobserved

Scenarios

IdGivenWhenThenProvenance
01Main and the Books and Apparel categories are configuredCreate Bookstore offering those categories with Books as homeIts first saved version retains that policy and assortmenttest
services-commerce:modules/configuration/tests/integration/services/persistence/stores.integration.spec.js#creates a store whose rule names categories the tenant has, and whose home category the rule admits
02Bookstore admits only BooksChoose Apparel as its home categoryThe home selection fails validationtest
services-commerce:modules/configuration/tests/e2e/stores.e2e.spec.js#answers 400 to a home category outside the assortment, on a create and on a replacement, naming home_category_id

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.