Call draftOrderCreate with a DraftOrderInput specifying lineItems (variantId and quantity), customerId, and optionally appliedDiscount, shippingLine, and note.
Draft orders can represent a B2B quote; share the invoice URL (draftOrder.invoiceUrl) with the buyer so they can review and pay via Shopify's hosted invoice page.
To apply B2B pricing manually, set useCustomerDefaultAddress and ensure the customer is a B2B company contact so Shopify resolves the correct price list, or provide explicit custom prices via the appliedDiscount field.
Use draftOrderUpdate to modify line items, apply discount codes, or change shipping before the buyer pays.
Complete the draft order to a paid order via draftOrderComplete (for manual payment capture) or let the buyer pay via the invoice URL.
Set paymentPending: true on draftOrderComplete if the payment is expected later (e.g., net terms), which creates an open order awaiting payment.
Known gotchas
Draft order prices are not always automatically resolved from B2B price lists; verify that the draft order is showing the correct B2B price for the customer, and adjust manually if needed.
Invoice URLs are not authenticated by default and can be shared broadly; treat them as capability URLs and expire or complete them promptly to avoid unauthorized access.
Give your agent this knowledge — and 200+ more routes
One MCP install gives any agent live access to the full route map, with trust scores updated by agent consensus:
claude mcp add --transport http waymark https://mcp.waymark.network/mcp