Skip to content

CAP-COM-CAT-019Configure recommendation rules and placements

Markdown

CAP-COM-CAT-019

Configure recommendation rules and placements

Markdown
  • DocumentDraft
  • Product intentProposed
  • ImplementationPartially observed

KindCapabilityProduct areaCommerceModuleCatalog and Selling ConfigurationRevision1

Read atservices-commerce c8b66a98

The Formal Contract

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

Outcomes
Suggestions appear exclusively where a placement can show them.A rule that has been displayed does not permit edit what it offers underneath its results.
Surfaces
api

Controls

27 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-CHG-001 TC-CHG-002 TC-CHG-003 TC-CHG-004 TC-CHG-007 TC-PI-001 TC-PI-003 TC-PI-005 TC-PRV-001 TC-PRV-002

Permissions

KeyChecked atScope
commerce.recommendation-rules.readapitenant
commerce.recommendation-rules.createapitenant
commerce.recommendation-rules.updateapitenant
commerce.recommendation-rules.activateapitenant
commerce.recommendation-rules.deleteapitenant
commerce.recommendation-rules.bulkapitenant
commerce.recommendation-placements.readapitenant
commerce.recommendation-journeys.readapitenant
commerce.recommendation-journeys.createapitenant
commerce.recommendation-journeys.updateapitenant
commerce.recommendation-journeys.deleteapitenant
commerce.recommendation-journeys.bulkapitenant

Business Rules

11 rules, 7 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
Recommendation rules select related products, add-ons, upgrades or membership savings and accept only their kind’s parameters, with add-ons requiring products.
validationservicetest
services-commerce:modules/recommendations/tests/unit/rule-rules.spec.js#refuses an add_on rule with no products, parameters_invalid, naming the path
02must prove
Proposed
Placement bindings must support the rule kind and constrain its offer cap to one through ten without exceeding the placement’s cap.
validationservice, databasetest
services-commerce:modules/recommendations/tests/e2e/recommendation-rules.e2e.spec.js#refuses a cap above the placement’s, 400 max_offers_exceeds_placement
03
Proposed
Unless overridden, a rule adds its candidate to checkout or replaces the existing item for an upgrade.
policyservicetest
services-commerce:modules/recommendations/tests/unit/rule-rules.spec.js#is the kind’s default: add to the checkout, or replace the item for an upgrade
04must prove
Proposed
Application-flow actions remain unavailable, while membership-savings configuration is accepted for later evaluation.
policyservicetest
services-commerce:modules/recommendations/tests/e2e/recommendation-rules.e2e.spec.js#refuses a rule whose action is start_journey, 409 action_unavailable: the journeys are R3’s
05must prove
Proposed
Recommendation lifecycle uses draft, active, paused, ended and archived states; activation requires placement binding and a placement accepts at most twenty-five active rules.
lifecycleservicetest
services-commerce:modules/recommendations/tests/integration/services/persistence/recommendation-rules.integration.spec.js#refuses the twenty-sixth active rule of one placement, too_many_active_rules, naming the placement
06must prove
Proposed
The first presentation locks rule substance while permitting message changes.
lifecycleservicetest
services-commerce:modules/recommendations/tests/integration/services/persistence/recommendation-rules.integration.spec.js#refuses the substance of a locked rule, rule_locked, naming the columns, while the message stays editable
07must prove
Proposed
Recommendation names are workspace-unique and deterministic subject assignment can withhold offers from up to half the audience.
validationservice, databasetest
services-commerce:modules/recommendations/tests/unit/holdout.spec.js#answers the same bucket for the same subject and rule every time
08
Proposed
Five store placements cover catalog, product, cart, checkout review and order confirmation, while applications register placements and flows under their own names.
policyservicetest
09
Proposed
Application-flow registrations are unique per kind and refuse updates or deletion while locked.
lifecycleservicetest
10
Proposed
Recommendation performance aggregates shown, accepted and converted offers and their value by placement and day.
calculationservicetest
services-commerce:modules/recommendations/tests/integration/services/persistence/recommendation-performances.queries.integration.spec.js#answers one row per placement and day, counted from the rows: the cart on the seventh and the review on the eighth
11must prove
Proposed
Rules and placements require their read permissions; rule and flow writes require administrator permissions and launch or resume requires separate activation authority.
permissionapitest
services-commerce:modules/recommendations/tests/e2e/recommendations-security.e2e.spec.js#lists the rules and the placements, and is refused a create and an activation 403 permission_missing

Scenarios

IdGivenWhenThenProvenance
01A related-products rule is bound to the cartExercise the supported lifecycle sequenceIt passes through active, paused, active, ended and archived, refusing unsupported transitionstest

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.