Spensara Spensara Knowledge Base & Documentation Repository

Repository Docs & Knowledge Base

Consolidated Spensara documentation repository (722 Markdown & architecture documents in ../repository)
Built Word Documents (.docx): Spensara Overview (.docx) Capability Assessment (.docx) Brink POS Ingestion Analysis (.docx) The Borg Ingestion Architecture (.docx)

Branches (328)

Branch-specific documentation across extract-raw-xml, feature-fleet-import, kds_cdc_improvments, life-cycle, and tenat-admin.
branches/kds_cdc_improvments/monitor-specs/backend/Kds.Ai.Data/MonitorSpecs/demand-drivers.md 4,116 bytes · Updated Oct 23, 2026 10:44 AM EDT
Raw File

id: 8f1d7e6a-4e5f-4f1c-9f8a-3c0c9d2a61c7 name: Identify demand drivers kind: Insight cron: 0 0 6 * * 1 analysis_window: 90d comparison_periods: [7d, 28d]


Detect menu items whose prices should be adjusted based on demand patterns, seasonal factors, and external conditions such as weather or holidays.

Known Tables & Columns

curated.pos_orders

  • order_id (varchar) - join key to sold items
  • created_at (timestamp) - local order timestamp for time-of-day analysis
  • business_date (date) - business trading date
  • total (decimal) - order revenue
  • destination (varchar) - destination or fulfillment context
  • service_channel (varchar) - dine-in, pickup, delivery, or similar channel label when populated
  • fulfillment_channel (varchar) - downstream fulfillment grouping when populated

curated.pos_order_items

  • order_id (varchar) - join key to curated.pos_orders.order_id
  • item_id (integer) - menu item identifier
  • item_name (varchar) - sold item name
  • quantity (integer) - sold quantity
  • unit_price (decimal) - observed sold unit price
  • category_name (varchar) - sold item category when populated
  • business_date (date) - item business date

curated.pos_menu_items

  • item_id (integer) - menu item identifier
  • item_name (varchar) - configured menu item name
  • category_name (varchar) - configured category
  • price (decimal) - current configured price
  • cost (decimal) - current configured item cost when visible

Analysis Approach

  1. Analyze sold item demand for last 90 days using curated.pos_order_items joined to curated.pos_orders on order_id.
  1. Classify menu items into demand tiers:
  2. High-demand items: items consistently sold above median sales volume
  3. Low-demand items: items with significantly lower sales volume relative to other items.
  1. Identify time-based demand patterns:
  2. compare item demand by hour of day using curated.pos_orders.created_at
  3. compare day-of-week trends using business_date
  4. detect patterns related to weekends vs weekdays.
  1. Identify seasonal and special-period patterns, including:
  2. public holidays
  3. major holiday periods
  4. long weekends or national holidays.
  1. Detect weather-related demand patterns by comparing historical sales patterns during:
  2. pleasant weather
  3. rainy conditions
  4. extreme temperatures.
  1. Compare current and upcoming weather forecasts with historical patterns to determine whether demand may deviate from normal baseline. Use get_weather_forecast to check weather for Orlando.
  1. Analyze demand shifts across service modes using curated.pos_orders.destination, service_channel, and fulfillment_channel to detect whether shifts occur between dine-in, pickup, and delivery contexts.
  1. Use curated.pos_menu_items only for stable menu metadata such as configured category or current configured price/cost. Use observed sold unit_price from curated.pos_order_items for pricing-demand analysis.
  1. Identify pricing opportunities:
  2. high-demand items during peak periods that may tolerate small price increases
  3. low-demand items that may benefit from temporary discounts or promotions
  4. delivery-heavy items during bad weather that may support delivery markup or channel-specific pricing.
  1. Ignore items with fewer than 20 total units sold in analysis window to avoid noise.
  1. Produce clear pricing recommendations including:
  2. item name
  3. demand insight
  4. suggested price adjustment
  5. brief reasoning understandable for restaurant managers.
  1. Minimize database usage:
  2. prefer aggregated summaries instead of raw data
  3. do not request more than 3 queries unless necessary.

Severity Guidance

  • Low: Small pricing opportunity detected (minor demand imbalance).
  • Medium: Consistent demand shift suggesting price adjustment during specific time periods.
  • High: Strong demand imbalance caused by external factors (holidays, weather, or peak hours) indicating significant pricing opportunity.