Skip to content

CAP-COM-CAT-006Prepare and publish product presentations

Markdown

CAP-COM-CAT-006

Prepare and publish product presentations

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
A product appears to shoppers exclusively when customer staff publish it.Pictures and files are retained once, safely, and cleaned up when replaced.
Surfaces
consoleapi
Intent sources
services-commerce:docs/milestones/COMM-M1-set-up-what-you-sell.md#D8services-commerce:docs/milestones/COMM-M1-set-up-what-you-sell.md#D11services-commerce:docs/milestones/COMM-M1b-promotions-and-codes.md#Decisions (R6)services-commerce:docs/milestones/walkthroughs/COMM-M1-handoff.md#What changed after your review (6)

Controls

32 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-001 TC-CRY-004 TC-DAT-001 TC-DAT-002 TC-DAT-003 TC-DAT-004 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

Permissions

KeyChecked atScope
commerce.product-listings.readapitenant
commerce.product-listings.createapitenant
commerce.product-listings.updateapitenant
commerce.product-listings.deleteapitenant
commerce.product-listings.bulkapitenant

Business Rules

14 rules, 12 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
Each product has at most one listing, with a workspace-unique web slug composed of lowercase words separated by hyphens.
validationapi, service, database, consoletest
services-commerce:modules/catalog/tests/e2e/product-listings.e2e.spec.js#answers 400 to a second listing of the same product
02must prove
Proposed
Draft listings remain unavailable to the public, published listings appear in store lists, and unlisted listings are accessible through their individual pages.
origin: COMM-M1 D8 (docs/milestones/COMM-M1-set-up-what-you-sell.md)
lifecycleapi, database, servicetest
services-commerce:modules/catalog/tests/unit/storefront/storefront-visibility.spec.js#removes a draft everywhere, an unlisted listing from the list only, and a published one nowhere
03must prove
Proposed
A direct link to an unlisted product permits public quoting and purchasing.
policyservicetest
services-commerce:modules/pricing/tests/e2e/price-quote-public-sale.e2e.spec.js#prices an unlisted product, which the product page opens by its link
04must prove
Proposed
Only digitally delivered merchandise may carry downloadable files, retained privately with ordered labels.
validationservicetest
services-commerce:modules/catalog/tests/e2e/product-listings.e2e.spec.js#answers 400 to files on a product that is not digital merchandise
05must prove
Proposed
Download settings reject zero limits and values exceeding the grant’s maximum use count or ten-year duration.
validationapi, databasetest
services-commerce:modules/catalog/tests/unit/api/product-listing-download-rules.spec.js#refuses a window of 4000 days, naming the field and the bound
06must prove
Proposed
Listing galleries and related-product lists each allow eight entries, and related products cannot include the product itself.
validationservice, consoletest
services-commerce:modules/catalog/tests/integration/services/persistence/product-listings.integration.spec.js#refuses files on a product that is not digital merchandise (none, or physical), and a product that goes with itself (400)
07must prove
Proposed
Featured dates must be ordered; the Featured label applies within its interval and New applies through its configured day.
validationdatabase, consoletest
08must prove
Proposed
Listing saves prepare every image and file through the shared asset pipeline, retain unchanged image identities without recopying, detach replaced assets and reject unprepared references.
origin: COMM-M1 D11 (docs/milestones/COMM-M1-set-up-what-you-sell.md)
invariantservicetest
services-commerce:modules/catalog/tests/integration/services/persistence/product-listings.integration.spec.js#refuses a gallery picture written past the pipeline (a reference the save never prepared)
09
Proposed
Staff may supply listing images by web address or upload, with the console exposing web addresses while the shared upload control remains pending.
origin: COMM-M1 D11 (docs/milestones/COMM-M1-set-up-what-you-sell.md)
policyservice, consoledocumented
10
Proposed
New merchandise defaults to selling in the store, and omitted customer-facing listing text uses the product name.
origin: COMM-M1b R6 (docs/milestones/COMM-M1b-promotions-and-codes.md)
policyconsoledocumented
11must prove
Proposed
The initial listing save requires create permission; changes and publication of an existing listing require update permission.
permissionapi, consoletest
react-console:components/commerce/__tests__/permission-gating.test.tsx#asks a product not on the shelf yet for the create key, since its first save is a create
12must prove
Proposed
Listing replacement requires the complete record at its read version and rejects a payload referring to another product.
invariantapi, servicetest
services-commerce:modules/catalog/tests/e2e/product-listings.e2e.spec.js#replaces at the version read, a gallery picture kept with its id and one replaced; the stale version is 409; a mismatched product_id 400
13must prove
Proposed
A full lock prevents replacing a listing, and either full or deletion-only locking prevents removing it.
policyserviceobserved
14must prove
Proposed
Scheduled cleanup queues due assets without deleting them; the consumer rechecks references, retires detached files or deletes never-committed files, and retries failures before retaining a terminal failure reason.
lifecycleserviceinferred

Scenarios

IdGivenWhenThenProvenance
01The merchandise t-shirt uses physical deliverySave its headline, gallery and category selectionsThe first listing version retains prepared permanent assets and the selected shelvestest
services-commerce:modules/catalog/tests/e2e/product-listings.e2e.spec.js#answers 200 with the listing as sent, every file a permanent reference, its shelves, at version 1
02The merchandise e-book uses digital deliveryAttach labeled filesThe response retains ordered private files and the digital delivery informationtest
services-commerce:modules/catalog/tests/e2e/product-listings.e2e.spec.js#carries its files, private, with their labels, and the merchandise extension’s delivery

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.