Skip to content

CAP-COM-FUL-001Choose delivery conditions for sold items

Markdown

CAP-COM-FUL-001

Choose delivery conditions for sold items

Markdown
  • DocumentDraft
  • Product intentProposed
  • ImplementationObserved

KindCapabilityProduct areaCommerceModuleFulfillment, Shipping and InventoryRevision1

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
Delivery respects the financial and approval conditions selected by the customer.Later policy edits do not silently alter existing orders.
Surfaces
api
Intent sources
services-commerce:docs/migrations/obligation-register/README.md#D-P4-17 (Q05, Andrew 2026-10-19)

Controls

24 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-DAT-001 TC-DAT-002 TC-DAT-003 TC-DAT-004 TC-LOG-001 TC-LOG-002 TC-LOG-003 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.fulfillment-policies.readapitenant
commerce.fulfillment-policies.createapitenant
commerce.fulfillment-policies.updateapitenant
commerce.fulfillment-policies.deleteapitenant
commerce.fulfillment-policies.applyapitenant

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
A delivery policy selects one financial condition—immediate, full payment, minimum amount, minimum percentage, paid deposit or none—and carries approval, readiness, reversal, bank-debit and parent-line settings; amount and percentage fields are required only for their matching conditions.
✓ minimum percent with 50 is accepted✗ minimum amount with no amount is refused naming the field
validationapi, servicetest
services-commerce:modules/fulfillment/tests/e2e/fulfillment-policies.e2e.spec.js#refuses a policy the contract refuses (400 naming the field), a second policy of one scope (400), a reader’s create (403) and the other tenant’s read (404)
02must prove
Proposed
Each product, ordering profile or workspace default has at most one policy, and the workspace default alone omits a scope reference.
validationservice, databasetest
services-commerce:modules/fulfillment/tests/integration/services/persistence/fulfillment-policies.integration.spec.js#refuses a second tenant default and a second policy of one scope, 400 naming the replacement
03must prove
Proposed
Policy selection uses the active product policy, then the active ordering-profile policy, then the active workspace default, then the built-in full-payment policy with approved terms allowed and reversals sent for review.
calculationservicetest
services-commerce:modules/fulfillment/tests/unit/policies/policy-resolution.spec.js#takes the product’s policy over the ordering profile’s and the tenant default’s
04must prove
Proposed
Placement copies the selected policy, version and origin onto the obligation, preserving that gate when the configuration is subsequently changed or removed.
invariantservicetest
services-commerce:modules/fulfillment/tests/e2e/fulfillment-policies.e2e.spec.js#freezes the product policy on the obligation with the row’s version and source, and the replacement changes nothing on it
05must prove
Proposed
Preparation adds any application-required approval or readiness condition to the configured policy and cannot remove a configured safeguard.
policyservicetest
services-commerce:modules/fulfillment/tests/unit/policies/policy-resolution.spec.js#ORs the participant’s approval and prerequisite onto the policy, and never waives what the policy asks
06must prove
Proposed
A minimum-payment amount is retained unchanged in the order currency, permits zero and rejects negative values with the affected field identified.
origin: Q05, Andrew 2026-10-19: services-commerce:docs/migrations/obligation-register/README.md#D-P4-17
validationapi, servicetest
services-commerce:modules/fulfillment/tests/e2e/fulfillment-paid-amount.e2e.spec.js#refuses a negative amount 400 naming financial_amount_minor
07must prove
Proposed
Policy replacement requires the current version, and a locked policy rejects replacement and deletion.
validationservice, databasetest
services-commerce:modules/fulfillment/tests/integration/services/persistence/fulfillment-policies.integration.spec.js#replaces a policy at the version read, refuses a stale version 409, and refuses a locked record
08must prove
Proposed
Policy application records the staff reason and intervention before examining a bounded page of pending obligations in scope, replaces gates that differ and leaves matching gates unchanged on repetition.
lifecycleapi, servicetest
services-commerce:modules/fulfillment/tests/e2e/fulfillment-policies.e2e.spec.js#re-freezes the pending obligation to the replaced policy with a receipt, records the intervention, and re-freezes nothing on a repeat
09must prove
Proposed
Policy application excludes authorized and blocked obligations and preserves any approval or readiness requirement in the existing gate.
origin: D-P4-05 (build decision, not a product ruling): services-commerce:docs/migrations/obligation-register/README.md#D-P4-05
invariantserviceobserved
10must prove
Proposed
Policy reads require read authority; creation, replacement, deletion and application require their respective administrator permissions, with application treated as sensitive.
permissionapiobserved
11
Proposed
Removing all configured policies makes the built-in policy the fallback for newly sold lines.
policyservicetest
services-commerce:modules/fulfillment/tests/e2e/fulfillment-policies.e2e.spec.js#deletes the policies, after which the effective policy is the built-in default

Scenarios

IdGivenWhenThenProvenance
01A buyer selects a product with a 300.00 minimum-payment policy.Place the order.Its obligation retains that threshold and cannot pass the financial condition below 300.00.test
02Policies exist for the product, ordering profile and workspace.Request the effective policy for a new product line.The answer selects the product policy and identifies its origin.test
services-commerce:modules/fulfillment/tests/e2e/fulfillment-policies.e2e.spec.js#answers the effective policy: the product’s over the ordering profile’s over the tenant default’s

Edge Cases

IdGivenWhenThenProvenance
03A waiting obligation retains an earlier product-policy version.Replace configuration without applying it to existing work.The saved obligation gate remains unchanged.test
services-commerce:modules/fulfillment/tests/e2e/fulfillment-policies.e2e.spec.js#freezes the product policy on the obligation with the row’s version and source, and the replacement changes nothing on it

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.