ai.commercestudio.b2b.reorder
Draft, version 2026-10-19. Extends dev.ucp.shopping.order (UCP 2026-08-25). Schema: https://b2b.commercestudio.ai/ucp/schemas/reorder.json.
Reordering is the most common thing a B2B buyer asks an agent to do: "the same as last month", "our usual list". This extension adds a b2b_reorder field to Get Order. It gives every line of the order at today's contract price and stock, plus line items ready to send to Create Cart.
b2b_reorder (on an order)
| Field | Meaning |
|---|---|
reorderable |
At least one line can be bought now |
lines[] |
item_id, title, quantity (as ordered), paid_price, current_price (today's contract price for this buyer), list_price, quantity_available, and status: available, short (fewer in stock than ordered) or unavailable (sold out or no longer sold) |
cart_line_items[] |
{ item: { id }, quantity } for the available and short lines, ready for Create Cart |
price_changes |
How many lines cost something different today from what was paid |
- Prices. The cart prices each line at today's contract price.
paid_priceis for comparison only. - Short lines. They go into
cart_line_itemsat the quantity ordered, so Create Cart trims them with its usualquantity_adjustedwarning. That warning is the agent's cue to offer a same-product substitute. - Unavailable lines are left out of
cart_line_items, for the buyer to decide on.
Around it (Commerce Studio operations, not UCP)
UCP has Get Order by id but no list operations, so Callisto adds two read-only operations:
list_recent_orders(MCP), also atGET /api/b2b/orders/recent: the company's recent orders with theirorder_id, for Get Order.list_saved_lists(MCP), also atGET /api/b2b/lists: saved shopping lists, each with the sameb2b_reordershape.
Order capability notes (Callisto)
- Who can read an order. Buyer authorization reaches the buyer's orders. For a company user, Callisto reads that as the company's orders, which includes an order the requester asked for and an approver placed.
checkout_id. It's the Callisto checkout the order came from. Orders placed elsewhere (the storefront, the control panel) report"external".- Order webhooks. Callisto sends the full order entity to the
webhook_urlin the creating platform's order capability config: on "order created", and again whenever the order changes (shipped, refunded, cancelled), as UCP requires.- Each is signed per UCP Message Signatures: RFC 9421, ES256 over
@method @authority @path [@query] ucp-agent idempotency-key content-digest content-type, with the key published in/.well-known/ucpkeys[]. - An update is sent only when the order entity actually changed, one at a time per order.
- Failed deliveries are retried with backoff: after 1, 5, 15, 60, 180, 720 and 1440 minutes.
- Each is signed per UCP Message Signatures: RFC 9421, ES256 over
- What the order shows.
fulfillment.expectations: where it ships.fulfillment.events: oneshippedevent per shipment, with carrier, tracking number and tracking link.adjustments: refunds and cancellation.- Each line's
quantity.fulfilledandstatus.
BigCommerce B2B Edition
- Orders. An order is readable only when it's in the company's B2B Edition order list (
GET /api/v3/io/orders?companyId=).- Detail comes from
GET /v2/orders/{id}and/products(variant names,quantity_shipped,quantity_refunded). - The ship-to comes from
/shipping_addresses, shipments from/shipments, and refunds from/v3/orders/{id}/payment_actions/refunds.
- Detail comes from
- Order updates. BigCommerce's order and shipment webhooks (registered by
npm run setup:bigcommerce -- --apply) tell Callisto an order changed. Verified on order #114 (2026-10-27): two shipments, each delivered to the agent's platform as one signed update with UPS tracking. - Saved lists. These are B2B Edition shopping lists in status 0. The list endpoint needs the B2B Edition user id. Read the detail endpoint without one, because with it, lists owned by another company user are refused. Callisto's own approval lists are excluded.