feat(schema): add buyer_notes field to line items#402
Open
hemanth wants to merge 1 commit intoUniversal-Commerce-Protocol:mainfrom
Open
feat(schema): add buyer_notes field to line items#402hemanth wants to merge 1 commit intoUniversal-Commerce-Protocol:mainfrom
hemanth wants to merge 1 commit intoUniversal-Commerce-Protocol:mainfrom
Conversation
Adds an optional buyer_notes string field (max 500 chars) to both line_item and order_line_item schemas, enabling per-item buyer instructions such as customization requests, dietary notes, and gift messages. - line_item.json: buyer_notes is optional on create and update - order_line_item.json: buyer_notes preserved from checkout (read-only) Closes Universal-Commerce-Protocol#349
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.
Summary
Adds an optional
buyer_notesstring field to bothline_itemandorder_line_itemschemas, enabling per-item buyer instructions.Closes #349
Motivation
Line items currently have no field for buyer-specific instructions. This is a gap for common commerce scenarios:
Voice and chat agents especially need this — they naturally collect customization preferences during conversation, but have no structured field to pass them through.
Changes
source/schemas/shopping/types/line_item.jsonbuyer_notes(string, maxLength 500)ucp_request: optional oncreateandupdatesource/schemas/shopping/types/order_line_item.jsonbuyer_notes(string, maxLength 500, read-only)Design decisions
stringvs structured objectmaxLength: 500line_item(notcheckout)order_line_itemExample
{ "line_items": [ { "item": { "id": "variant_latte_lg", "title": "Large Oat Latte" }, "quantity": 1, "buyer_notes": "Extra hot, oat milk, no foam" }, { "item": { "id": "variant_croissant", "title": "Butter Croissant" }, "quantity": 2, "buyer_notes": "Warm please" } ] }Backward compatibility
Fully backward-compatible. The field is optional on all operations. Existing implementations that do not send or handle
buyer_notesare unaffected.