Skip to content
FeaturesPricingAffiliateBlogHelpAboutContact
Get StartedSign In
Back to Blog
tips2026-07-296 min read

Lightspeed K-Series: Auto-Grey Menu Items When Stock Hits Zero

How an Amsterdam poke bowl chain wired Lightspeed Restaurant K-Series to thMenu for sub-second sold-out badges across 18 locations — WebSocket persist, waiter cancel conflicts handled.

th

thMenu Team

thmenu.com

An Amsterdam poke chain noticed salmon ran out mid-lunch — but customers kept ordering it for 20 more minutes because the menu didn't know. With thMenu plugged into Lightspeed Restaurant K-Series via WebSocket, the grey "Sold out today" badge now appears 280ms after the POS hits zero. Wrong-order refunds dropped 94%.

WebSocket Persist (Not 5-Second Polling)

We connect to Lightspeed K-Series' /inventory-events channel via Cloudflare Workers Durable Objects — one persistent socket per location. Push-based: when salmon SKU drops to 0, the event lands in D1_MENU in 280ms.

Each Durable Object holds only the latest SKU snapshot — no history cache — so 18 sockets fit well inside the 32 KB memory budget.

Grey Badge UX, Not a Delete

The item card stays — opacity drops to 0.5 and a "Sold out today" badge appears. Customers still see the photo, so they know to come back tomorrow. The add-to-cart button gets pointer-events:none.

  • Badge color: soft charcoal (#3a3a3a), never red — keeps the menu calm.
  • Animation: 220ms cross-fade, scroll position preserved.
  • Allergen filter: sold-out items aren't hidden, just unorderable.

Edge Case: The Waiter-Cancel Conflict

Classic trap: a waiter voids 1 salmon, Lightspeed bumps stock back to +1 — but the kitchen may already have prepped the last portion. Stock says 1, reality says 0. The fix is a manual sold-out lock flag. When a manager toggles "out today" by hand, incoming WebSocket events are ignored until they release it.

The lock lives in manual_soldout_until on D1_MENU; a 23:00 cron clears it after service.

FAQ

Does this work with Lightspeed L-Series? No — L-Series only exposes REST polling. K-Series (Restaurant) is the one with the inventory WebSocket.

What if the socket drops? Durable Object reconnects with 1s/2s/4s/8s exponential backoff. A 5-minute REST snapshot polls as fallback.

Which thMenu plan? Pro and Platinum. Starter still has the manual "out of stock" toggle.

Found this helpful? Share it.