Recipe-driven inventory depletion
Each menu item can be wired to a recipe — the list of inventory ingredients consumed when one of that item is sold. When a check is paid, the system decrements stock for every ingredient on every item on the check.
Wiring a recipe:
• Open Restaurant → Menu → [item] → Recipe.
• Add ingredient lines: pick an inventoryItem, set the quantity per serving (e.g. 4 oz of "Sirloin Steak" per Steak Frites order).
• Save. Future paid orders will deplete inventory accordingly.
What happens when an order is paid:
• The Cloud Function onRestaurantOrderPaid runs. For each item on the order, it walks ingredients[] and decrements orgs/{orgId}/inventoryItems/{id}.currentStock by qty × itemQuantity.
• If currentStock falls below the item's parLevel, an inventory low-stock alert fires.
Auto-86 with Wally:
• If an ingredient is depleted (or critically low), every menu item that needs it should come off the menu until restocked.
• Ask Wally "Anything I should 86 right now?" — the restaurant_smartCascade86 tool walks the menu, finds items with empty ingredients, and proposes an action card to set those items to "out of stock" so they don't show on the POS.
• Wally never auto-86s without your approval — you click "Do it" on the card.
Best practice:
• Start with the high-cost, low-shelf-life ingredients (proteins, dairy, fresh produce). Wiring every garnish is overkill.
• Use receiving counts (Inventory → Receive) to bring stock back up — par-level alerts will quiet immediately.
• Keep an eye on the variance report (Inventory → Variance) to catch theft or measurement drift between what the recipes say should have been used vs what was actually used.