Order operations

Still re-typing approved orders into invoices?

An approval on the board now creates and emails the invoice. Each order stays visible until delivery.

The 30-second version The full story

Order #2147 · Corner Street Retail

OrderSubmitted
ApprovalApproved on the board
One approval creates the invoice
InvoiceInvoice created and emailed
ShippingLabel ready
Illustration. Details are invented.

The 30-second version

Approved orders waited for a scheduled job before anyone got a bill. In one case, that took about nine minutes.

Now the approval itself creates and emails the invoice. The board shows where every order stands, and no order can be invoiced twice.

What they got

  • No re-keying. One approval creates and emails the invoice.
  • Every order in view. The board tracks each order through delivery.
  • No double billing. An order can't be invoiced twice.

The full story

1
approval on the board starts invoicing. No re-keying.
10 min
backup poll runs alongside the approval webhook
1
shared claim, so an order can't be invoiced twice
Before

The problem

Invoices were created by a scheduled job that checked for approved orders. In one observed case, an approval took around nine minutes to become a bill.

The portal needed ordering, approval, invoicing, and shipping in one tracked flow, with no step able to run twice.

What we built

The workflow, step by step

  1. 01OrderA verified retailer signs in and submits the order. Pricing comes from their verified company.
  2. 02ApproveStaff approve or reject on the project board.
  3. 03InvoiceA signed webhook triggers the QuickBooks invoice, which is emailed to the retailer.
  4. 04FulfillItem ordered, label prepared, packed. Exceptions need an approval with a limit and a reason.
  5. 05TrackCarrier webhooks update shipping and delivery on the order.

● a person decides at this step

Controls

Where people stay in charge

  • Retailer email must match the signed-in account. Pricing follows the verified company domain.
  • Sign-in codes expire in 10 minutes with 5 attempts. Password resets are rate-limited.
  • Webhook, scheduled poll, and manual approval share one claim, so an order can't be invoiced twice.
  • The invoice ID is saved before any email goes out.
  • Fulfillment exceptions record a dollar limit, reason, and reference, and are voided if the invoice total changes.
  • Staff admin requires a verified company Google account.
Result

What changed

An approval on the board is now what triggers the invoice. The board shows where each order stands, and duplicate invoices are blocked by design.

  • Signed approval webhooks now trigger invoicing
  • The 10-minute poll stays on as a backstop
  • Preparing a label never buys one
  • Order changes are written to an event log
Artifact

The shape of the work

An anonymized example of the run surface. Entries are illustrative.

Order event log● sample run
  1. submittedretailer order · pricing from verified domain
  2. approvedboard approval → webhook received
  3. invoicedQuickBooks invoice created · emailed
  4. exceptionover the approved limit → approval required
  5. deliveredcarrier webhook → order closed
Illustrative. Names and amounts removed.
Built with

The stack

Cloudflare Workers, Cloudflare D1, QuickBooks Online, Asana, Shippo, EasyPost, Google sign-in

A consumer services company that sells through a network of retailers

We build systems that take repetitive work off your plate.

Got something like this landing on you?

Tell us what's stuck →