Skip to content

feat: add optional note field to line items#607

Open
hemanth wants to merge 1 commit into
Universal-Commerce-Protocol:mainfrom
hemanth:feat/line-item-note
Open

feat: add optional note field to line items#607
hemanth wants to merge 1 commit into
Universal-Commerce-Protocol:mainfrom
hemanth:feat/line-item-note

Conversation

@hemanth

@hemanth hemanth commented Jul 17, 2026

Copy link
Copy Markdown

Closes #349

Summary

Adds an optional note string field (max 500 chars) to the line item schema, allowing buyers to attach free-text per-item instructions.

Use cases

  • Food ordering: "no onions", "extra sauce"
  • Gift wrapping / engraving instructions
  • Voice agent scenarios: "make that a gift", "hold the pickles"

Changes

  • source/schemas/shopping/types/line_item.json: Added note property with maxLength: 500 and appropriate ucp_request annotations

Design decisions

  • Plain text only — structured customization belongs in catalog item variants
  • 500-char limit prevents abuse while covering reasonable instructions
  • Business echoes the note in responses (confirming receipt)
  • Business MAY forward to downstream fulfillment via order webhooks

@damaz91 damaz91 added the status:needs-triage Signal that the PR is ready for human triage label Jul 17, 2026
@jamesandersen

Copy link
Copy Markdown
Contributor

Hi @hemanth - thanks for the PR. JFYI - there are two other related PRs at play:

@damaz91

damaz91 commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

Hello @hemanth ! I see this PR holds changes to files that are probably unrelated to this specific PR. Can you please revert them? Thanks

@damaz91 damaz91 added status:stale Applied when PR is waiting for author response for 30 days schema PR changing the UCP schema status:blocked and removed status:needs-triage Signal that the PR is ready for human triage status:stale Applied when PR is waiting for author response for 30 days labels Jul 20, 2026
Add note (string, maxLength 500) to line_item.json for buyer-supplied
per-item instructions (e.g. gift wrapping, dietary preferences,
engraving text).

- ucp_request: optional on create and update
- Business echoes value in responses, MAY forward to fulfillment

Closes Universal-Commerce-Protocol#349
@hemanth
hemanth force-pushed the feat/line-item-note branch from c60a798 to ca39d2d Compare July 21, 2026 04:49
@hemanth

hemanth commented Jul 21, 2026

Copy link
Copy Markdown
Author

Ah! Okies @damaz91

/me originally had these changes in one branch and split them into separate PRs, which has brought it side-effects.

I have force-pushed the branch so it only touches line_item.json now. The fulfillment event and discount changes are tracked in their own PRs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Line items have no field for buyer notes

3 participants