Skip to content
Closed
Show file tree
Hide file tree
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
21 changes: 21 additions & 0 deletions .changeset/4086-proposal-finalize-context-chain.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
---
"adcontextprotocol": patch
---

Fix proposal_id context chaining in proposal_finalize and sales-proposal-mode storyboards.

The `media_buy_seller/proposal_finalize` and `sales-proposal-mode` storyboards were sending
the static placeholder `"balanced_reach_q2"` as `proposal_id` in `refine_proposal`,
`finalize_proposal`, and `accept_proposal` steps instead of threading the seller-minted
value from `brief_with_proposals`. Proposal-mode sellers with runtime-generated IDs
(UUIDs, DB rowids) received 404s or wire-shape failures on those steps.

Changes:
- Add `context_outputs` on `brief_with_proposals/get_products_brief` capturing
`proposals[0].proposal_id` into the context accumulator.
- Replace `"balanced_reach_q2"` with `"$context.proposal_id"` in `refine_proposal`,
`finalize_proposal`, and `accept_proposal` steps of both storyboards.
- Add `check: field_present` validation for `proposal_id` echo on `create_media_buy`
response in `proposal_finalize`.
- Add optional `proposal_id` field to `CreateMediaBuySuccess` schema to document the
echo contract and support the storyboard validation.
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,9 @@ phases:
- check: field_present
path: "proposals[0].proposal_id"
description: "Proposals have IDs"
context_outputs:
- name: proposal_id
path: "proposals[0].proposal_id"

- id: refine_proposal
title: "Refine the proposal"
Expand Down Expand Up @@ -141,7 +144,7 @@ phases:
buying_mode: "refine"
refine:
- scope: "proposal"
proposal_id: "balanced_reach_q2"
proposal_id: "$context.proposal_id"
ask: "Shift 60% of budget to CTV. Drop the display product and redistribute that budget to video."
- scope: "request"
ask: "All products must support frequency capping at 3 per day."
Expand Down Expand Up @@ -188,7 +191,7 @@ phases:
buying_mode: "refine"
refine:
- scope: "proposal"
proposal_id: "balanced_reach_q2"
proposal_id: "$context.proposal_id"
action: "finalize"
account:
brand:
Expand Down Expand Up @@ -234,7 +237,7 @@ phases:
domain: "acmeoutdoor.example"
operator: "pinnacle-agency.example"
sandbox: true
proposal_id: "balanced_reach_q2"
proposal_id: "$context.proposal_id"
total_budget:
amount: 50000
currency: "USD"
Expand All @@ -245,3 +248,6 @@ phases:
validations:
- check: response_schema
description: "Response matches create-media-buy-response.json schema"
- check: field_present
path: "proposal_id"
description: "Response echoes back the proposal_id that was accepted"
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,10 @@ phases:
- check: field_present
path: "products[0].format_ids[0].id"
description: "Format IDs include id — must be accepted back in sync_creatives"
context_outputs:
- name: proposal_id
path: "proposals[0].proposal_id"

- id: review_refine
title: "Refine a proposal"
narrative: |
Expand Down Expand Up @@ -259,7 +263,7 @@ phases:
buying_mode: "refine"
refine:
- scope: "proposal"
proposal_id: "balanced_reach_q2"
proposal_id: "$context.proposal_id"
ask: "Shift 60% of budget to CTV. Drop the display product and redistribute that budget to video."
- scope: "request"
ask: "All products must support frequency capping at 3 per day."
Expand Down Expand Up @@ -334,7 +338,7 @@ phases:
brand:
domain: "acmeoutdoor.example"
operator: "pinnacle-agency.example"
proposal_id: "balanced_reach_q2"
proposal_id: "$context.proposal_id"
total_budget:
amount: 50000
currency: "USD"
Expand Down
5 changes: 3 additions & 2 deletions static/schemas/source/index.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"title": "AdCP Schema Registry",
"version": "1.0.0",
"description": "Registry of all AdCP JSON schemas for validation and discovery",
"adcp_version": "3.0.5",
"adcp_version": "3.0.3",
"versioning": {
"note": "AdCP uses path-based versioning. The schema URL path (/schemas/) indicates the version. Individual request/response schemas do NOT include adcp_version fields. Compatibility follows semantic versioning rules."
},
Expand Down Expand Up @@ -1674,5 +1674,6 @@
"description": "Java validation example",
"code": "// Use everit-org/json-schema or similar library"
}
]
],
"published_version": "3.0.3"
}
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,11 @@
"context": {
"$ref": "/schemas/core/context.json"
},
"proposal_id": {
"type": "string",
"description": "ID of the proposal from which this media buy was created. Echoed from the create_media_buy request to confirm which proposal was accepted. Present only when the media buy was created from a proposal.",
"x-entity": "proposal"
},
"ext": {
"$ref": "/schemas/core/ext.json"
}
Expand Down
Loading