---
title: "Keeping CRM data clean | mcpcrm guide"
url: https://mcpcrm.app/guide/clean-data/
description: "An AI agent can avoid duplicates, write names, phone numbers and dates in one format, and respect consent and opt-outs. This chapter also covers when to change a status rather than delete a record."
---

Chapter 5 of 10

# Keeping CRM data clean

An agent can create records faster than any person, so it can also make a mess faster. These rules come from the standard CRM manual that mcpcrm gives every agent. They keep your data clean whether a person or an agent does the work.

## Search before you create

From the CRM manual: Before you create a record

-   Search first: by email address, then phone number, then company name. If the person or company is already there, update that record instead of creating another.
-   One person is one Contact and one company is one Organisation. When someone moves to another company, change their Organisation and add a comment.
-   If you find two records for the same person or company, tell the person you work for. Do not merge them unless they ask; when they do, use merge\_records, which keeps everything linked to both.

Duplicates are the most common mess in any CRM, and an agent that creates records without searching makes them quickly. Search in this order because an email address is the most reliable match, a phone number the next, and a company name the least, since people spell names in many ways.

When two records turn out to be the same person, the agent should tell you and let you decide which one to keep. Merging by deleting loses history if the wrong record goes.

## One format for names, numbers and dates

From the CRM manual: Writing data

-   Use only the fields describe\_module lists, and only the values a picklist offers.
-   First and last name go in their own fields, in normal capitals. Email addresses in lower case. Phone numbers with the country code, for example +27 21 555 0100. Dates as YYYY-MM-DD.
-   One value per field. Leave a field empty when you do not know the answer; never guess or invent names, numbers or companies.
-   Record where a Lead came from (Lead source) and who referred them when you know it.

One format makes records easy to search and sort, and makes duplicates easy to spot. A phone number with the country code matches whether the person wrote 021 555 0100 or +27 21 555 0100.

The rule that matters most is to leave a field empty rather than guess. An empty field shows that nobody knows the answer, while a guessed email address bounces and a guessed name embarrasses you in front of a customer.

## Consent and opt-outs

From the CRM manual: People's data and consent

-   Never contact someone on the do-not-contact list or who has said no. Record an opt-out as soon as you see one.
-   Keep only what the business relationship needs. Do not store ID numbers, bank details, health or other sensitive information unless the workspace's rules say so.
-   Do not copy CRM data into other tools or documents unless the person you work for asks.

Data protection laws such as the GDPR in Europe and POPIA in South Africa expect you to keep only what you need and to respect a request to stop contacting someone. An agent that reads every email can record an opt-out the moment it appears, which is faster than most people manage.

## Change a status, and delete only mistakes

From the CRM manual: Changing and deleting

-   Prefer a status change to a delete. Delete only clear mistakes and duplicates, and only when asked.
-   Make small, specific changes. For many records, say what you will change and how many first, work in batches, and stop at the first CONFIRM\_REQUIRED.
-   Do not change who a record is assigned to, or edit records another person is working on, unless asked.

A Lead marked Lost Lead or Junk Lead, with a comment, tells the next person not to contact them again. A deleted lead tells nobody anything, and next year the same business can be imported again from a new list.

There are good reasons to delete: a test record, a clear duplicate once its details are copied to the record you keep, and a request from a person to erase their data under the GDPR or POPIA. A person handles an erasure request, because it is a legal request.

## A worked example: cleaning up after an import

1.  ### The owner asks for duplicates
    
    A design studio has imported 900 contacts from an old spreadsheet. The agent lists 37 groups of possible duplicates, matched by email address, then phone number, then name, and marks the most complete record in each group.
    
2.  ### She chooses what to keep
    
    For each group she picks the record to keep. The agent copies missing phone numbers onto it and adds a comment to each duplicate saying which record it duplicates.
    
3.  ### She deletes the duplicates herself
    
    The agent has the member role, so it cannot delete. She deletes the duplicates from the list view in one step.
    
4.  ### The agent fixes phone numbers in batches
    
    It adds the country code to 412 phone numbers in batches of 50. At the workspace’s limit of 50 changes in 10 minutes it stops with `CONFIRM_REQUIRED`, and she allows the session in the agent monitor.
    
5.  ### It leaves gaps it cannot fill
    
    It lists 23 contacts with no lead source and suggests a value for each from their first email. She accepts 19 and leaves 4 empty, because nobody knows how those contacts found the studio.
    

The agent did the slow work of matching and fixing, and the owner made every decision that could lose data.

## Prompts for clean data

### Find duplicates

```
Look for duplicate Contacts and Organisations: the same email address, the same phone number, or names that differ only in spelling or capitals. List each group with record IDs and say which record looks most complete. Merge and delete nothing. I will decide.
```

### Fill in missing details

```
List Leads with no lead source, no email address or no phone number. For a missing lead source, suggest a value from the description and the first email. For missing contact details, look only on the company’s own website and give the page address as the source. Never guess an email address from a pattern.
```

### Record opt-outs

```
Search the emails and comments of the last 30 days for anyone who asked not to be contacted again. List them with the words they used. When I confirm, record the opt-out the way this workspace does it, set any Lead among them to Junk Lead, and add a comment with the date and their words.
```

The [clean-up routine](https://mcpcrm.app/guide/daily-routines/#cleanup) has one more, for fixing formats in batches.

## In mcpcrm

mcpcrm records every change with its author and the values before and after, so you can see who changed a record and undo an agent session. Agents use only the fields `describe_module` lists, and a picklist accepts only its own values. `import_records` can match on a field such as email address and update the existing record instead of creating a duplicate.

[Custom fields, history and undo in mcpcrm](https://mcpcrm.app/solo/)

## Try it with your own agent

mcpcrm Solo is free for one person and runs in your browser. Connect your agent, and it gets the CRM manual and your rules when it connects. Then start with the prompts in this guide.

[Open the app](https://app.mcpcrm.app)[Get the prompt pack](https://mcpcrm.app/guide/prompts/)
