# Conversation Intelligence

_AI Features_

Per-contact relationship summary extracted from email threads + meeting transcripts. Gets you sentiment, sentiment trend, competitor mentions, objections (raised/addressed/unresolved), buying signals, key topics, stakeholders mentioned, and an engagement metrics panel — without re-reading 6 months of correspondence.

## Steps
1. Open any contact detail page. The "Conversation Intelligence" card sits in the right sidebar between AI Score and Details.
2. New contacts show an empty-state with an "Analyze Conversations" button. Click it to run the analysis on demand (one standard-tier model call — moderate per-contact cost; the most expensive feature in the AI suite per run).
3. After analysis: relationship score (0-100), sentiment + trend arrow, 2-3 sentence summary, engagement metrics grid, expandable sections for buying signals, objections, competitors, stakeholders, and key dates.
4. The weekly worker (Sunday 10pm UTC) auto-runs analysis on every contact with messages in the last 30 days, capped at 5 orgs per run. Re-runs are skipped for contacts analyzed in the last 7 days.
5. Analytics page > Conversation Intelligence section: org-wide Competitor Landscape + Common Objections panels aggregated from all analyses. Sales leadership gold.
6. Manual full-org refresh available via POST /ai/conversation-intel/analyze-all (admin-only).

## Tips
- Meeting transcripts are integrated automatically — pre-extracted competitors / objections / buying signals from each Meeting record are merged with the email-derived analysis. Each entry tags its source ("email" or "meeting:<id>") so you can trace it back.
- Aggregated reports (Competitor Landscape, Common Objections) compute on demand from existing rows — no extra AI cost to view them, only to populate them.
- Sentiment trend ("improving" / "stable" / "declining") compares the last ~30 days of messages to earlier in the thread. Useful for catching cooling deals before the deal-health dot turns amber.

## Example
A CRO walks into Monday's sales meeting and pulls up Analytics > Conversation Intelligence. "Competitor Landscape" shows Salesforce mentioned in 28 contacts — twice as many as last quarter, mostly negative sentiment ("too expensive", "implementation pain"). She makes the team's ICP pitch lead with cost and time-to-value for the next two months. Pipeline up 22% by mid-quarter — she didn't have to read a single email thread to spot the trend.

## Troubleshooting
- **"No messages or meetings to analyze for this contact"** — Contact has no Message rows in the org's DB. If you import contacts but never send/receive through the integrated email/SMS, there's nothing to analyze. Fix: Either connect an email account (Settings > Communications > Connected Accounts) so messages flow in, or accept that this feature only works on contacts you've actually corresponded with.
- **Analysis is empty (0 competitors, 0 objections, etc.)** — The contact's correspondence is short (<5 messages) or generic (status updates, no sales content). The model refuses to invent extractions when the source material is thin. Fix: Wait for more conversation history. Or accept that some contacts genuinely have nothing to extract.
- **Org-wide Competitor Landscape stays empty** — No contacts have been analyzed yet. The widget hides itself entirely when there's no data. Fix: Run analysis on at least a handful of high-touch contacts manually (Analyze Conversations button) and the panels will populate. The weekly worker will fill in the rest over time.

## Plans
Included in every plan. Most expensive feature per run — uses the CRMown AI standard tier. Weekly cap of 5 orgs per run keeps per-tenant cost predictable regardless of underlying provider. Toggleable per-org under Settings > AI Usage > AI Features (key: conversation_intel) — disabling it stops the weekly worker entirely.
