Creating orders

Most orders in Distribu come in via your storefront — a customer logs in, adds products to their cart, and checks out. This page is about the other path: a staff member creating an order by hand from the dashboard.

Use it when a customer calls in a phone order, when you're recording a sample or internal consumption, or when you just need an order in the system that didn't go through self-service.

For the customer-side flow, see Storefront → Placing orders.

Open the New order form

From Orders, click + New order in the top-right. You land at /dashboard/orders/new.

If your catalog is empty or every product has stock = 0, the form shows a "No products in stock" placeholder with a link to Inventory — so fix that first if you see it.

The layout

Two panels, side by side:

  • Left (product browser) — a searchable list of every active, in-stock product. Search matches against name, SKU, and category, case-insensitively.
  • Right (order summary) — the cart, notes field, and Place order button.

Click + Add on a product to drop it in the cart. Use the / + buttons to adjust quantity, or remove it by clicking until it hits zero. The quantity cap is the product's current stock — the + button disables once you hit it.

Low-stock products (1–5 units remaining) show the number in yellow. Out-of-stock products are faded out and can't be added.

Notes

Add free-form notes in the textarea below the cart — up to 2,000 characters. Shown on the order detail page and on the generated invoice PDF.

Place order

Hit Place order. Distribu:

  1. Validates every line item has a positive quantity (≥ 1).
  2. Re-fetches each product to snapshot its current price. Uses that as the unitPrice on the saved line item.
  3. Validates each product is active and belongs to your company.
  4. Computes the total as the sum of price × quantity.
  5. Creates the order and its line items in a single transaction.
  6. Writes an audit-log entry with action OrderPlaced, the actor, and the total.
  7. Redirects you to the order detail page.

The order's status starts at SUBMITTED and you can move it through the workflow from the detail page. See Status workflow for the rules.

Dashboard orders DON'T decrement stock

This is the biggest practical difference between the dashboard and storefront flows. Dashboard orders do not subtract quantities from product stock, and they don't validate that stock is available at the server either. The cart UI will cap you at the current stock count as a convenience, but the server will accept any positive quantity.

If you're recording a real sale that should reduce inventory, bump the stock down manually in Inventory (see Stock tracking → Adjusting stock).

We kept this behavior because most dashboard-entered orders are either:

  • After-the-fact records of something already shipped — stock was already adjusted by whoever fulfilled it.
  • Internal consumption or samples, which a lot of distributors don't count against sellable stock.

If you want dashboard orders to decrement stock automatically, email us — it's a 1-line change we can toggle per-company.

What dashboard orders don't have

Compared to storefront orders, dashboard orders lack:

  • A customercustomerId is null. The "Placed by" column on the orders list shows the staff member instead. There's no customer dropdown in the form.
  • Per-customer price overrides — since there's no customer, every line item uses the catalog price.
  • A shipping address — the form has no address picker. If you need one, create the order via the REST API or the storefront instead.
  • Order receipt emails — dashboard orders don't send emails to anyone. Storefront orders send a receipt to the customer and an alert to OWNER + ADMIN staff.
  • Low-stock alerts — since stock isn't decremented, no alert can trigger.
  • Monthly order limit enforcement — dashboard orders don't count against your plan's monthly order cap (the cap is enforced on customer-placed orders at the storefront).

Creating orders via the REST API

The API creates orders with full customer/shipping/stock semantics. See REST API — Orders endpoints for the full payload.

Editing a dashboard order

There isn't a way to edit an order's line items or total after it's created. The only field that can change is status (via the buttons on the detail page) and notes is read-only. If you need to correct a line item, cancel the order and create a new one.


Next: Status workflow.