B2B Lead Enrichment in Claude Code: Prospect, Enrich, Score, Sync to the CRM
A Claude Code agent with the Cargo skills runs B2B lead enrichment in five steps: search leads, find emails with a 0.1-credit first pass and a waterfall on the misses, verify, score, and upsert into the CRM with duplicates set to fail. Each step below is the command the agent runs, its list price, and the setting that keeps it from doing damage. Installing the CLI and skills is covered in run go-to-market from Claude Code; this page starts where that one ends.
CLI or MCP: pick by where the agent runs #
| Interface | Use it when | Limit |
|---|---|---|
cargo-ai CLI plus skills | Claude Code has a shell, the normal case | None: batches, workflows and deploys all go through it |
MCP at https://mcp.getcargo.io/mcp | The client has no shell (Claude Desktop, ChatGPT), or you want one call mid-conversation | Runs actions and reads data; projects are deployed from the CLI |
Public MCP at https://mcp.getcargo.io/public | You are pricing a job before signing up | Lists and prices actions, runs nothing |
Rule of thumb: anything you will run twice belongs on the CLI, because only the CLI can turn it into a deployed workflow (last section).
The brief, and what each step costs #
Give the agent the targets, the fields and the ICP rules in a file it can read, then the job:
Find VP and Director of Sales at US B2B software companies with 51 to 500
employees. Get verified work emails, score each lead against context/icp.md,
and show me a 5-lead sample with its cost before running the rest.
The agent works cheapest-first and sends only the gaps to the next step. List prices from pricing.json, checked December 5, 2026:
| Step | Action | Credits |
|---|---|---|
| Pull leads | aiArk.searchPeople | 0.05 per lead returned |
| Pull leads, LinkedIn filters | salesNavigator.searchLeads | 0.2 per lead returned, no LinkedIn seat |
| Work email, first pass | aiArk.enrichPerson (person ID from the search) | 0.1, not charged when no email is found |
| Work email, misses only | Find email tool (email_waterfall) | 1.1 to 4 per call, by how far down the waterfall it goes |
| Verify | Verify email tool (email_validator) | 0.2 |
| CRM write | hubspot.upsertRecords (and Salesforce, Attio) | 0 |
Worked example, 1,000 leads, assuming 400 come back from the first pass with no email: search 50 credits, first pass 100, waterfall on the 400 misses 440 to 1,600, verification 200. That is 790 to 1,950 credits, or $63 to $156 pay as you go at $0.08 a credit. Sending all 1,000 straight to the waterfall instead would cost 1,350 to 4,250. Your miss rate is the number that matters, so read it off the pilot. Orchestration steps are metered on top of action prices, and a connector on your own provider key spends no Cargo credits on the action.
1. Pull the leads #
cargo-ai orchestration action execute \
--action '{"kind":"connector","integrationSlug":"aiArk","actionSlug":"searchPeople"}' \
--data '{
"jobRole": {"title_or": ["VP Sales", "Director of Sales"], "seniority_or": ["vp", "director"]},
"industry": {"industry_or": ["software development"]},
"employeeSize": {"min_employee_count": 51, "max_employee_count": 500},
"personLocation": {"location_or": ["United States"]}
}' \
--wait-until-finished
AI Ark takes plain values; Sales Navigator takes LinkedIn’s numeric codes, and a name in place of a code is not translated. Both sets of filters are in find B2B leads by job title, company and keyword.
2. Find and verify work emails, cheapest first #
First pass: aiArk.enrichPerson takes the person ID the search returned (or a LinkedIn URL) and returns a verified email at 0.1 credits, with nothing charged when it finds none. Pilot it with --limit 5:
cargo-ai orchestration action execute-batch \
--action '{"kind":"connector","integrationSlug":"aiArk","actionSlug":"enrichPerson"}' \
--records '[{"rowId":"lead_1","id":"<person id from the search>"}]' \
--limit 5 --wait-until-finished
Second pass, on the rows that came back empty only: the Find email tool, a preset in every workspace. In Cargo’s code today it tries FindyMail, FullEnrich, Apollo, People Data Labs and Waterfall, checks each candidate with ZeroBounce, and stops at the first valid address. Address it by template slug so the command works in any workspace:
cargo-ai orchestration action execute-batch \
--action '{"kind":"tool","templateSlug":"email_waterfall"}' \
--records '[{"rowId":"lead_7","firstName":"Ada","lastName":"Lovelace","companyDomain":"example.com"}]' \
--wait-until-finished
It needs first name, last name and company domain, or a LinkedIn URL: a company name alone does not resolve. Then verify, with the input key email:
cargo-ai orchestration action execute-batch \
--action '{"kind":"tool","templateSlug":"email_validator"}' \
--records '[{"email":"ada@example.com"}]' \
--wait-until-finished
cargo-ai orchestration batch download --uuid <batch uuid> returns a CSV with your input columns, so pass a rowId of your own in each record to join results back.
3. Score against the ICP #
Split the score in two, and keep the reason as a column next to it:
- Rules the fields settle (headcount in range, industry on the list, seniority): the agent writes a function over the CSV. Deterministic, free, and a rep can read why a lead scored 80.
- Judgement the fields do not settle (“does this company sell to businesses?”): Cargo’s native classifier, at 0.01 credits per 1,000 tokens, with the rubric kept in the repo.
Do not send the whole decision to a model. A score that changes between runs on the same lead is the fastest way to lose the sales team. More on the split in LLM-powered lead scoring.
4. Upsert into the CRM, with duplicates set to fail #
cargo-ai orchestration action execute-batch \
--action '{"kind":"connector","integrationSlug":"hubspot","actionSlug":"upsertRecords"}' \
--records '[{"objectType":"contacts","matchingPropertyName":"email","matchingValue":"ada@example.com","isFailingOnMultipleMatches":true,"mappings":[{"propertyName":"jobtitle","value":"VP Sales"}]}]' \
--limit 5 --wait-until-finished
Three settings decide whether this is safe:
isFailingOnMultipleMatches: true. Off by default, and then every matching record gets the write. On, a row matching two contacts fails and writes nothing; list those rows withcargo-ai orchestration run list --batch-uuid <uuid> --statuses errorand hand them to a person.skipIfExiston a mapping. Writes the property only if it is empty, so enrichment never overwrites what a rep typed.- Your own property names.
jobtitleis a HubSpot default; custom fields differ per portal.
Salesforce and Attio have the same upsertRecords and updateRecords. Per-CRM detail: HubSpot, Salesforce, Attio.
5. Turn it into a workflow #
When the job should run every Monday or on every new CRM contact, have the agent declare it as a project:
cargo-ai project init acme-gtm
cd acme-gtm
cargo-ai project plan # prints the diff against the workspace
cargo-ai project deploy
The workflow is then TypeScript in a repository, reviewed as a pull request, and every run is traced: when an email comes back empty, the trace shows which providers were asked.
When this is the wrong setup #
- Nobody on the team reads code or directs an agent. Cargo assumes someone does. A spreadsheet tool with templates fits that team better.
- You want bulk unsolicited outreach. The Cargo skills gate every step that touches a person on a consent basis, a suppression list and a volume limit, and they refuse purchased or scraped lists and consumer targeting.
- You only ever need emails for a few hundred contacts a month, by hand. A pay-on-find email tool with a web app is simpler. The case for this workflow is the chain: scoring, CRM rules and a schedule. See waterfall enrichment tools compared.
Frequently asked questions #
In a terminal, the cargo-ai CLI with the Cargo skills: it covers search,
the email waterfall, verification and CRM writes, and can deploy the result
as a workflow. Without a shell, the hosted MCP server at
https://mcp.getcargo.io/mcp.
At list prices, about 790 to 1,950 credits ($63 to $156 pay as you go) if
the 0.1-credit first pass finds 600 emails and the waterfall handles the
other 400: 50 to search, 100 for the first pass, 440 to 1,600 for the
waterfall, 200 to verify. Run a 5-lead pilot with --limit 5 to read your
real miss rate first.
Set isFailingOnMultipleMatches: true on updateRecords or
upsertRecords. A row whose key matches more than one record then fails and
writes nothing, instead of updating every match.
Build this workflow instead of reading about it.
Cargo is the GTM infrastructure your coding agent builds on: enrichment, scoring, routing and outreach, defined in code and run in production.