Built on Y Build Go from prompt to a deployed app on your own domain — no server. Start free
BuildShipCompareThe LabAbout Start building →
ybuild / Scenarios

Order Management for Wholesale Distributors

Wholesale distribution moves serious volume on thin margins, and it runs on rules that no retail or e-commerce tool assumes: the same SKU sells at a different price to every account, orders come in by the case rather than the each, and you almost never ship the whole order on the first pass. U.S. merchant wholesalers did over eleven trillion dollars in sales in a single year, and every dollar of it flows through customer-specific pricing, credit terms, and partial shipments. This guide walks through the order management system a distributor actually needs, and how to stand it up as a running, hosted app on ybuild, served on your own domain.

The problem

What you’d build

Customer accounts with per-account price lists

A B2B customer record that carries an assigned price list or tier, payment terms, a credit limit, an open AR balance, ship-to addresses, and a sales rep. When you start an order for that account, the entry screen loads their price list automatically, so every line prices at their negotiated rate instead of list. It ships live and hosted on ybuild from the first build.

Order entry with case-pack units and backorders

An order screen where you enter lines in whichever unit you like, case or each, and the system converts to the base unit using the case pack, enforces minimum-order and case-only rules, checks available-to-promise, allocates what is on hand, and splits any shortfall into a backorder line so the rest of the order can ship today.

Pick, pack, ship, and invoice-on-ship

A fulfillment flow that turns a released order into a warehouse pick list, captures the quantity actually picked, confirms the shipment with a packing slip, deducts only what shipped from inventory, and generates the invoice for the shipped quantity with the customer's terms and a due date, all on your live ybuild app.

The data model

customers
business_name, price_list_id, price_tier, payment_terms, credit_limit, ar_balance, sales_rep_id, ship_to_addresses
products
sku, description, base_uom, case_pack, list_price, cost, qty_on_hand, qty_allocated, reorder_point
price_list_items
price_list_id, sku, unit_price, min_qty, break_qty, effective_date, expires_date
orders
customer_id, po_number, order_date, requested_ship_date, status, terms, order_lines(sku, qty_ordered, qty_shipped, qty_backordered, uom, unit_price)
shipments
order_id, ship_date, packing_slip_no, carrier, tracking_no, invoice_no, invoice_total, due_date

A day in the system

  1. Morning: a rep or a customer places an order. You pick the account, and the entry screen loads that account's price list, so every line prices at their negotiated rate rather than list price.
  2. You enter lines by the case, "3 cases of SKU 4247," and the system converts to eaches using the case pack, checks any minimum-order and case-only rules, and shows the extended price at their contract number.
  3. The order checks the customer's credit limit against their open AR balance. If it would push them over, the order lands on credit hold instead of releasing to the warehouse.
  4. On release, what is on hand allocates to the order; whatever is short splits automatically into a backorder line, so one out-of-stock item does not hold up everything else.
  5. The warehouse works a pick list grouped by bin location. The picker confirms quantities, which may be less than ordered, and any short pick flows back onto the backorder line.
  6. Ship confirm generates the packing slip, deducts only the shipped quantity from inventory, and creates the invoice for what actually went out, stamped with the customer's terms and a due date.
  7. Backordered lines stay open on the order. When the replenishment purchase order arrives, they surface on a fill-backorders queue and ship as a second shipment, invoiced separately.
  8. End of day, the AR aging and open-order reports show who is past terms, which orders sit on credit hold, and how much stock is committed against incoming replenishment.

Where AI trips up

✓ Build first
  • The pricing spine: customers assigned to price lists, and an order screen that resolves each line off that customer's list with case-pack quantities. Everything else is worthless if the price is wrong.
  • Order-to-ship with partial fulfillment: enter an order, allocate on-hand stock, split shortfalls to backorder, ship-confirm, and generate the invoice on the shipped quantity.
  • Credit control: a credit-limit and open-AR check that puts an order on hold instead of releasing it to the floor.
— Skip for now
  • A full general ledger and accounts payable. Export invoices to your accountant or QuickBooks instead of rebuilding accounting inside the app.
  • EDI feeds and a self-service customer portal. Start with your team entering orders, and add electronic ordering once the core flow is solid.
  • Route planning, freight rate-shopping, and warehouse automation. v1 confirms shipments and prints packing slips; leave TMS and WMS integrations for later.

FAQ

How do I give each customer their own pricing?

Assign every account to a price list or tier, and store customer-specific unit prices, with quantity breaks, in price_list_items. The order screen then resolves the price from the customer's list, the SKU, the quantity, and the date, so a contract account and a brand-new account can order the same SKU and each sees their own number. List price on the product is only the fallback when no list entry applies.

We sell by the case but stock by the each. How does that work?

Each product carries a base unit and a case pack, say 24. You order and price in whichever unit you choose, and the system converts to the base unit for inventory. Ordering 3 cases allocates 72 eaches, and minimum-order and case-only rules are enforced at entry so nobody orders half a case.

What happens when I cannot fill the whole order?

The line splits. The available quantity allocates and ships now, and the shortfall becomes a backorder line that stays open on the order. When your replenishment arrives it surfaces on a fill-backorders queue and ships as a second shipment, invoiced separately, so you never promise stock you do not physically have.

When does the customer actually get invoiced?

At ship confirm, for what actually shipped, not at order entry. The invoice picks up the customer's payment terms, such as Net 30, and a due date, and posts to their AR balance. Backordered goods are invoiced only when they ship, so a customer is never billed for something still sitting in your warehouse.

How do I stop shipping to an account that has not paid?

The order checks the customer's credit limit against their open AR balance. An order that would push them over lands on credit hold, a real status the warehouse cannot pick against, until someone reviews and releases it. That one check is what separates a real wholesale system from a glorified order pad.

Sources

Build this for your business

Describe it, go live on your own domain in one pass — hosted, full-stack, no server. Free to start.

Start building free →
Related on ybuild
distribution & wholesaleSMB back-office Managed DatabaseManaged AuthPayments & Billing Full-Stack AppDatabase SchemaCRUD App
Related scenarios
Build an Appointment App for Your SpaBuild a Booking App for a Dental ClinicBuild a Booking App for Your SalonBooking App for Tutors: Recurring Lessons, Prepaid Hours & No-Show ControlBookkeeping App for Small BusinessCRM for Law Firms
Build your own app
Free · no card
Start free →