STEP 0 — Discover the account and ask the user Call allo_get_me to confirm the connected Allo account. Then call allo_list_users and allo_list_numbers in parallel. Present the user with two questions before doing anything else: "I found [N] users and [N] phone lines on [TEAM NAME]. Who or what should I include in this analysis? A) Specific user(s) — [list names] B) Specific phone line(s) — [list numbers/labels] C) The whole team (all users, all lines) What date range? (default: last 7 days)" Wait for the user's answers before proceeding. Log this as Step 0 in the run log. STEP 1 — Retrieve calls Using allo_search_conversation_items, pull all answered calls within the chosen date range. Apply only the filters the user confirmed: - If a specific user was chosen: add user_id - If a specific line was chosen: add allo_number - If whole team: omit both Always set: type=CALL, result=ANSWERED, size=100, sort=DATE Paginate if has_more=true. Collect all pages before moving on. Log each API call: method, inputs, result count. STEP 2 — Filter Discard any call shorter than 120 seconds (2 minutes). Note how many calls were excluded. From the remaining calls, also discard any that are clearly irrelevant based on their summary field (wrong number, spam, pure voicemail callback with no conversation). Note how many were excluded and why. Do not fetch transcripts yet. STEP 3 — Pre-screen summaries Each call already includes a summary field from the search results. Read every summary and assign a preliminary label: SALES: discovery, demo, pricing discussion, new prospect SUPPORT: existing customer with a technical or billing issue ONBOARDING: new customer getting set up OTHER: anything else This takes seconds and avoids fetching transcripts for calls that won't contribute meaningful signal. Flag any call whose summary is empty or too vague to label — those will still get full transcript treatment. STEP 4 — Pull and tag transcripts Fetch transcripts for all remaining qualifying calls using allo_batch_get_conversation_items with extend=transcript. Batch in groups of 6 — do not exceed this per call. For each transcript, tag every relevant statement: PAIN: problems, frustrations, blockers LIKE: positive reactions, what's working OBJECTION: hesitations, pushback, reasons not to move forward Preserve exact quotes, the speaker's name or role, the context that prompted the statement, and a call reference (ID, date, contact name). STEP 5 — Cluster, rank, and report Group similar statements into themes. Count how many distinct calls each theme appeared in (occurrence count). Then produce this report: 📊 Sales Call Analysis — [TEAM NAME] — [DATE RANGE] Scope: [Users / Lines / Whole team — as selected] Calls analyzed: [N] calls ≥ 2 min (out of [total] retrieved) Excluded: [N] too short / [N] irrelevant by summary 🔴 Top 10 Pain Points For each pain point: Short label (e.g., "Manual reporting eats too much time") 2–3 sentence summary of the underlying problem Exact quotes with speaker and context Occurrence count 💚 Top 5 Things That Are Working For each item: Short label 2–3 sentence summary of what prospects appreciated Exact quotes with speaker and context Occurrence count 🟡 Top 5 Objections For each objection: Short label (e.g., "Price too high vs. current solution") 2–3 sentence summary of how it surfaces Exact quotes with speaker and context Occurrence count 🔧 Run Log | Method | Key Inputs | Result | |--------|-----------|--------| | … | … | … | Rules that always apply: - Never fabricate quotes. If something is inferred, mark it ⚠️ inferred. - Occurrence count = distinct calls, not total mentions within one call. - If a theme appears in only 1 call, flag it ⚠️ weak signal. - If fewer than 3 qualifying calls exist, report what's available and flag ⚠️ thin data. - If Allo MCP is unavailable, ask the user to paste transcripts directly.