AI Prediction Builder
No-code custom predictions. Pick what you want to predict ("will this deal close?", "will this customer pay on time?", "will this lead convert?"), pick the field that defines success, and the AI builds a prediction model from your data. Same engine as predictive lead scoring, generalized.
Steps
- Sidebar > Tools > AI Intelligence > AI Predictions. Click "✨ New Prediction".
- Wizard step 1: pick entity type. Four are supported today: Contacts, Deals, Invoices, Tasks.
- Step 2: pick the outcome field on that entity. Each entity exposes a synthetic "_outcome" path that wraps the messy real-world logic for you:
- • Contacts — outcome on the "stage" field (LEAD → CUSTOMER, etc.) or any custom field.
- • Deals — _outcome resolves to "won" (wonAt set), "lost" (lostAt set), or "open".
- • Invoices — _outcome resolves to "paid" (paidAt set), "overdue" (status=overdue OR past due with balance), or "open".
- • Tasks — _outcome resolves to "completed_on_time", "completed_late", "missed" (past due, never completed), or "open".
- Step 3: name the positive value (what you're predicting will happen) and the negative value. Wizard counts your records and validates you have at least 30 of each.
- Step 4: hit "Train Model". One standard-tier model call analyzes both groups and extracts up to 12 patterns with impact scores. Result page shows accuracy + top patterns.
- After training: any record of the prediction's entity type can be scored on demand (POST /ai/predictions/:id/score with entityId), or batch-score all applicable entities at once.
- Predictions can be retrained anytime as your data grows. Toggle inactive predictions off to stop them appearing in score lookups.
Good to know
- Built on the same matchRule evaluator as predictive lead scoring — patterns from the AI are validated against a whitelist of fields/operators per entity type, so a hallucinated rule can't silently no-op the entire model.
- Accuracy is in-sample (computed on the training data itself). For a true holdout estimate, ask: there's a TODO to add a holdout split if users want gold-standard accuracy.
- Each entity has its own feature vector. Invoices use payment timing (sent/viewed/reminded flags, days-until-due, days-overdue) plus a light join onto the linked contact (stage, lead score). Tasks use priority, days-until-due, has-assignee, subtask + dependency counts.
- Want a fifth entity type (events, support tickets, proposals)? The framework is per-entity adapters (~100 LOC each) — file feedback with the use case and which outcome you'd predict.
Example: A finance ops lead builds "Will this invoice get paid on time?". Entity: Invoice. Outcome: _outcome. Positive=paid, Negative=overdue. 120 paid + 45 overdue invoices. The trained model surfaces patterns like "wasReminded = true → -14 (we only remind the late ones)", "contactStage = CUSTOMER → +9", "total > 5000 → -7", "daysSinceIssue > 30 with status != paid → -22". Collections team prioritizes high-risk invoices that are still inside the grace window — DSO drops 6 days in a quarter. The same week, an ops manager builds "Will this task get missed?" on the Task entity, outcome=missed/completed_on_time, and uses it to flag at-risk tickets in the daily standup.
Troubleshooting
"Need at least 30 positive and 30 negative outcomes" error
The trainer needs a minimum sample size on each side to find statistically meaningful patterns (anything less and the model is just guessing).
Fix: Wait until your data has the volume, or pick a different outcome field where your data is more populated.
Trained model has very low accuracy (<0.6)
Either (a) the outcome field doesn't actually correlate with your data, (b) the data is too noisy, or (c) the sample is unbalanced (e.g., 200 positives vs 32 negatives).
Fix: Re-examine the outcome definition. Try a more discriminating outcome field. If accuracy stays low, this prediction may not be learnable from CRM data alone.
Invoice or Task tile is missing from the wizard
Frontend cache is stale — the entity options were added in this release.
Fix: Hard refresh the page. If still missing, verify the API and worker have been restarted with the new build.
Plans
Included in every plan. Training is one standard-tier model call per prediction (moderate cost on any provider — your highest-cost training run, but only fires when you click "Train Model"). Scoring is rule-based (free). Toggleable per-org under Settings > AI Usage > AI Features (key: prediction_builder).
Related
- Predictive Lead Scoring (the built-in lead conversion prediction; this feature lets you build more like it)
- AI Business Objectives (org-level context that informs all AI calls)
- Customer Health (uses the same scoring engine as the Contact predictions)
- Finance Suite (where Invoice predictions get used in the AR aging view)