Skip to content

CAP-COM-FUL-011Quote shipping and pickup choices for a cart

Markdown

CAP-COM-FUL-011

Quote shipping and pickup choices for a cart

Markdown
  • DocumentDraft
  • Product intentProposed
  • ImplementationObserved

KindCapabilityProduct areaCommerceModuleFulfillment, Shipping and InventoryRevision1

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
Shipping choices show their charges before placement.Placement retains the buyer's selected shipping charge.
Surfaces
api
Intent sources
services-commerce:docs/migrations/shipping/README.md#D-P8S-14 (decision L, Andrew 2026-10-18)

Controls

27 controls apply, from the corpus control catalogue.

TC-AZ-001 TC-AZ-002 TC-AZ-003 TC-AZ-004 TC-AZ-006 TC-TEN-001 TC-TEN-002 TC-TEN-003 TC-SEC-001 TC-SEC-002 TC-SEC-003 TC-SEC-004 TC-CRY-001 TC-DAT-001 TC-DAT-002 TC-DAT-003 TC-LOG-004 TC-LOG-005 TC-PI-001 TC-PI-002 TC-PI-003 TC-PI-005 TC-VEN-001 TC-VEN-002 TC-VEN-003 TC-PRV-001 TC-PRV-002

Business Rules

10 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 cart without shippable goods requires no shipping, incurs zero charge and reads no zone.
policyservicetest
services-commerce:modules/shipping/tests/integration/services/persistence/shipping-configuration.integration.spec.js#requires no shipping for a checkout of an e-book alone: no option, zero, no zone consulted
02must prove
Proposed
An active zone must match every configured address restriction, with case-insensitive regions and space-insensitive postal prefixes; unrestricted zones match even absent addresses, and specificity ranks prefix, region, country and unrestricted matches before priority, name and identity.
calculationservicetest
services-commerce:modules/shipping/tests/unit/rating/zone-strategy-rating.spec.js#ranks a prefix over a region over a country over anywhere
03must prove
Proposed
Flat strategies charge once, per-unit strategies add one base charge plus a charge per physical unit, and weight bands use the first fitting band or leave excess weight unrated.
✓ five shirts at 1.50 per unit plus 2.00 base: 9.50✗ one line of five charged once per line
calculationservicetest
services-commerce:modules/shipping/tests/unit/rating/zone-strategy-rating.spec.js#charges a per-unit strategy per UNIT shipped, never per line, plus its base once
04must prove
Proposed
A strategy becomes free at its merchandise-subtotal threshold and is excluded when its currency differs from the cart.
calculationservicetest
services-commerce:modules/shipping/tests/unit/rating/zone-strategy-rating.spec.js#makes an option free at or above free_above_minor, measured against the merchandise subtotal
05must prove
Proposed
No matching zone or no option in the cart currency produces zero shipping charge and a warning.
policyservicetest
services-commerce:modules/shipping/tests/integration/services/persistence/shipping-configuration.integration.spec.js#charges nothing with a warning when no zone matches (the worldwide zone inactive) and when the zone offers no option in the currency
06must prove
Proposed
Carrier rating uses the account's Integration Platform connection and markup rounded half away from zero, with failed quotes yielding warnings and no option rather than failing checkout.
origin: UPS through the Integration Platform, Andrew 2026-10-18 21:10 UTC ("move it now"): services-commerce:docs/migrations/shipping/README.md#D-P8S-15
calculationservicetest
services-commerce:modules/shipping/tests/unit/carriers/carrier-adapters.spec.js#applies the markup in basis points, rounding half away from zero
07must prove
Proposed
An absent or cleared choice selects the first option, an explicitly unavailable choice is rejected, and an obsolete saved choice falls back to the first option with a warning.
origin: DEF-COM-0868 (acceptance defect)
validationapi, servicetest
services-commerce:modules/shipping/tests/e2e/shipping.e2e.spec.js#re-rates with the buyer’s choice (five units at 150), and refuses a strategy the zone does not offer 400 shipping_option_unavailable
08must prove
Proposed
Pickup options appear alongside shipped options at zero charge with collection details, except when their warehouse is inactive.
origin: Decision L, Andrew 2026-10-18 ("add it now"): services-commerce:docs/migrations/shipping/README.md#D-P8S-14
policyservicetest
services-commerce:modules/shipping/tests/integration/services/persistence/shipping-configuration.integration.spec.js#offers each pick-up at zero beside the zone’s shipped options, kind pickup, with where the buyer collects
09must prove
Proposed
Placement appends a shipping-product line, freezes destination and chosen option, and rejects placement entirely if the ordering profile lacks a required shipping product.
origin: DEF-COM-0873 (acceptance defect)
policyservicetest
services-commerce:modules/shipping/tests/e2e/shipping.e2e.spec.js#places the order with the charge, the shipping line on the shipping product after the item line, the ship-to address frozen and the choice in the snapshot
10must prove
Proposed
Shipping rating reads zones only within the current workspace.
invariantdatabasetest
services-commerce:modules/shipping/tests/integration/services/persistence/shipping-configuration.integration.spec.js#never reads another tenant’s zones: the other tenant’s rating sees its own domestic zone, not this tenant’s changes

Scenarios

IdGivenWhenThenProvenance
01Five shirts are addressed to Texas where flat and UPS options apply.Preview the cart's shipping choices.Both choices appear, the flat choice is initially selected and its charge contributes to totals.test
services-commerce:modules/shipping/tests/e2e/shipping.e2e.spec.js#answers shipping_required true with the Texas zone’s two options, the flat one selected, the charge in the totals

Edge Cases

IdGivenWhenThenProvenance
02The cart contains only an electronic book.Preview shipping.The result has no shipping requirement, options or charge.test
services-commerce:modules/shipping/tests/e2e/shipping.e2e.spec.js#answers shipping_required false, no option and no charge for a cart of an e-book

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.