# Sales and Purchase Orders

Two lists, one ledger. A sales order takes stock out; a purchase order brings it in. Both are numbered (`SO-1001`, `PO-1001`), both link to the ledger rows they caused, and both carry where they came from — a person, an agent conversation or a connected store.

## What you'll need

- **View Sales & Purchase Orders** (`inventory:orders:read`) to read; **Manage Sales & Purchase Orders** (`inventory:orders:manage`) to create, confirm, fulfil and cancel; **Adjust Stock, Transfers & Counts** (`inventory:stock:adjust`) to receive a purchase order. The seeded **Member** role has all three.

## Sales orders

**Inventory → Orders → Sales orders** (`/inventory/orders`). One list for every channel; the **Channel** column says *Manual*, *AI agent*, *Shopify*, *WooCommerce* or *API*, and an order from a store carries **Open in store ↗**.

### What an order does to stock

Decided by two settings in **Inventory → Setup → Inventory Settings → Orders & stock**:

| Setting | Effect |
|---|---|
| **Reserve stock when an order is created** (on) | The order's units move from *available* to *reserved* at creation, so a second order or an agent sees them as spoken for |
| **Stock leaves the count when the order is** *fulfilled* / *paid* / *created* | The reservation becomes a deduction at that moment |

Cancelling an order releases its reservation, or puts the units back if they were already deducted. An order a connected store sent follows the store's **Who owns the count** setting instead: when the store owns the count the order is recorded without touching stock (the store already deducted and its level is pulled here); when Karmaflow.ai owns it the order deducts here like any other, even past zero, because the store has already sold the units.

### Create an order

1. Click **New sales order**.
2. Add **Lines**: type a **SKU or barcode**, the quantity and the price (the variant's price is pre-filled). A line for a tracked variant with fewer available units than asked is refused with the figure.
3. Fill in **Customer name**, **Email**, **Phone**, and optionally **Discount**, **Shipping**, **Tax** and **Notes**.
4. Click **Create order**.

The customer is matched to a CRM contact by email or phone, or created, so the order shows on the contact's record; the Customer section of the order links there.

### Move it along

Open an order and use the footer buttons: **Mark paid**, **Fulfil**, **Cancel**. The status chip and the stock effect update together, and the ledger rows name the order.

Orders placed by an agent (a chat agent taking "two of the blue ones") arrive here with the conversation linked under the number, so a person can check what was said before fulfilling.

Workflow triggers **Sales order created**, **Sales order fulfilled** and **Sales order cancelled** fire with the number, channel, total and item count. An order that arrives from a connected store also raises the notification **A new order arrived from a connected store** for everyone with **View Sales & Purchase Orders**, in the bell (email off by default — change it under **Notification Preferences**).

## Purchase orders

**Inventory → Orders → Purchase orders** (`/inventory/purchase-orders`). What is on order from suppliers; the units count as *incoming* on the levels until received.

### Create one

Either tick lines on **Stock → Reorder plan** and click **Draft N into purchase orders** (one per supplier), or:

1. Click **New purchase order**.
2. Enter the **Supplier**, the location to **Receive into** and the **Expected** date.
3. Add **Lines**: **SKU or barcode**, quantity and **unit cost**.
4. Add **Notes** and click **Create**. It is a *draft*.

### Order and receive

1. Open the purchase order and click **Mark ordered**. Its lines now count as **incoming** on every level and in the reorder plan, so the plan does not ask you to order them again.
2. When goods arrive, type what came in the **Receive now** column of each line and click **Receive**. Each line writes a *receive* movement at the purchase order's location; the status becomes **Partly received** or **Received** from the line totals. Receive as many times as deliveries arrive.
3. **Cancel** drops the incoming figure. A purchase order already fully received cannot be cancelled.

Receiving fires the trigger **Purchase order received**, and the levels it filled may fire **Stock is back above zero** — a workflow can tell the people who asked.

## Troubleshooting

- **"Not enough stock at …" when creating an order.** The variant's available count at that location is lower than the line. Receive stock, transfer it from another location, or turn on **Allow stock to go below zero** if you knowingly oversell.
- **An order from the store did not change stock.** That connection's **Who owns the count** is *The store*. Expected: the store deducted, and its level is pulled here on the next webhook or sync.
- **The reorder plan still lists something I ordered.** The purchase order is still a draft. **Mark ordered** makes it incoming.
- **Fulfil is greyed.** The order is cancelled or already fulfilled, or you lack **Manage Sales & Purchase Orders**.

## Next steps

- [Products, Stock and the Reorder Plan](/help/inventory/products-and-stock)
- [Connecting Shopify or WooCommerce](/help/inventory/shopify-woocommerce) — where store orders come from
