Why AI projects stall on data
Imagine a support agent asked to check a customer's contract. It finds three customer records with slightly different names; the CRM says the account is active, billing says it was cancelled last month, and the status field holds values typed by hand over the years. A person on the team knows which record is real and which system to believe. The agent does not, and it answers confidently from whichever record it found first.
That is the usual pattern: the model works in the demo, then stalls on real records. People quietly compensate for messy data every day, and automation removes that safety net. So data work belongs at the start of the plan, scoped to the workflow, not in a cleanup project after launch.
Decide which system owns each field
For every piece of data the workflow uses, name one system of record: the place where it is created and corrected. Other systems copy it and never overwrite it.
| Data | System of record (example) | Other systems |
|---|---|---|
| Customer contact details | The CRM | Billing and the help desk read a copy |
| Prices and products | The ERP or product catalogue | The store and the quoting tool read them |
| Invoices and payments | The accounting system | The CRM shows their status only |
| Tickets and conversations | The help desk | The CRM links to them |
When two systems both let people edit the same field, decide which one wins and close the other route, or the records will drift apart again a week after the cleanup.
Duplicate records and identity matching
- Normalise before you compare. Lowercase emails, put phone numbers in international format, strip spaces and punctuation from IDs, and convert Eastern Arabic digits to Western ones.
- Match exact keys first. A tax number, a customer ID or a verified email links records with little doubt.
- Then match fuzzily, with a score. Names and addresses need similarity rules, and Arabic names need more: one person can appear as Mohammed, Muhammad or Mohamed in English, and with letter variants in Arabic.
- Send uncertain pairs to a person. A review queue shows the two records side by side. Auto-merging on a name alone joins different people and different companies.
- Link before you merge. Keep a crosswalk from each system's IDs to one master record, with survivorship rules that say which value wins. Deleting the originals loses history and breaks integrations.
This is the core of master data management, and it can start small: one entity, such as customers, for one workflow.
Inconsistent fields and reference data
Free text in fields that should hold a fixed set of values is the second big cause of bad automation. 'Closed', 'closed won', 'Won' and 'done' may or may not mean the same thing, and no model should guess. Fix it in three steps: agree the allowed values and their meanings, map the old values to them in a table someone owns, then enforce the list at entry with drop-downs and validation so the mess does not come back.
Bilingual data needs one more rule. A product or status shown in Arabic and English is one code with two labels, not two values, so a report or an agent never counts the same thing twice. The same goes for units, currencies, dates and country names: store one canonical form and translate it for display.
Keeping systems in step
| Pattern | Fits | Watch out for |
|---|---|---|
| Events and webhooks | Changes that matter within seconds, such as a new order | Missed or repeated events: process each one idempotently and keep a replay log |
| Change data capture | Copying every change from a database you control | Schema changes upstream, so it needs monitoring |
| Scheduled batch sync | Nightly reporting and large reference tables | Stale data between runs, so show when it last ran |
| An integration platform (iPaaS) | Connecting SaaS tools with standard connectors | Logic scattered across many small flows that nobody owns |
| API lookup on demand | An agent checking the live value at the moment it needs it | Rate limits and latency, so cache with care |
Whatever the pattern, the same rules apply: every write is safe to repeat, conflicts follow the system-of-record rules, deletions are handled explicitly, and a sync that falls behind raises an alert. The automation side is covered on our workflow automation page.
Data contracts between systems and the AI
A data contract is a written agreement between the team that produces data and the systems that consume it. It states:
- The fields, their types and what each one means, in plain words.
- The allowed values, and which fields may be empty.
- The owner, and how fresh the data must be.
- The quality checks that run on every load.
- How changes are announced and versioned, so a renamed field does not silently break an agent.
The checks run in the pipeline and fail loudly: a load with too many missing values or an unknown status is stopped and reported, not passed to the AI. An agent that receives no data is a visible problem; an agent that receives wrong data is a hidden one.
Permissions and personal data travel with the records
Copying data into a warehouse, a search index or a vector store must not widen who can see it. Carry the access rules with the data, or filter at query time, so the agent shows each user only what the source system would show them. Copy only the personal data the workflow needs, mask it where you can, and set a retention period so the copy does not outlive the original. Every project starts with a threat review that maps these flows, and our AI security page covers leakage through retrieval.
What to fix first
- Map the one workflow you plan to automate, and list the fields it reads and writes.
- Profile those fields: duplicates, empty values, inconsistent values and disagreements between systems.
- Fix identifiers and keys first, because everything else hangs on them.
- Then fix the fields the agent decides on, then the fields it only displays.
- Leave history and unrelated data for later. Do not try to clean everything.
- Measure before and after: duplicate count, completeness of required fields, sync delay and failed checks.
Our article on preparing your data for AI covers documents and ownership, and CRM automation shows pipeline reporting built on clean CRM data. This work is part of AI agents and automation, and a discovery sprint is a common way to profile the data before anyone commits to a build.