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
| Column | Notes |
|---|---|
id | INTEGER PK |
order_number | TEXT, e.g., O-N00001 |
customer_id | FK → customers; created on checkout if new |
status | received, picking, packed, shipped, ready_for_pickup, picked_up, cancelled |
fulfillment_method | ship or pickup |
payment_method | usually card via Stripe Checkout from the public site |
transaction_id | FK → transactions |
tracking_number | for shipped orders |
pickup_code | randomly generated for in-shop pickup verification |
Endpoints
POST /api/webhooks/online-orders— public-site → Helm intakeGET /api/orders— fulfillment listGET /api/orders/:id— detailPUT /api/orders/:id/status— transition (with side effects)POST /api/orders/:id/ship— record tracking numberPOST /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