CRM data enrichment: keep HubSpot and Salesforce records complete
How to fill missing fields and fix stale records in HubSpot or Salesforce with an enrichment API, on new leads and on your whole database.
Dag Holmen · Updated · 5 min read
CRM data enrichment means filling in missing fields and fixing stale ones on the contacts, leads and accounts in your CRM, using an outside data source. Done by API, it's two jobs: enrich every new record as it's created, and refresh the records you already have.
Every CRM drifts. People change jobs and titles, companies grow out of their size band, and imported lists arrive half empty. This guide shows how to run enrichment on HubSpot or Salesforce with the B2Benrich API, which fields to map, and the rules that stop a script from overwriting data your team trusts.
What CRM enrichment fixes
- Blank fields. Contacts with no title, accounts with no industry or headcount.
- Stale titles. The "Marketing Manager" in your CRM has been VP Marketing for a year.
- Job changes. The contact's company domain no longer matches the account they're attached to.
- Inconsistent values. "SaaS", "Software" and "software dev" in the same industry field. Enrichment gives you one consistent set of values to segment on.
How it fits together
B2Benrich is a REST API. You connect it to your CRM with your own code or a workflow tool that can make HTTP requests, so you control exactly what gets written. The loop is the same for both CRMs:
- Read the records that need enrichment from the CRM's API.
- Call B2Benrich with the best identifier on each record.
- Decide, field by field, what to write back.
- Update the CRM and stamp the record with when it was enriched.
Pick the match key for each object
| CRM object | Best identifier | Endpoint |
|---|---|---|
| Contact or lead with a LinkedIn URL | LinkedIn profile URL | POST /v1/enrich/person/linkedin-to-person |
| Contact or lead without one | First name, last name, company domain | POST /v1/search/first-last-domain |
| Contact missing an email | First name, last name, company domain | POST /v1/enrich/person/name-domain-to-email |
| Company or account | Website domain | POST /v1/enrich/companies/domain-to-company |
Match accounts on domain, never on the company name alone. If the website field is empty, take the domain from a contact's work email, skipping free providers like gmail.com. The people enrichment API and company enrichment API guides cover each endpoint in detail.
Map fields before you write anything
Decide where each value goes before the first run. A starting map:
| B2Benrich field | HubSpot | Salesforce |
|---|---|---|
job_title | Job title (contact) | Title (lead or contact) |
company_name | Company name (contact) | Company (lead) |
city, state_name, country_name | City, State, Country (contact) | City, State, Country (lead) |
industry | Industry (company) | Industry (account) |
employees_range | Custom text property | Custom text field |
revenue_range | Custom text property | Custom text field |
linkedin_url | Custom property | Custom field |
Headcount and revenue come back as ranges, so give them their own text fields instead of forcing them into a numeric field. Add three more custom fields to every enriched object: the B2Benrich ID, enriched_at, and an enrichment status (found, not found, conflict).
Rules that keep enrichment from wrecking your CRM
Fill blanks by default. Write a value only when the CRM field is empty. That one rule prevents most of the damage.
Never overwrite a human. If a rep edited the field, leave it. Most CRMs record who last changed a field. If yours makes that hard to check, write enriched values to separate fields and let a rule or a person promote them.
Flag conflicts, don't resolve them silently. When the enriched title differs from a filled-in title, store the new value and mark the record. Someone can review conflicts in a list view.
Treat a domain change as a job change. If a contact's enriched company_domain doesn't match their account's domain, they probably moved. Don't re-parent the contact automatically. Flag it, create a task, and decide whether to follow them to the new company.
Record misses. Store "not found" with a date so the job skips that record until the next scheduled refresh, instead of calling it again every hour.
Here's the fill-blanks logic as a function. crm stands in for your CRM client:
const BASE = 'https://api.b2benrich.com';
const headers = { 'Content-Type': 'application/json', 'X-Api-Key': process.env.B2BENRICH_KEY };
async function enrichContact(contact) {
if (!contact.linkedin_url) return; // fall back to name + domain in a real job
const res = await fetch(`${BASE}/v1/enrich/person/linkedin-to-person`, {
method: 'POST', headers, body: JSON.stringify({ input: contact.linkedin_url })
});
const now = new Date().toISOString();
if (!res.ok) return crm.updateContact(contact.id, { enrich_status: 'not_found', enriched_at: now });
const p = await res.json();
const patch = { b2benrich_id: p.id, enriched_at: now, enrich_status: 'found' };
const fill = (field, value) => { if (!contact[field] && value) patch[field] = value; };
fill('job_title', p.job_title);
fill('city', p.city);
fill('state', p.state_name);
fill('country', p.country_name);
if (contact.job_title && p.job_title && contact.job_title !== p.job_title) {
patch.enriched_job_title = p.job_title;
patch.enrich_status = 'conflict';
}
if (contact.account_domain && p.company_domain && p.company_domain !== contact.account_domain) {
patch.enrich_status = 'job_change';
}
await crm.updateContact(contact.id, patch);
}
Enrich new records as they arrive
Most CRMs can run a workflow or fire a webhook when a record is created. Point it at a small service that runs the function above. If you'd rather not run a webhook endpoint, a scheduled job that pulls records created since the last run does the same thing a few minutes later.
Backfill your whole database
For the existing base, export the records, dedupe on LinkedIn URL, name plus domain, and domain, run them through the API, and write back with your CRM's batch update endpoints. Keep concurrency modest and log every result. Because B2Benrich is unlimited API usage for $500 a month with no credits, enriching every record in the CRM doesn't cost more per record, so there's no reason to enrich only a sample.
Choose a re-enrichment cadence
There's no correct interval, so set one per segment. Contacts in active sequences and open deals are worth refreshing right before you work them. Accounts you're targeting next quarter can be refreshed before the campaign. The long tail can wait longer. Use enriched_at to pick the oldest records each run.
Emails age fastest. Before a large send, run addresses through an email verification check, because a contact that enriched fine last quarter can bounce today. For the broader picture of enrichment beyond the CRM, see what is data enrichment.
Frequently asked questions
- What is CRM data enrichment?
- Filling in missing fields and updating stale ones on CRM contacts, leads and accounts with data from an outside source. With an API, you enrich new records as they’re created and refresh existing records on a schedule you set.
- How do I enrich HubSpot contacts with an API?
- Read contacts from HubSpot’s API or trigger a workflow on contact creation, send each contact’s LinkedIn URL or name and company domain to an enrichment endpoint, and write the results back to contact properties. Fill only empty properties unless you’ve decided otherwise.
- How do I enrich Salesforce leads and accounts?
- Match leads and contacts on LinkedIn URL or name plus company domain, and accounts on website domain. Call the matching enrichment endpoint for each record, then write back with Salesforce’s API, storing ranges like headcount in text fields.
- Will enrichment overwrite data my reps entered?
- Only if your script lets it. A safe default is to write to empty fields only, store differing values in separate enriched fields, and flag conflicts for review instead of replacing what a person typed.
- How often should I re-enrich my CRM?
- Set it per segment. Refresh contacts in active sequences and open deals right before you work them, target accounts before each campaign, and the rest on a slower schedule. An enriched_at field makes it easy to pick the oldest records each run.
Related guides
- People enrichment API: from a LinkedIn URL to a full profileHow a people enrichment API works, which fields come back, and how to enrich contacts from a LinkedIn URL, a name and domain or an ID.
- Company enrichment API: firmographics from a domainTurn a domain, LinkedIn URL or LinkedIn ID into a company record: industry, size, revenue range, location and tech stack, over one API call.
- What is B2B data enrichment? A guide for buildersWhat B2B data enrichment is, the people and company fields you can add, how enrichment works over an API, and how to run it on your own lists.