Skip to main content

AI Features

The AI intelligence layer runs in the background, analyzing sales patterns and providing actionable suggestions.

How It Works

A background scheduler runs 6 recurring jobs:

JobFrequencyPurpose
Suggestion cache refreshPeriodicPre-compute suggestions for fast retrieval
Hourly snapshotsEvery hourCapture sales metrics for trend analysis
Item pair trackingOngoingTrack which items are ordered together
Inventory velocityOngoingMonitor ingredient consumption rates
Cache cleanupPeriodicRemove stale suggestion data
Shrinkage detectionPeriodicFlag inventory discrepancies

Suggestion Types

Upsell Suggestions

Based on the current cart contents, the AI suggests additional items the customer might want.

How it works: Item pair tracking identifies which items are frequently ordered together. When a customer adds a taco, the system might suggest adding guacamole or a drink.

Inventory Push

When ingredients are approaching expiration or overstocked, the system suggests promoting menu items that use those ingredients.

Example: If avocados are overstocked, suggest featuring guacamole prominently or offering a discount.

Combo Upgrade

When a customer's cart items could be replaced with a cheaper combo, the AI suggests the upgrade.

Example: Cart has a burger ($80), fries ($35), and soda ($25) = $140. A combo exists for $120. The AI suggests switching to the combo.

Dynamic Pricing

Based on demand patterns, the system can suggest price adjustments:

  • Peak hours: Slight price increases on high-demand items
  • Slow periods: Discounts to drive traffic
  • Inventory-driven: Discounts on items using overstocked ingredients

Heuristic vs Grok AI

The system operates in two modes:

Heuristic Mode (Always Active)

  • Rule-based suggestions using sales data and inventory levels
  • No external API calls
  • Fast and reliable
  • Covers all four suggestion types

Grok AI Mode (Optional)

  • Enhanced suggestions using the Grok API (currently grok-4-1-fast-reasoning)
  • Requires XAI_API_KEY environment variable
  • Provides more nuanced, natural-language suggestions
  • Falls back to heuristic mode if the API is unavailable
  • The model is configurable via Settings > AI Configuration without a code change

Configuration

  1. Go to Settings > AI Configuration
  2. Toggle suggestion types on/off
  3. Set sensitivity thresholds (e.g., minimum confidence for upsell suggestions)
  4. Configure dynamic pricing limits (maximum % increase/decrease)
tip

Start with heuristic mode to understand the suggestion patterns before enabling Grok AI. The heuristic suggestions are already highly effective for most restaurants.