Categories
Monitor Specs (29)
- backend/Kds.Ai.Data/MonitorSpecs/customer-churn-risk.md
- backend/Kds.Ai.Data/MonitorSpecs/customer-profiles.md
- backend/Kds.Ai.Data/MonitorSpecs/daily-forecast.md
- backend/Kds.Ai.Data/MonitorSpecs/demand-drivers.md
- backend/Kds.Ai.Data/MonitorSpecs/forecast-demand.md
- backend/Kds.Ai.Data/MonitorSpecs/forgotten-items.md
- backend/Kds.Ai.Data/MonitorSpecs/identify-high-value-customers.md
- backend/Kds.Ai.Data/MonitorSpecs/identify-plowhorse-items.md
- backend/Kds.Ai.Data/MonitorSpecs/identify-star-items.md
- backend/Kds.Ai.Data/MonitorSpecs/incorporate-seasonality.md
- backend/Kds.Ai.Data/MonitorSpecs/inventory-levels.md
- backend/Kds.Ai.Data/MonitorSpecs/item-recall-storm.md
- backend/Kds.Ai.Data/MonitorSpecs/kitchen-performance.md
- backend/Kds.Ai.Data/MonitorSpecs/large-order-wave.md
- backend/Kds.Ai.Data/MonitorSpecs/menu-item-profitability.md
- backend/Kds.Ai.Data/MonitorSpecs/monthly-forecast.md
- backend/Kds.Ai.Data/MonitorSpecs/optimal-pricing-adjustments.md
- backend/Kds.Ai.Data/MonitorSpecs/optimize-order-quantities.md
- backend/Kds.Ai.Data/MonitorSpecs/order-surge.md
- backend/Kds.Ai.Data/MonitorSpecs/prep-time.md
- backend/Kds.Ai.Data/MonitorSpecs/pricing-recommendations.md
- backend/Kds.Ai.Data/MonitorSpecs/priority-flood.md
- backend/Kds.Ai.Data/MonitorSpecs/seasonality-trends.md
- backend/Kds.Ai.Data/MonitorSpecs/segment-customers.md
- backend/Kds.Ai.Data/MonitorSpecs/segment-descriptions.md
- backend/Kds.Ai.Data/MonitorSpecs/slow-kitchen.md
- backend/Kds.Ai.Data/MonitorSpecs/station-bottleneck.md
- backend/Kds.Ai.Data/MonitorSpecs/waste-reduction.md
- backend/Kds.Ai.Data/MonitorSpecs/weekly-forecast.md
id: e2a9c4f7-6b3d-4d8a-9f21-5c7e1a2b8d66 name: Predict customer churn risk kind: CustomerInsights cron: 0 25 7 * * * analysis_window: 90d comparison_periods: [7d, 28d]
Predict customer churn risk to support retention strategies and proactive customer engagement.
The process should analyze recent customer activity and identify customers at risk of stopping visits based on simple, reliable behavioral signals.
The output must contain churn risk classifications only, without explanations or descriptions of methodology.
Known Tables & Columns
curated.pos_transactions
- check (integer) - order identifier
- dob (date) - transaction date
- amount (decimal) - total check value
curated.pos_transaction_tenders
- check (integer) - order identifier
- tender type - payment method used
curated.pos_orders
- customer linkage surface — use
customer_numberto associate transactions with identifiable customers
curated.loyalty_customers
- customer identity surface — join
curated.pos_orders.customer_numbertocurated.loyalty_customers.customer_number
Analysis Approach
Stage 1 — Customer Activity Aggregation
Extract transaction data from the last 90 days using curated.pos_transactions.
Calculate per-customer metrics including:
- total visits
- average spend per visit
- days since last visit.
Stage 2 — Churn Signal Detection
Identify churn indicators such as:
- declining visit frequency over time
- increasing gaps between visits
- decreasing spend compared to earlier activity within the 90-day window.
Stage 3 — Risk Classification
Classify customers into churn risk levels using simple rules:
- High risk
- no recent visits within a defined recent period
- clear drop in visit frequency and spend
- Medium risk
- reduced visit frequency or increased gaps between visits
- Low risk
- consistent recent activity and stable spending.
Avoid complex predictive models.
Stage 4 — Basic Profiling
Optionally attach lightweight attributes such as:
- dominant payment method from
curated.pos_transaction_tenders.
Use curated.pos_orders.customer_number joined to curated.loyalty_customers.customer_number where the prompt needs customer-level churn classification.
Output Constraints
- Use historical data from the last 90 days only.
- Prefer aggregated summaries.
- Avoid requesting more than 2–3 database queries.
- Avoid complex joins and predictive models.
- Return churn risk classifications only.
- Do not include explanations, reasoning, or methodology.
Output Format
Return structured churn risk records.