Skip to main content

Slice 9 — Online Orders

Orders placed on the shop's public marketing site (e.g., swickedcycles.com) flow into Helm for fulfillment. The fulfillment workflow tracks pick → pack → ship or pickup-ready.

Status: Schema done. Public-site → Helm intake not built. Fulfillment UI not built.

Drafted from planning · v0.1

Scope

  • online_orders, online_order_lines, online_order_fulfillment_events
  • Public-site → Helm webhook (the public-site Worker POSTs the order to Helm on customer checkout)
  • Fulfillment screen showing orders pending pick
  • Mark items picked / packed / shipped or ready for pickup
  • Customer notification at each milestone (SMS/email)

Schema

ColumnNotes
idINTEGER PK
order_numberTEXT, e.g., O-N00001
customer_idFK → customers; created on checkout if new
statusreceived, picking, packed, shipped, ready_for_pickup, picked_up, cancelled
fulfillment_methodship or pickup
payment_methodusually card via Stripe Checkout from the public site
transaction_idFK → transactions
tracking_numberfor shipped orders
pickup_coderandomly generated for in-shop pickup verification

Endpoints

  • POST /api/webhooks/online-orders — public-site → Helm intake
  • GET /api/orders — fulfillment list
  • GET /api/orders/:id — detail
  • PUT /api/orders/:id/status — transition (with side effects)
  • POST /api/orders/:id/ship — record tracking number
  • POST /api/orders/:id/notify-customer — send progress SMS/email

UI

Orders screen:

  • "Pending pick" queue (oldest first)
  • Order detail: customer, items, fulfillment method, address (if ship)
  • "Mark picked / packed / shipped" buttons
  • "Pickup ready" generates pickup code; SMS to customer

In edit mode:

  • Notes on the order
  • Tracking number entry
  • Customer info read-only (came from public site)

What's not yet built

Everything. Schema is in place; the public-site → Helm webhook is the first piece needed.

Acceptance criteria

  • A test order placed on the public site appears in Helm within 5 seconds
  • Pickup flow generates a code, customer receives SMS, code verifies at counter
  • Shipping flow accepts tracking number, sends SMS with link
  • Cancelled order refunds via Stripe automatically

See also