Cancels Analysis Documentation¶
Menu Location: AI > Cancels Analysis
Access Level: Administrator and above
Last Updated: 2026-03-02
Overview¶
The Cancels Analysis page (cancels.php?analysis=1) extends the standard cancellations page with AI-powered analysis capabilities. It can generate AI summaries of cancellation trends and auto-classify free-text cancellation reasons into predefined categories. This helps businesses understand why customers leave and identify actionable patterns.
Primary Functions:
- AI-powered summary of cancellation trends for any filtered date range
- Auto-classify free-text cancellation reasons into predefined categories
- Filter cancellations by date range, reason category, and search text
- Export cancellation data
- Track AI classification progress
Page Layout¶
Analysis Banner¶
When accessed with ?analysis=1, an info banner displays:
"AI Cancels Analysis: Filter for the date range and filters you want, then you can click on 'Generate AI Summary' to see an analysis of the results."
Filter Controls¶
| Filter | Description |
|---|---|
| Date Range | Start and end dates (defaults to last 31 days) |
| Cancellation Reason | Filter by predefined reason category |
| Search String | Search within free-text reason descriptions |
| Subscription Feature | Filter by subscription type |
| Has Delayed | Filter for delayed cancellations |
Action Buttons¶
- Generate AI Summary: Sends filtered cancellation data to AI for trend analysis
- Classify Reasons: Runs AI classification on unclassified free-text reasons
- Export: Download filtered cancellation data
Results Table¶
Displays matching cancellations with customer info, dates, reasons, and classification status.
AI Features¶
AI Summary Generation¶
Triggered via the "Generate AI Summary" button (ajax_ai_summary parameter):
- Takes the currently filtered cancellation data
- Sends it to the AI for analysis
- Returns a narrative summary of trends, patterns, and insights
- Useful for identifying common themes across many cancellations
AI Reason Classification¶
Triggered via the "Classify Reasons" button (classify_reasons parameter):
- Requires
ai_classify_cancelsconfig to be enabled - Processes unclassified free-text cancellation reasons
- Assigns them to predefined reason categories automatically
- Tracks classification via the
ai_temperaturefield (0 = unprocessed) - Reports processing count and remaining records
How to Use¶
Generating an AI Summary¶
- Navigate to AI > Cancels Analysis
- Set the date range for the period you want to analyze
- Optionally apply reason category or text filters
- Click "Generate AI Summary"
- Review the AI-generated analysis of cancellation patterns
Running AI Classification¶
- Navigate to AI > Cancels Analysis
- Click "Classify Reasons"
- The system processes unclassified cancellation reasons
- A success message shows how many were processed and how many remain
- Repeat if there are remaining unprocessed records
Filtering Cancellations¶
- Use the date range pickers to set your analysis window
- Select a specific cancellation reason from the dropdown to focus on one category
- Use the search field to find cancellations containing specific text
- Apply subscription feature filters for segment-specific analysis
- Click Submit to refresh results
Common Use Cases¶
Monthly Cancellation Review¶
Set the date range to the past month and generate an AI summary. Review trends and compare with previous months to identify changes.
Reason Category Cleanup¶
Run AI classification to automatically categorize free-text reasons that customers entered. This standardizes data for better reporting.
Churn Pattern Analysis¶
Filter by specific reason categories and date ranges to identify seasonal or event-driven cancellation patterns.
Retention Strategy Development¶
Use AI summaries to identify the top cancellation drivers, then develop targeted retention strategies for each.
Tips & Best Practices¶
- Run AI classification periodically to keep free-text reasons categorized
- Use narrower date ranges for more focused AI summaries
- Compare summaries across different time periods to spot trends
- The
ai_classify_cancelsconfig must be enabled for classification to work - Export data after filtering for offline analysis in spreadsheets
- Use reason category filters alongside AI summaries for deep dives
Database Tables¶
| Table | Purpose |
|---|---|
| cust_cancels | Cancellation records with reasons and dates |
| cust_cancels_reasons | Predefined cancellation reason categories |
Key Fields in cust_cancels¶
- reason: Free-text cancellation reason from customer
- cust_cancels_reasons_id: Linked predefined reason category
- ai_temperature: AI classification status (0 = unprocessed)
Troubleshooting¶
"Feature not enabled" Error¶
The ai_classify_cancels configuration must be enabled for your site. Contact your admin to enable this feature.
AI Summary Takes Too Long¶
- Narrow the date range to reduce the data volume
- Apply filters to focus on a subset of cancellations
- Large datasets require more AI processing time
Classification Not Updating¶
- Check that there are unclassified records (ai_temperature = 0)
- Run the classification again - it processes in batches
- Verify the AI API is responding correctly
FAQ¶
What's the difference between this and the regular Cancellations page?¶
The regular Cancellations page shows the same data but without the AI analysis banner, AI summary generation, or AI classification features. Access with ?analysis=1 to enable AI features.
How does AI classification work?¶
The AI reads the free-text reason a customer provided and matches it to the closest predefined cancellation reason category. It tracks progress via the ai_temperature field.
Can the AI misclassify a reason?¶
Yes, AI classification is probabilistic. Review classified reasons periodically to ensure accuracy, especially for ambiguous entries.
How many reasons are processed per classification run?¶
The system processes a batch per run. Check the success message for the count and remaining records.
Related Pages¶
- Cancellations (
cancels.php) - Standard cancellation tracking - AI Overview - Central AI dashboard
- Daily Customer Report - Includes cancellation counts
- Customer Longevity - Retention and cohort analysis