feat: add per-seller offer attribution to catalog variants - #811
Open
proshoumma wants to merge 1 commit into
Open
feat: add per-seller offer attribution to catalog variants#811proshoumma wants to merge 1 commit into
proshoumma wants to merge 1 commit into
Conversation
Add an optional `offers[]` array to the catalog variant so one catalog can list a product sold by several merchants, each routed to its own checkout. - offer.json: new type — seller.domain (the MoR), item_id, price (plus optional list_price, unit_price, availability, url, sku). - variant.json: optional offers[]; variant.id is the checkout id only when offers is absent; seller clarified as display-only. - catalog/index.md: offers-aware checkout rule, an Offer section, and a two-merchant example. - glossary.md / core-concepts.md: a Business is typically, not always, the MoR. Additive and fail-safe: responses without offers[] are unchanged, and an offer-unaware checkout at a non-MoR business errors rather than mis-charging.
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.
Adds an optional
offers[]array to the catalogvariant, so one catalog can list a product sold by several different merchants and send each to the right seller's checkout.Description
Today the business serving a catalog is assumed to be the only seller and Merchant of Record (MoR):
variant.idis the checkout item ID andvariant.priceis the price checkout honors. That doesn't fit a marketplace or shopping agent that lists the same product from many merchants, each with its own checkout.offers[]fixes that. A variant withoutoffers[]is unchanged.Each offer names the seller (
seller.domain, the MoR), that seller's own checkout item ID (item_id), and the price. This affects the catalog capabilitiesdev.ucp.shopping.catalog.searchanddev.ucp.shopping.catalog.lookup, which share thevarianttype.New type
source/schemas/shopping/types/offer.json— required:seller(withseller.domain),item_id,price. Optional:list_price,unit_price,availability,url,sku,seller.name,seller.links.{ "id": "gid://shop/variant/123", "title": "Wireless Headphones", "price": { "amount": "19.99", "currency": "USD" }, "offers": [ { "seller": { "domain": "shop-a.example" }, "item_id": "A-item-1", "price": { "amount": "19.99", "currency": "USD" } }, { "seller": { "domain": "shop-b.example" }, "item_id": "B-item-9", "price": { "amount": "21.50", "currency": "USD" } } ] }When
offersis present (Business response → Platform), the Platform:offers[].item_id— MUST NOT usevariant.idoffers[].priceas the real price —variant.priceis display-onlyoffers[].seller.domainand checks out at that seller, after verifying it via authority bindingAlso aligns the Business / MoR wording in
glossary.mdandcore-concepts.mdso a business need not be the MoR for everything it lists.Category (Required)
ucp-schematool (resolver, linter, validator). (Requires Maintainer approval)Related Issues
seller.domainChecklist
!for breaking changes).Screenshots / Logs (if applicable)
Not applicable.