CRM Hygiene
38
Proposed tonight
12
Duplicates
26
Field fixes
| Record | Problem | Proposed change | Evidence | Owner |
|---|---|---|---|---|
| Acme Corp | Duplicate account | Merge into Acme Corporation | Same domain, same billing address | R. Diaz |
| J. Chen | Duplicate contact | Merge into Jamie Chen | Same email, one older record | M. Patel |
| Northwind Ltd | Industry blank | Set to Logistics | Company website and 3 sibling accounts | R. Diaz |
| Globex | Country is 'USA' | Set to United States | Picklist value required | A. Novak |
What matters here
- A CRM hygiene agent proposes merges and field fixes with evidence, and the CRM changes only after the record owner approves.
- Merging is the riskiest write in a CRM, so the merge tool always waits for approval and names which record survives.
- Rules catch the obvious problems, and the agent handles the judgment calls rules miss, such as two account names for one company.
- Routing each proposal to the record owner puts the decision with the person who knows the account.
- Every proposal, approval and change is logged, so a bad merge can be traced to who approved it and why.
Who this is for
You run revenue operations or own the CRM. You know duplicates and blank fields are costing you routing and reporting accuracy, and a one-time cleanup never stays clean.
How it works in practice
A nightly pass, and a morning queue of proposals the owners can clear in minutes.
- 1
A scheduled run starts
A scheduled function runs the agent each night over records created or changed since the last run.
- 2
It finds likely duplicates
Same domain, same email, near-identical names and addresses. The agent judges the close calls rules miss.
- 3
It checks fields against your rules
Required fields, picklist values, formats such as country and phone, and values that contradict each other.
- 4
It proposes with evidence
Each merge names the record that survives and why. Each fix shows the old value, the new one and where it came from.
- 5
The owner approves
merge_records and update_fields are marked for approval. The owner approves, edits or declines each proposal.
- 6
It applies and logs
Approved changes go to the CRM, and the run log records who approved what.
What a CRM hygiene agent is made of
Rules for the obvious, the agent for judgment, and approval on every write.
Your data rules
Required fields, allowed values and formats, kept in the app's database where revenue operations can edit them.
Find tools
Search for likely duplicates and records that break a rule. Read only.
Two write tools, gated
merge_records and update_fields, both marked for approval, so every change waits for the owner.
A proposal queue
Each proposal with its evidence, its owner, and its outcome: approved, edited or declined.
The prompts
Paste these into Claude Code, Codex or Cursor in order. Each one leaves you with something that runs, so you can stop after any step.
These prompts start from a Helix project, which is what handles sign-in, credentials and hosting. Start with Helix.
Rules and the proposal queue
What clean means, and where proposals wait.
Create a Helix app: a CRM hygiene agent with a proposal queue.
Store data rules that revenue operations can edit: required fields per object, allowed values for picklists, formats for country, state and phone, and pairs of fields that must agree.
Store proposals: the record, the problem, the proposed change, the evidence, the record owner, and the outcome (waiting, approved, edited, declined) with who decided and when.
Show each owner their own waiting proposals, with approve, edit and decline on each, and a way to approve several at once.
The agent and its tools
Find, judge, propose, wait.
Add an agent to the app that finds and proposes CRM fixes.
Give it these tools:
- find_duplicates: return groups of likely duplicate accounts, contacts
or leads, with what they share.
- find_rule_breaks: return records that break a data rule, and which rule.
- lookup_company: read company details from an outside source.
- merge_records: merge records into the one that survives.
- update_fields: set field values on a record.
Mark merge_records and update_fields as needing approval every time.
For each duplicate group, propose which record survives and why: most activity, most complete, oldest. For each rule break, propose the fixed value and where it came from. If the evidence is weak, say so and do not propose a change.
Run it every night
Hygiene that keeps up with the data.
Run the agent every night over records created or changed since the last run, and once a week over everything.
In the morning, post each owner a Slack message with how many proposals they have and a link to their queue.
Show a weekly view: proposals made, approved, declined, and the share of records that pass every rule.
Connect it to real systems
Your CRM, your data sources.
Now connect it to the systems we actually run.
Anything in angle brackets is a placeholder. Swap it for whatever we use.
<Salesforce>. Read accounts, contacts and leads, and merge or update them when a proposal is approved.
<Clearbit>. Read company details to fill blank fields.
<Slack>. Send each owner their morning summary.
Only write through merge_records and update_fields. Everything else is read only.
Ship it
A URL, and the owners on it.
Deploy my app.
What it connects to
The agent reads the CRM and outside sources, and writes back only after approval.
-
Salesforce Read accounts, contacts and leads, and merge or update them after approval. Reads and writes
-
HubSpot The same, if that is your CRM. Reads and writes -
Clearbit Read company data, such as industry and size, to fill blank fields. Reads -
Slack Tell each owner they have proposals waiting. Writes
Named systems are the ones most teams actually run, not a list of the only ones that work. Swap in whatever you use.
Running it for real
The build gets you a working agent. It changes your system of record, so approvals, credentials and the log matter most.
- 1
Deploy the app and its agent together
One command, or Deploy from CI on every merge, takes the app to a live URL. The agent ships with its app, so you can roll back any deployment.
- 2
Approval on every merge and fix
merge_records and update_fields wait for the record owner, who sees the tool and the exact change. SSO decides who owns what.
- 3
Credentials held by Tray
The CRM credential is held in Tray, not in the code, so it can be rotated without a redeploy.
- 4
A named owner and every step logged
The app and its agent have a named owner. Every run, proposal and approved change is logged, and Tray streams the logs to your SIEM.
- 5
Know what a clean CRM costs
AI usage shows per app, so the nightly run's cost is visible next to the records it fixed.