Sub topic 2
What data email, CRM, and analytics platforms give their AI features
This chapter assumes you know what a contact record, a campaign, and a dashboard are. It also assumes a basic idea of how machine learning models and large language models work. The question here is practical: when a platform advertises an AI feature, which data does the feature read, and how good is that data?
Why data decides what a feature can do
An AI feature is a model plus the data it is allowed to see. The model is often a standard technique. The data is specific to the platform. A send-time optimizer can only work in a tool that records when messages were opened. A lead score can only work in a tool that records what happened to past leads. If a platform lacks the data, the feature will be weak or missing, whatever the vendor's marketing says.
Two questions help when you assess any feature:
- What does the feature read (its inputs)?
- What does it learn from (its outcomes, if it is predictive)?
The data each platform holds
Each platform type has a native data shape. Features are built around it.
| Platform | Core records | Typical event data | Features that depend on it |
|---|---|---|---|
| Email marketing | Contacts, lists, segments, campaigns, templates | Sends, deliveries, opens, clicks, bounces, unsubscribes, spam complaints | Send-time choice, segmentation, subject-line testing, drafting from past campaigns |
| Inbox and email clients | Messages, threads, labels, calendars | Reads, replies, moves, deletes, spam reports | Triage, summaries, suggested replies |
| CRM | Contacts, accounts, leads, opportunities, activities | Stage changes, calls, meetings, emails logged, closed-won and closed-lost outcomes | Lead scoring, forecasting, activity capture, deduplication |
| Analytics | Metrics, dimensions, tables, dashboards | Page views, sessions, orders, signups, time series | Anomaly detection, automated insights, natural-language queries |
Email data
Email platforms hold a profile for each subscriber and a log of what happened to every message. The profile usually has an address, a name, signup source, preferences, and consent status. The log has delivery and engagement events.
Engagement data is noisier than it looks. Some mail clients preload images, so an "open" may be a machine and not a person. Click data is more reliable, but it can also be inflated by security scanners that follow every link. A model trained on opens inherits that noise.
Generative email features read different inputs. A drafting feature reads the prompt you give it, your brand voice settings, and sometimes past campaigns. It does not need outcome labels to produce text.
CRM data
A CRM holds structured records and a history of activities. The most valuable fields for AI are the outcome fields: whether a lead converted, whether an opportunity was won or lost, and the dates of stage changes. A predictive score learns from those outcomes.
CRM data is only as complete as people make it. Reps skip logging calls, leave fields blank, and create duplicate contacts. That is why vendors add automatic activity capture, which reads email and calendar data to log meetings, and deduplication. These features improve the data that other features then use.
Analytics data
Analytics platforms hold metrics (numbers such as revenue) split by dimensions (categories such as region or channel), usually over time. Anomaly detection and forecasting read the time series. Natural-language query features read the schema: table names, column names, and descriptions. They translate a question into a query over that schema. They do not usually read your raw rows to answer.
From raw events to model inputs
Models rarely read raw logs. The platform turns events into features, which are numeric or categorical inputs such as "pricing page views in the last 30 days." The set of features built for a model is often kept in a table with one row per contact.
Predictive models also need a label, which is the outcome to predict. For lead scoring the label is "became a customer."
One rule matters more than the others. Features must be computed only from data available before the moment of prediction. If you include information from after that moment, the model looks accurate in testing and fails in production. This error is called data leakage.
The example below builds a tiny feature table with a cutoff date. Events up to the cutoff become features. A purchase after the cutoff becomes the label.
from collections import defaultdict
from datetime import date
events = [
("ana", "email_open", date(2026, 3, 1)),
("ana", "pricing_view", date(2026, 3, 5)),
("ana", "purchase", date(2026, 3, 20)),
("ben", "email_open", date(2026, 3, 2)),
("ben", "email_open", date(2026, 3, 8)),
("cy", "pricing_view", date(2026, 3, 12)),
]
cutoff = date(2026, 3, 10)
contacts = sorted({contact for contact, _, _ in events})
features = {c: defaultdict(int) for c in contacts}
labels = {c: 0 for c in contacts}
for contact, kind, day in events:
if day <= cutoff:
features[contact][kind] += 1 # known at prediction time
elif kind == "purchase":
labels[contact] = 1 # outcome observed after the cutoff
for c in contacts:
print(
c,
"opens:", features[c]["email_open"],
"pricing_views:", features[c]["pricing_view"],
"bought_later:", labels[c],
)The output shows Ana with one open, one pricing view, and a later purchase. Ben has two opens and no purchase. Cy has no activity before the cutoff, so every feature is zero. The pricing view on March 12 is ignored, because it happened after the cutoff.
How the data flows
Data moves from source systems into a store, is shaped into features, and then feeds the model or the feature. Generative and retrieval features add a step that pulls relevant records into the prompt.
Data quality problems that break features
These errors show up often. Most can be checked before you switch a feature on.
Too little history
A predictive model needs enough past examples of each outcome. A new CRM with 40 closed deals cannot support a reliable lead score. Many vendors set a minimum, and some fall back to generic rules or a pooled model trained across customers. Ask which one you are getting.
Unbalanced or biased history
If past reps only worked leads from large companies, the history says little about small companies. The model learns the old process, not the true likelihood of conversion. It then repeats that bias in its scores.
Stale or missing fields
A job title field that is 60% empty gives the model little to work with. Enrichment features can fill gaps from third-party sources, but they add their own accuracy and consent questions.
Duplicates and identity errors
When one person has three contact records, their activity splits across them and each record looks inactive. Segmentation, scoring, and attribution all degrade.
Mismatched definitions
"Active user," "conversion," and "revenue" can mean different things in the CRM and the analytics tool. An anomaly alert or a natural-language answer built on the wrong definition is confidently wrong. Many analytics platforms address this with a semantic layer, which is a shared set of named metric definitions.
Leakage
A field such as "deal closed date" or "unsubscribed" can leak the outcome if it is filled in after the event and included as an input. Check that every input would have been known at prediction time.
Consent and access limits
Data is not free to use just because the platform stores it. Consent records decide which contacts can receive email and which data can be used for personalization. Role-based access decides which records a user, and an AI feature acting for that user, may see. A natural-language query feature should respect the same permissions as the dashboard it queries. If it does not, it can reveal data to people who were never allowed to see it. Chapter 15 covers privacy and bias in more depth.
Checklist before turning on an AI feature
- Name the inputs the feature reads, and confirm each one is populated for most records.
- For predictive features, confirm there are enough past outcomes, and that the label means what you think it means.
- Check for duplicates and for fields filled in after the outcome.
- Confirm that consent and permissions are applied to the feature's inputs and outputs.
- Keep a baseline from before the feature was enabled, so you can measure its effect later.
Exercise
A CRM vendor offers a lead score trained on your own history. Your CRM has 2,000 leads, but the "became a customer" field is filled in only for leads that a rep manually updated, and reps update it only after a sale closes. Name two data problems this creates and one check you would run before trusting the score.
Show answer
First, the label is missing or wrong for many leads. Leads that never closed are likely left blank, and the model may treat a blank as "not converted" without telling you, or may train on a small, unrepresentative subset. Second, if the field is set only after a sale, other fields updated at the same time (such as deal close date or stage) can leak the outcome into the inputs. A useful check is to rebuild the training table with a cutoff date, using only data known at that date, and compare the score's accuracy on leads that arrived after the cutoff. You can also count how many leads have a reliable label before training.