Turn a sales call transcript into CRM note fields
Extract 5 core CRM fields from sales call transcripts into a Markdown table with verbatim quotes, and verify unmentioned items remain unconfirmed via script.
Asking an AI model to summarize sales call transcripts for CRM notes frequently causes it to invent plausible budgets and decision makers that the customer never stated. Force the model to quote verbatim phrases from the transcript for each field, mandate an explicit Unconfirmed fallback for unmentioned items, and verify the resulting table against the source text with a Python script. This grounding approach shares the same design principle as verifying summary citations.
[1] Prepare the call transcript. Below is an excerpt from a 15-minute discovery call for an enterprise expense automation tool. The prospect details pain points, timeline, and next steps, but budget and signing authority are never discussed.
[Call Time] October 14, 2026, 14:00-14:15[Participants] Alex Morgan (Account Executive, CloudLedger), Jordan Lee (IT Systems Manager, Veritas Logistics)[Transcript Excerpt] Alex Morgan: Your inquiry mentioned challenges with expense processing and delayed month-end closes. Could you share a bit more detail about the specific pain points your team is experiencing?Jordan Lee: We operate three logistics distribution centers in the regional area. Right now, monthly freight expense reports and corporate card receipts from each center are manually consolidated by our central accounting team using spreadsheets. Because our staff reviews and audits every receipt by hand, we end up working three full days of overtime every month-end close, and we deal with recurring typo errors and duplicate voucher entries. We need an automated solution that gathers branch receipts centrally and automatically creates journal entries.Alex Morgan: Are you looking to integrate directly into your existing enterprise resource planning (ERP) system to post those entries automatically?Jordan Lee: Exactly. We run an on-premise ERP system at headquarters, and it is essential that receipt data posts directly into the ERP general ledger via API or database integration.Alex Morgan: Do you have a target timeline in mind for evaluating and implementing this?Jordan Lee: We want to complete hands-on testing and validation by mid-November at the latest. Our goal is to go live across all three centers in time for our December year-end financial close.Alex Morgan: Would your team be open to a 1-hour virtual demo next week? How does next Tuesday, October 20 at 2:00 PM look on your calendar?Jordan Lee: Tuesday, October 20 at 2:00 PM works well for us. I will have two finance team specialists join the call with me.Alex Morgan: I will send over the calendar invite with the video conference link, along with our standard product catalog and implementation guide later today.[2] Construct the prompt. Request the 5 core CRM deal fields (Need, Budget, Authority, Timeline, Next Steps) as a 3-column table. Demand exact verbatim citations, and require the model to output Unconfirmed and None whenever an item was not explicitly stated.
Read the following sales call transcript and fill out the 5 core CRM note fields as a Markdown table. Fields:1. Need2. Budget3. Authority4. Timeline5. Next Steps Rules:- Output only a single Markdown table with exactly these 3 columns: | Field | Summary | Quote |- In the 'Quote' column, copy the speaker's exact words from the transcript character for character. Do not change punctuation, do not summarize, and do not use ellipses.- If a field was not explicitly mentioned or confirmed in the transcript, never guess or speculate. Set the 'Summary' column to exactly 'Unconfirmed' and the 'Quote' column to exactly 'None'.- Output exactly 5 rows in the table in the specified order.- Output only the table without any greetings or additional explanations. <transcript>{transcript}</transcript>[3] Execute the prompt. Pass --setting-sources "" to disable global user instructions for a clean run.
$ claude -p --model claude-sonnet-5-5 --max-turns 1 --tools "" --setting-sources "" --strict-mcp-config < run/crm_table.en.prompt.txt > run/crm_table.en.1.out.txt$ cat run/crm_table.en.1.out.txt| Field | Summary | Quote ||---|---|---|| Need | Veritas Logistics manually consolidates expense reports and card receipts from three distribution centers in spreadsheets, causing three days of month-end overtime, typo errors, and duplicate voucher entries. They need automated central receipt collection and journal entry creation that posts directly to their on-premise ERP general ledger via API or database integration. | We need an automated solution that gathers branch receipts centrally and automatically creates journal entries. || Budget | Unconfirmed | None || Authority | Unconfirmed | None || Timeline | Complete hands-on testing and validation by mid-November at the latest, with go-live across all three centers in time for the December year-end close. | We want to complete hands-on testing and validation by mid-November at the latest. || Next Steps | 1-hour virtual demo on Tuesday, October 20 at 2:00 PM with two finance team specialists joining. Alex will send the calendar invite, product catalog, and implementation guide later that day. | Tuesday, October 20 at 2:00 PM works well for us. |Budget and Authority were left as Unconfirmed with None as the quote. In the second run (run/crm_table.en.2.out.txt) Budget and Authority were again unconfirmed and the Need quote was identical. The Timeline and Next Steps quotes were longer: each added the sentence that followed in the same turn. Every quote in both runs is a verbatim piece of one utterance.
[4] Write the validation script. It checks that the header and every row have exactly 3 columns (a row with another column count is an error), that each of the 5 fields appears once, that an Unconfirmed field has the quote None, and that every other quote sits inside one single utterance of the transcript, word for word. There is no minimum quote length, so a very short fragment passes, and the dates and numbers in the Summary column are not compared with the transcript.
import sys FIELDS = ["Need", "Budget", "Authority", "Timeline", "Next Steps"]UNKNOWN, NONE = "Unconfirmed", "None" utterances = [" ".join(l.split()) for l in open(sys.argv[1], encoding="utf-8") if l.strip()]rows = [[c.strip() for c in l.strip().strip("|").split("|")] for l in open(sys.argv[2], encoding="utf-8") if l.strip().startswith("|")]rows = [r for r in rows if not all(set(c) <= set("-: ") for c in r)]header, rows = rows[0], rows[1:] errors, seen = 0, []if len(header) != 3: print(f"FAIL header: {len(header)} columns"); errors += 1for n, row in enumerate(rows, 1): if len(row) != 3: print(f"FAIL {n}: {len(row)} columns {row[:1]}"); errors += 1; continue field, summary, quote = row key = next((k for k in FIELDS if k in field), None) if key is None or key in seen: print(f"FAIL {n}: invalid or duplicate {field!r}"); errors += 1; continue seen.append(key) q = " ".join(quote.split()) if summary == UNKNOWN: if q != NONE: print(f"MISMATCH {n}: {key} unknown but has quote {q!r}"); errors += 1 elif not q or q == NONE or summary == NONE: print(f"MISMATCH {n}: {key} has content without quote"); errors += 1 elif not any(q in u for u in utterances): print(f"MISS {n}: {key} quote not inside one utterance: {q[:60]!r}"); errors += 1if sorted(seen) != sorted(FIELDS): print(f"FAIL: missing {sorted(set(FIELDS) - set(seen))}"); errors += 1print(f"{len(seen)} fields checked, {errors} errors")sys.exit(1 if errors else 0)[5] Run it. All 5 fields pass with exit code 0, and the second run's table passes too (vout.en.2.txt).
$ python run/verify_crm_en.py run/transcript.en.txt run/crm_table.en.1.out.txt5 fields checked, 0 errorsexit 0Three hand-made bad tables were tested and all exited with 1 (not model output): a quote with one word changed (test_bad_quote.en.txt), a Budget row with a fourth column (test_extra_col.en.txt), and a quote made by gluing two separate turns together (test_glued_quote.en.txt). The last two were passed by an earlier version of this script, which is why the script now checks column counts and single utterances. Two of the three are shown.
$ python run/verify_crm_en.py run/transcript.en.txt run/test_extra_col.en.txtFAIL 2: 4 columns ['Budget']FAIL: missing ['Budget']4 fields checked, 2 errorsexit 1$ python run/verify_crm_en.py run/transcript.en.txt run/test_glued_quote.en.txtMISS 1: Need quote not inside one utterance: 'We need an automated solution that gathers branch receipts c'5 fields checked, 1 errorsexit 1[6] Where it falls short. In the two English runs the Timeline and Next Steps quotes differed in length: run 1 quoted a single sentence, run 2 added the sentence that followed. A short quote does not always support the whole summary. In run 1 the Next Steps summary mentions Alex sending the invite and catalog, but the quote is only the line accepting the time. Read the Summary column for dates and figures as well as the Quote column. The two Korean runs quoted identically.
A transcript from poor speech-to-text, with dropped or garbled words, will make even correct quotes fail the match, so check the transcript quality first. Such a transcript was not tested here.