Skip to content

JNY-COM-ORD-005A partial cancellation refunds the affected purchase

Markdown

JNY-COM-ORD-005

A partial cancellation refunds the affected purchase

Markdown
  • DocumentDraft
  • Product intentProposed
  • ImplementationObserved

KindJourneyProduct areaCommerceModuleCustomer purchases, purchased benefits and vendor stockRevision1End-to-endOptional

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.

Goal
Cancel an allowed part of an accepted purchase and settle only the affected part.
Screens
/console/{tenantId}/orders/{orderId}

Steps

#SurfaceActionCapabilityExpectedProvenance
1/console/{tenantId}/orders/{orderId}Inspect the member’s accepted purchase containing two shirts and a mug.CAP-COM-ORD-010The starting purchase is accepted and fully paid.test
services-commerce:modules/orders/tests/integration/services/persistence/orders.queries.integration.spec.js#answers the order whole: every column mapped, the system properties, the mirror absent until derived
2requestCancellationAsk to cancel one shirt.CAP-COM-ORD-014Evaluation permits that quantity without a fee or approval wait and execution begins.test
services-commerce:modules/orders/tests/e2e/cancellations.e2e.spec.js#answers 200 with the document completed in the one request: allowed, executed, the money moved, the customer status cancelled
3requestCancellationRun the permitted cancellation and its settlement.CAP-COM-ORD-014Delivery for the affected quantity stops, its invoice amount is credited and funding is refunded while other lines remain.test
services-commerce:modules/orders/tests/e2e/cancellations.e2e.spec.js#ran the adjustment at once (nothing stands between the fence and the money): the memo on the sale invoice line, the refund of what was paid
4/console/{tenantId}/orders/{orderId}Read the refreshed purchase.CAP-COM-ORD-010The financial mirror includes the cancellation credit.test
services-commerce:modules/orders/tests/e2e/cancellations.e2e.spec.js#shows the cancellation’s credit on the order’s money mirror at once, read right after the cancel

Alternate and Failure Paths

PathFrom stepConditionPath takenOutcomeProvenance
alternate2The evaluated refund exceeds the approval thresholdAn approver records approval and staff execute the authorized requestSettlement proceeds after approvaltest
services-commerce:modules/orders/tests/e2e/cancellations.e2e.spec.js#lets the approver approve it with a reason, and staff execute it; the intervention on the history
alternate2The carrier already has the goodsEvaluation directs the customer to a returnStaff use the return workflow for those goodstest
services-commerce:modules/orders/tests/e2e/cancellations.e2e.spec.js#answers must_return with shipment_handed_off once the shipping fence says the unit shipped
failure2The purchase has not reached acceptanceReject the cancellation requestThe placed purchase is left unchangedtest
services-commerce:modules/orders/tests/e2e/cancellations.e2e.spec.js#refuses a placed order 409 order_not_cancellable, another member 403 not_your_party, a reader 403 permission_missing, another tenant 404

Assertions

IdStatementProvenance
01Credit applies to the cancelled quantity at its discounted net amount and tax.test
services-commerce:modules/orders/tests/e2e/order-discount-tax.e2e.spec.js#credits the Book’s net on its invoice line and its tax on the tax line, then refunds the whole $44.74 (COMM-M1 R7-1)
02The purchase remains accepted while it has an open line.test
services-commerce:modules/orders/tests/e2e/cancellations.e2e.spec.js#cancels the line’s waiting fulfil obligation itself, grows quantity_cancelled and closes the line; the mug untouched, the order still accepted

End-to-end policy: optional: The API proves the cancellation outcome; sample-data console dialogs do not establish a complete live staff cancellation journey.

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.