docs(cart): define the continue_url destination and format - #801
docs(cart): define the continue_url destination and format#801YanisMtcr wants to merge 2 commits into
Conversation
The cart page asks businesses to provide continue_url but leaves its destination as a TODO from Universal-Commerce-Protocol#73. The permalink spec already lets the business resolve into a cart or a checkout; this adds a Continue URL section that keeps that choice open, requires the cart contents to survive the handoff, and points at the checkout page for the format.
|
Good addition to the cart capability. I'm wondering about the Platform behavior. At which exact moment Platform is supposed to display this Would be great to hear your thoughts. Also, please let me know if I missing something. 🤔 |
|
Not missing anything: the page does not say when the platform surfaces The cart has no status lifecycle (Cart vs Checkout table, Actions section), so the trigger is buyer intent or a platform-side dead end, not a status:
|
|
Hmm... so the only time this |
|
Added a "When to surface the continue URL" list with the three situations. I kept the no-checkout case separate from errors: nothing fails there, the business exposes cart without checkout, which nothing in the capability model prevents, and the link is then the buyer's only path to purchase. It also covers the case where the buyer builds the cart on the platform and completes the purchase on the business's site. |
Motivation
The cart page says businesses SHOULD provide
continue_url, and the schema describes it as "URL for cart handoff and session recovery", but nothing says where the URL should lead or what it has to preserve. The requirements list still carriesTODO: discuss continue_url destination - cart vs checkoutfrom #73, where two readings met: for some implementers the URL is the checkout URL, for others the business decides the intended use (convert to checkout, or keep building the cart).The checkout page answers the same questions for checkout in its Continue URL section (availability, format, server-side state or permalink); the cart page has no equivalent. And the permalink specification already lets a business merge items into an existing cart, create a new cart, or stage a checkout, so the destination question has an answer elsewhere in the spec: the business chooses.
This came up while implementing the cart capability: a cart session is served by the business's UCP endpoint, which does not always share state with the storefront, and a
continue_urlpointing at the storefront's own cart page lands the buyer on an empty basket.What this PR changes
shopping/cart/index.md- adds a## Continue URLsection after Cart-to-Checkout Conversion. Destination: the business chooses (cart page, checkout entry, embedded flow); whatever it picks MUST present the cart's currentline_items, quantities and selected variants included, without the buyer re-adding them; items no longer available follow the permalink redirect resolution rules. Format: absolute HTTPS URL that MUST carry or reference the cart contents, using either approach the checkout page already describes by reference (server-side cart state or a stateless permalink), rather than restating them.Normative addition, scoped to the field: two MUSTs on
continue_url(absolute HTTPS, contents preserved). Both mirror what the checkout page already requires for its owncontinue_url. No schema change.Overlaps with nothing open: #740 (cart terminal status) edits the same requirements list but leaves this bullet as is, and #486 (return after handoff) is checkout-side.
Category (Required)
ucp-schematool (resolver, linter, validator). (Requires Maintainer approval)Related Issues
None.
Checklist
!for breaking changes).