Sub topic 7
CRM: Automatic Data Capture, Cleanup, and Call Summaries
This chapter assumes you know what a contact record, an activity, and a pipeline stage are in a CRM. It also assumes you have a rough idea of what a large language model (LLM) does. The previous chapters covered the four feature types and the data each platform holds. Here those ideas are applied to the least visible CRM features: the ones that keep the database filled, tidy, and readable.
Why this layer comes first
Lead scoring and forecasting only work as well as the records beneath them. A rep who forgets to log a call leaves a hole in the activity history. Two duplicate contacts split one buyer's engagement across two records. A stale job title sends outreach to the wrong person. Capture and cleanup features reduce these gaps so that downstream models get a more accurate picture. This is why the topic graph places data capture before forecasting.
Four feature families do the work:
| Feature | Typical technique | Output |
|---|---|---|
| Activity capture | Rules and connectors, plus matching logic | Emails, meetings, and calls logged to the right record |
| Deduplication | Similarity scoring (a predictive or rule-based approach) | Merge candidates and merged records |
| Enrichment | Lookups against external data, plus entity matching | Filled fields such as company size or industry |
| Call and meeting summaries | Speech-to-text, then an LLM (generative) | Summary, action items, suggested field updates |
Activity capture
Activity capture connects the CRM to mailboxes, calendars, and phone or video systems. Each message or meeting is turned into an activity record. The hard part is not reading the email. It is deciding which CRM objects the activity belongs to.
A typical capture pipeline works like this:
- Read participant addresses from the email or calendar invite.
- Match each address to a contact. Exact email match is the strongest signal.
- Roll the contact up to an account, and to an open opportunity if one exists.
- Apply privacy rules, such as skipping personal domains or messages marked private.
- Write the activity with a timestamp and a link back to the source.
Step 3 is where errors appear. If a contact is on two open opportunities, the system must choose one or attach the activity to both. Platforms usually apply a rule, such as "most recently modified open opportunity", and some add a model that scores likely matches. Check which approach your platform uses, because it changes how you read engagement reports.
Deduplication
Duplicates arise from form fills with typos, list imports, and reps creating records by hand. Deduplication is usually a pairwise similarity problem. For each candidate pair, compute how alike the names, emails, companies, and phone numbers are. Combine the scores, then compare the result against thresholds.
The two thresholds create three outcomes: auto-merge, send to review, or leave alone. Merging is hard to undo, so the auto-merge threshold should be high. The review band is where a person decides.
The sketch below uses only the standard library. Real platforms add blocking, which compares only records that share a key such as an email domain, because comparing every pair does not scale.
from difflib import SequenceMatcher
import re
contacts = [
{"id": 1, "name": "Dana Whitfield", "email": "[email protected]", "company": "Acme Inc"},
{"id": 2, "name": "Dana Whitfeld", "email": "[email protected]", "company": "Acme, Inc."},
{"id": 3, "name": "Omar Reyes", "email": "[email protected]", "company": "Globex"},
]
AUTO_MERGE = 0.95
REVIEW = 0.80
def normalize(text: str) -> str:
"""Lowercase, drop punctuation, collapse spaces."""
text = re.sub(r"[^a-z0-9 ]", "", text.lower())
return re.sub(r"\s+", " ", text).strip()
def ratio(a: str, b: str) -> float:
return SequenceMatcher(None, normalize(a), normalize(b)).ratio()
def match_score(a: dict, b: dict) -> float:
if a["email"].lower() == b["email"].lower():
return 1.0
same_domain = a["email"].split("@")[1] == b["email"].split("@")[1]
return (
0.60 * ratio(a["name"], b["name"])
+ 0.25 * ratio(a["company"], b["company"])
+ 0.15 * (1.0 if same_domain else 0.0)
)
def decide(score: float) -> str:
if score >= AUTO_MERGE:
return "auto_merge"
return "human_review" if score >= REVIEW else "distinct"
for i in range(len(contacts)):
for j in range(i + 1, len(contacts)):
a, b = contacts[i], contacts[j]
s = match_score(a, b)
print(f"{a['id']} vs {b['id']}: score={s:.2f} -> {decide(s)}")Contacts 1 and 2 score about 0.98 and are flagged for merging. Pairs involving contact 3 land well below the review threshold and stay distinct.
Two failure modes matter in practice:
- False merges. Two real people with the same name at one company ("Chris Lee" in sales and "Chris Lee" in finance) look nearly identical. Weighting name too heavily causes this.
- Survivorship errors. When two records merge, a rule must decide which value wins for each field. A rule such as "most recently updated wins" can overwrite a correct phone number with an older import.
Enrichment
Enrichment fills missing fields from outside sources, for example industry, employee count, or a company's website, given only an email domain. The mechanism is mostly lookup and entity matching rather than generation. The domain acme.com is matched to a company profile in a data vendor's database, and the profile's fields are copied in.
Treat enriched values as claims with a source and a date. Useful practices include:
- Store the source and the time of enrichment next to each value.
- Never let enrichment overwrite a value a rep entered by hand unless the field is configured that way.
- Re-check enriched fields periodically, since job titles and company sizes change.
- Log whether the person consented to profile data being collected, where your rules require it.
Generative models can also infer a field, such as guessing a seniority level from a job title. That is a classification task. It is useful, but the value is a prediction, so label it as one.
Call and meeting summaries
A summary feature is a pipeline, and each stage can fail on its own:
- Recording and consent. Participants are told the call is recorded or transcribed, as the rules in your region require.
- Speech-to-text. The audio becomes a transcript with speaker labels. Accents, crosstalk, and product jargon raise the error rate.
- Summarization. An LLM reads the transcript and produces a summary, action items, and sometimes suggested field updates such as a new close date.
- Write-back. The output is attached to the call activity, and proposed field changes are either applied or queued for approval.
The diagram separates two kinds of output. A summary attached to an activity is low risk, because it is a note a person can read and ignore. A suggested change to a deal amount or close date is higher risk, because forecasts read those fields. This is the same distinction the later chapter on human review builds on.
Known failure modes of summaries
- Omissions. A summary compresses. It can drop a budget objection that mattered more than the rest of the call.
- Fabrication. The model may state a commitment nobody made, such as "customer agreed to a pilot in March". This is a hallucination: fluent text with no support in the transcript.
- Attribution errors. If speaker labels are wrong, "we cannot approve this" may be credited to the wrong side.
- Transcript errors passed through. A misheard product name appears confidently in the summary.
Mitigations include linking each action item to the transcript timestamp it came from, restricting the model to fields with fixed formats, and spot-checking a sample of summaries against recordings each month.
Decision criteria
Use these questions when deciding how much to automate in this layer:
| Question | If yes | If no |
|---|---|---|
| Is the action reversible (a note, a tag)? | Automate it | Add an approval step |
| Does a forecast or report read the field? | Require review | Automation is lower risk |
| Is the match confidence high and measured? | Auto-apply above a tuned threshold | Queue for a person |
| Does the data involve personal or sensitive content? | Apply consent and exclusion rules first | Proceed with standard logging |
What this means for later chapters
Forecasting and next-best-action features read the activities, stage changes, and field values produced here. If capture misses meetings, a deal looks inactive when it is not. If duplicates split an account, engagement looks weaker than it is. When a forecast looks wrong, checking data quality here is often faster than questioning the model.
Exercise
A dedup job auto-merges any pair scoring 0.85 or higher. Two contacts, both named "Chris Lee" at the same company with the same email domain but different departments, are merged and their activity histories combined. Name two changes that would reduce this kind of error, and say what the merged record now does to downstream features.
Show answer
Raise the auto-merge threshold (for example to 0.95) and add a review band so mid-scoring pairs go to a person. Also reduce the weight of name similarity relative to stronger identifiers such as exact email or phone, and add a field such as department or title as a conflict signal that blocks auto-merge. The merged record now combines two people's emails and meetings, which inflates engagement counts for one buyer and distorts anything built on them, such as lead scores or account activity reports. Unmerging is hard, so the cost is higher than a missed duplicate.
Exercise
A call-summary feature proposes changing an opportunity's close date from June to March, based on the rep saying "we'd love to get this done by spring". Should the change be auto-applied? Give your reasoning.
Show answer
No. Close date feeds forecasts, so a wrong value spreads into reports. The remark is a wish, not a commitment, and the model may have misread it. Route the suggestion to the rep for approval, and show the transcript timestamp so the rep can check it quickly. Attaching the summary text itself as a note can stay automatic.