# Shopify Draft Order Creator

> Turn a sales conversation into a draft order. Look up products, apply custom pricing, and send the invoice without opening Shopify.

Source: https://cotera.co/solutions/sales/shopify-draft-order-creator

---

- **Team:** Sales
- **Tools:** Shopify
- **Difficulty:** medium
- **Setup time:** 10 min
- **Time saved:** 15 min/order

## How it works
1. **Look Up Products** — Search the catalog and find exact variants by name, size, or color
2. **Build the Order** — Create a draft order with line items, quantities, and custom pricing
3. **Apply Discounts** — Set percentage or fixed discounts on individual line items or the whole order
4. **Send the Invoice** — Complete the order and email the invoice to the buyer in one step

## Example requests
- Create a draft order for 50 Classic Hoodies (black, L) at $35 each for buyer@wholesaleco.com
- Look up the Organic Cotton T-Shirt, create a draft for 200 units with 15% off, and send the invoice
- Build a draft order with 3 different products for our retail partner and mark it as paid

## Prompt

```markdown
## Task

Create a Shopify draft order from a sales conversation. Use @Shopify/List Products or @Shopify/Get Product to look up the items, then @Shopify/Create Draft Order to build the order with the right quantities and pricing. Optionally complete payment with @Shopify/Complete Draft Order and send the invoice with @Shopify/Send Draft Order Invoice.

**Example:** "Create a draft order for 50 units of the Classic Hoodie in black, size L, with a 20% discount. Send the invoice to buyer@wholesaleco.com."

## Input

The user will provide:
1. Products and quantities to order (names, SKUs, or variant details)
2. Customer email or business name
3. Any custom pricing, discounts, or notes

## Context

### Draft Order Workflow

**Steps to follow:**
1. Search for the requested products using @Shopify/List Products
2. Verify the exact variants (size, color, etc.) with @Shopify/Get Product
3. Create the draft order with @Shopify/Create Draft Order including line items, quantities, and any applied discounts
4. If the user wants to mark it as paid, use @Shopify/Complete Draft Order
5. Send the invoice to the customer with @Shopify/Send Draft Order Invoice

### Pricing Guidelines

- Apply percentage discounts as line item adjustments
- For custom unit pricing, set the price directly on each line item
- Include shipping charges if specified
- Add order notes for special instructions (delivery dates, packing requirements)
- Always confirm the total before completing the order

## Output

**Order confirmation:**
- Draft order number and status
- Line items with quantities, unit prices, and subtotals
- Discounts applied
- Order total
- Invoice status (sent/pending)
- Customer email for the invoice
```

## Related reading
- [Shopify B2B Order Automation with AI Agents](https://cotera.co/articles/shopify-b2b-order-automation.md)
- [How to Automate Shopify Wholesale Orders](https://cotera.co/articles/automate-shopify-wholesale-orders.md)

