Skip to content

CAP-COM-CAT-020Present offers and process buyer responses

Markdown

CAP-COM-CAT-020

Present offers and process buyer responses

Markdown
  • DocumentDraft
  • Product intentProposed
  • ImplementationObserved

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
Suppression respects existing purchases and recent dismissals.A suggestion taken is added once, at the price displayed.
Surfaces
portalapi

Controls

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

Permissions

KeyChecked atScope
commerce.offers.readapitenant
commerce.offers.respondapitenant

Business Rules

11 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
Evaluation ranks active rules for a placement and subject, quotes each candidate for that subject and applies request, rule and placement limits.
calculationservicetest
services-commerce:modules/recommendations/tests/e2e/offers.e2e.spec.js#answers one offer: the mug, from the listing, priced $12.00 by the quote, live, to add to the checkout, expiring with the quote
02must prove
Proposed
Configured suppression removes candidates already in checkout, previously accepted or recently dismissed, using thirty days as the default dismissal interval.
policyservicetest
03must prove
Proposed
First acceptance checks the fifteen-minute expiry, while recorded acceptances remain repeatable after expiry and added items do not retain a frozen offer price.
lifecycleserviceobserved
04must prove
Proposed
Accepting an add or upgrade offer changes the buyer’s checkout once and records the offer reference, with repeats returning the saved result.
policyservice, databasetest
services-commerce:modules/recommendations/tests/e2e/offers.e2e.spec.js#answers the first acceptance to a second, repeated, adding nothing
05must prove
Proposed
Portal response authority follows the presented contact, acting contact or accessible checkout; console staff may respond within the workspace, and repeated dismissal records no additional interaction.
permissionserviceobserved
06must prove
Proposed
Anonymous subjects receive public-price estimates only in public placements, and those estimate presentations cannot be accepted.
policyservicetest
services-commerce:modules/recommendations/tests/e2e/offers.e2e.spec.js#cannot have the estimate accepted, even by a signed-in member: 409 sign_in_required
07
Proposed
Holdout assignment is recorded without presenting that rule’s offer to the withheld subject.
policyservicetest
services-commerce:modules/recommendations/tests/unit/holdout.spec.js#holds a subject out exactly when its bucket is below ten times the percentage
08must prove
Proposed
Staff-only offer preview reports suppression reasons and persists no presentation.
permissionservicetest
services-commerce:modules/recommendations/tests/e2e/offers.e2e.spec.js#is refused to a portal member, 403 preview_not_allowed, and answers the console the suppressed rules without writing
09
Proposed
An accepted offer reference passes from the checkout item to its order line for conversion measurement.
invariantservicetest
services-commerce:modules/recommendations/tests/e2e/offers.e2e.spec.js#places the order with the offer frozen on the mug’s line
10must prove
Proposed
Offer evaluation requires read permission, response requires respond permission, and anonymous evaluation requires neither but rejects person or cart references.
permissionapitest
services-commerce:modules/recommendations/tests/e2e/recommendations-security.e2e.spec.js#may evaluate but not accept: 403 permission_missing on the acceptance
11must prove
Proposed
Live offer evaluation persists shown and held-out presentations and locks their producing rules in the same transaction, while preview evaluation omits those writes.
lifecycleserviceobserved

Scenarios

IdGivenWhenThenProvenance
01A member’s t-shirt cart produces a related mug offerAccept the mug and complete the orderThe offer reference follows the item and performance records a twelve-dollar converted linetest
services-commerce:modules/recommendations/tests/e2e/offers.e2e.spec.js#shows one shown, one accepted and one converted line worth $12.00 on the rule’s performance once the order is accepted

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.