Problem
The discount extension lets platforms submit codes and receive applied/rejected results. But there's no way to ask "what discounts are available right now?" before the buyer types in a code.
An agent can't tell the buyer "there's a 15% off sale running" unless the agent already knows the code. The business knows about its active promotions, but the protocol has no channel for surfacing them.
What's missing
- A query operation to list active, applicable discounts for a given cart/checkout context
- Distinction between public promotions (anyone can see) and private codes (buyer must know)
- Automatic discount surfacing -- if the business has a "free shipping over $50" rule, the agent should know about it when the cart total crosses $50
Suggestion
Add an optional available_discounts array to cart and checkout responses:
{
"available_discounts": [
{
"id": "disc_summer",
"title": "Summer sale -- 15% off",
"type": "automatic",
"conditions": "Applied automatically to orders over $25",
"applied": true
},
{
"id": "disc_freeship",
"title": "Free shipping",
"type": "automatic",
"conditions": "Orders over $50",
"applied": false,
"remaining_amount": 1200
}
]
}
type: automatic -- business applies it when conditions are met, no code needed
type: code -- buyer needs to submit a code (the code itself is NOT exposed, just the existence of the promotion)
remaining_amount -- how much more the buyer needs to spend to qualify (useful for "add $12 more for free shipping" prompts)
This is business-optional. Merchants that don't want to expose promotions just omit the field.
Problem
The discount extension lets platforms submit codes and receive applied/rejected results. But there's no way to ask "what discounts are available right now?" before the buyer types in a code.
An agent can't tell the buyer "there's a 15% off sale running" unless the agent already knows the code. The business knows about its active promotions, but the protocol has no channel for surfacing them.
What's missing
Suggestion
Add an optional
available_discountsarray to cart and checkout responses:{ "available_discounts": [ { "id": "disc_summer", "title": "Summer sale -- 15% off", "type": "automatic", "conditions": "Applied automatically to orders over $25", "applied": true }, { "id": "disc_freeship", "title": "Free shipping", "type": "automatic", "conditions": "Orders over $50", "applied": false, "remaining_amount": 1200 } ] }type: automatic-- business applies it when conditions are met, no code neededtype: code-- buyer needs to submit a code (the code itself is NOT exposed, just the existence of the promotion)remaining_amount-- how much more the buyer needs to spend to qualify (useful for "add $12 more for free shipping" prompts)This is business-optional. Merchants that don't want to expose promotions just omit the field.