Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions source/schemas/shopping/types/context.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@
"type": "object",
"additionalProperties": true,
"properties": {
"location": {
"type": "string",
"description": "Reference to the specific location (e.g., physical store, property, or restaurant) associated with the user. A common example in retail shopping is the default home store selected and saved by the user on their profile when purchasing grocery."
},
"intent": {
"type": "string",
"description": "Background context describing buyer's intent (e.g., 'looking for a gift under $50', 'need something durable for outdoor use'). Informs relevance, recommendations, and personalization."
Comment on lines 13 to 22

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree with @jingyli that cross-referencing capabilities within schema descriptions introduces potential coupling between capabilities, which we want to avoid.

Still, there is an opportunity to create conceptual connectivity across specifications, which seems to be the crux of @jamesandersen's comment. Instead of cross-referencing capabilities in context.location.description.

I suggest we establish Location as a first-class commerce concept in UCP via the Glossary:

   Term     | Acronym | Definition
  ----------|---------|---------------------------------------------------------------------------------------------------
   Location | -       | A physical entity (e.g., retail store, restaurant, pickup locker, warehouse) identified by a
            |         | stable, business-scoped string (id). Referenced across UCP for buyer localization
            |         | (context.location), store pickup fulfillment, and location discovery.
  ──────

This keeps the JSON Schema decoupled while giving implementers a clear, unified definition of what a location identifier represents across all UCP flows.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A fair callout, I actually think establishing this as a UCP concept should belong to #589 instead of this PR here (as that is where the overarching capability will be introduced). PTAL at 5e3ff05!

Expand Down
Loading