> ## Documentation Index
> Fetch the complete documentation index at: https://docs.b3os.org/llms.txt
> Use this file to discover all available pages before exploring further.

# Shopify: Complete Draft Order

Complete a draft order, converting it to an actual order in your Shopify store. Optionally mark payment as pending or collected. Returns the created order details. Ideal for: checkout completion, quote-to-order conversion, manual order processing. Required scope: `write_draft_orders`.

![Shopify: Complete Draft Order logo](https://ai-icon.b3.fun/logo/shopify)
Catalog action Integrations shopify

Complete a draft order, converting it to an actual order in your Shopify store. Optionally mark payment as pending or collected. Returns the created order details. Ideal for: checkout completion, quote-to-order conversion, manual order processing. Required scope: `write_draft_orders`.


## At a Glance

| Field | Value |
| --- | --- |
| Action ID | `shopify-complete-draft-order` |
| Category | Integrations |
| Connector | `shopify` |
| Requires gas | No |
| Funds movement | None declared |
| Tags | `shopify`, `ecommerce`, `orders`, `write` |

## Payload Schema

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `draftOrderId` | `string` | Yes | Draft order GID to complete \(e.g., gid://shopify/DraftOrder/123\) |
| `paymentPending` | `boolean` | No | Whether payment is pending \(true\) or collected \(false\). Default: false |

## Result Schema

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `success` | `boolean` | Yes | Whether the draft order was completed successfully |
| `data` | `object` | No | Completed draft order data |
| `exports` | `object` | No | Exported values from the action |

## Examples

**Workflow node**

```json
{
  "type": "shopify-complete-draft-order",
  "payload": {
    "draftOrderId": "example-draftOrderId"
  },
  "children": [],
  "connector": {
    "type": "shopify",
    "id": "conn_shopify"
  }
}
```
  **Test with API**

```bash
curl -X POST "https://api.b3os.org/v1/actions/shopify-complete-draft-order/test" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "inputs": {
    "draftOrderId": "example-draftOrderId"
  }
}'
```

**Use expressions for dynamic values**

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.