Proposal: order actions for the shopper (cancel, return, report a problem) - #22
Draft
vishkaty wants to merge 1 commit into
Draft
Proposal: order actions for the shopper (cancel, return, report a problem)#22vishkaty wants to merge 1 commit into
vishkaty wants to merge 1 commit into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Proposal: order actions for the shopper
The gap
The most common post-purchase asks have no tool: the assistant can quote the returns
policy but cannot start a cancellation or a return. The tool surface is fixed by the
registry and
PresentationExtensioncovers cards only, so a deployment cannot add anaction tool without forking the executor.
What this adds
StorefrontBackendmethods:request_order_action(session, order_id, action, item_ids, reason) -> OrderActionRequestandget_order_requests(session).A request is a durable record with a status; nothing is written to the platform.
Rules the reference enforces: the customer's own orders only, cancel before shipping,
return after, items named must belong to the order.
writes: the order must have been read this session (its items are in provenance).
MerchantBackendmethod,resolve_order_request(session, request_id, decision, note), and open requests surfacing asbuyer_messageorder issues, so themerchant agent sees them; the platform write (a cancellation) happens on the
merchant's side after the operator's decision.
Reference implementation
Built over Medusa v2 with a SQLite request store, tests for every rule, and an
end-to-end path from the shopper's request to the portal's decision to the platform's
cancel.
Opened as a draft: this is a design note for discussion before code is written against the interface. A reference implementation exists and can follow as a pull request in the agreed shape.