Most tools treat a quote like a PDF. Write it, send it, forget it. If the customer says yes, you retype the important parts into another system. If they say no, you delete the PDF.
This disconnect between the quoting tool and the fulfillment tool is the single most expensive handoff in distribution. The commercial team closes in one system, the warehouse team picks in another, and the gap between them is filled with email, Slack messages, and Post-it notes. Nothing stays in sync because nothing was designed to.
States that mean something Quotery's <a href='/product' class='text-[var(--color-accent)] underline'>quoting system</a> has a status enum: draft → sent → closed → partially_delivered → delivered, with cancel branches from draft / sent / closed. Each transition is a service call that enforces invariants.
The <a href='/docs/product/quotes' class='text-[var(--color-accent)] underline'>quote state machine</a> is not cosmetic. draft means nothing is reserved and nothing is visible to the customer. sent means the customer has access to the quote via their client portal link. closed means the customer accepted and stock is now reserved. partially_delivered means at least one delivery note has been posted against this quote. delivered means every line has been fully shipped. Each state gates specific actions — you can't deliver from draft, you can't cancel from delivered, and you can't edit prices on a closed quote.
Closing reserves stock The moment you close a quote, Quotery reserves stock against every line. If there isn't enough, the response tells you exactly which products are short — the quote still closes. Commercial teams get information, not friction.
This is the deliberate design decision we describe in more detail in the over-reservation post. The close operation never fails on availability. It reserves what's there, reports what's missing, and lets the commercial team decide. Some will proceed anyway — inbound stock is arriving Tuesday and the customer doesn't need delivery until Friday. Others will call the customer and adjust quantities. The tool's job is to inform the decision, not to make it.
Cancel is a transaction Cancelling a closed quote writes RELEASE rows on the ledger to unwind the reservation. Cancelling a partially delivered quote is rejected — you post a return note instead. The rules are encoded, not remembered.
Every state transition is a single database transaction. The status change, the ledger writes, and the cache updates all commit together or all rollback together. There is no partial state. There is no 'the status says closed but the stock wasn't reserved' scenario. If the database goes down mid-transaction, the whole thing unwinds and the caller retries. Atomicity isn't a feature — it's the only honest way to build a state machine that moves money and product.
