Shopify: Create Draft Order
Create a draft order in your Shopify store for later completion. Supports line items, customer info, shipping address, discounts, and notes. Ideal for: quotes, pending orders, manual review workflows, B2B invoicing. Required scope: `write_draft_orders` or `write_quick_sale`.
Catalog action Integrations shopify
Create a draft order in your Shopify store for later completion. Supports line items, customer info, shipping address, discounts, and notes. Ideal for: quotes, pending orders, manual review workflows, B2B invoicing. Required scope: write_draft_orders or write_quick_sale.
At a Glance
| Field | Value |
|---|---|
| Action ID | shopify-create-draft-order |
| Category | Integrations |
| Connector | shopify |
| Requires gas | No |
| Funds movement | None declared |
| Tags | shopify, ecommerce, orders, write |
Payload Schema
| Field | Type | Required | Description |
|---|---|---|---|
lineItems | array | Yes | Array of line items for the draft order |
email | string | No | Customer email address |
customerId | string | No | Existing customer GID (e.g., gid://shopify/Customer/123) |
shippingAddress | object | No | Shipping address for the draft order |
appliedDiscount | object | No | Discount to apply to the draft order |
note | string | No | Optional note for the draft order |
tags | array | No | Tags to add to the draft order |
Result Schema
| Field | Type | Required | Description |
|---|---|---|---|
success | boolean | Yes | Whether the draft order was created successfully |
data | object | No | Created draft order data |
exports | object | No | Exported values from the action |
Examples
json{ "type": "shopify-create-draft-order", "payload": { "lineItems": [] }, "children": [], "connector": { "type": "shopify", "id": "conn_shopify" }}
bashcurl -X POST "https://api.b3os.org/v1/actions/shopify-create-draft-order/test" \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "inputs": { "lineItems": [] }}'
Payload fields can use workflow expressions such as {{$trigger.body.amount}}, {{$nodes.fetch.result.price}}, and {{$props.asset}} when the value should come from a trigger, prior node, or reusable workflow prop.
