Office hours: Build your self-driving GTM engine·Oct 29, 9:00am PT, onlineRegister→
Cargo
  • PrimitivesData ModelsYour companies, contacts and deals, merged from every sourceContextWhat your team knows, as files every agent readsTerritoriesWho sells where, defined onceMailboxesMailboxes in your reps' names, warmed up and kept under limitsToolsThe actions your agents, plays and reps callAgentsAI that researches, decides and writes, reading your contextPlaysWorkflows that run on a trigger or a schedule, with retriesAppsInternal apps for your reps, hosted on Cargo
    Add-onsChrome ExtensionSell faster, right in your browserButtonTrigger AI agents inside your CRMFormTurn any tool into an embeddable formSlackTag Cargo in Slack. It does the GTM workGitHubPlan on every pull request, deploy on merge
    MoreProjectsDefine your entire GTM in codeCLIUse Cargo from your terminalMCPUse Cargo from Claude and ChatGPTDeveloper resourcesCargo API docs, OpenAPI spec, auth docs, webhooks, MCP serverAPI ReferenceExplore the Cargo APIDocumentationLearn how to use CargoIntegrationsConnected to your entire GTM stack
  • VeriffHow Veriff replaced MuleSoft with Cargo under NetSuite, Stripe and SalesforceAugmentHow Augment Code routes developer sign-ups to reps in under an hourWeights & BiasesHow Weights & Biases ships a new purchase signal in 2 days on CargoSee all
  • Pricing
  • Cookbooks
  • Blog
Sign in
Blog

B2B Lead Enrichment in Claude Code: Prospect, Enrich, Score, Sync to the CRM

5 Dec 20267min read
AurelienAurelien

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 #

InterfaceUse it whenLimit
cargo-ai CLI plus skillsClaude Code has a shell, the normal caseNone: batches, workflows and deploys all go through it
MCP at https://mcp.getcargo.io/mcpThe client has no shell (Claude Desktop, ChatGPT), or you want one call mid-conversationRuns actions and reads data; projects are deployed from the CLI
Public MCP at https://mcp.getcargo.io/publicYou are pricing a job before signing upLists 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:

text
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:

StepActionCredits
Pull leadsaiArk.searchPeople0.05 per lead returned
Pull leads, LinkedIn filterssalesNavigator.searchLeads0.2 per lead returned, no LinkedIn seat
Work email, first passaiArk.enrichPerson (person ID from the search)0.1, not charged when no email is found
Work email, misses onlyFind email tool (email_waterfall)1.1 to 4 per call, by how far down the waterfall it goes
VerifyVerify email tool (email_validator)0.2
CRM writehubspot.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 #

shellscript
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:

shellscript
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:

shellscript
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:

shellscript
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 #

shellscript
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 with cargo-ai orchestration run list --batch-uuid <uuid> --statuses error and hand them to a person.
  • skipIfExist on a mapping. Writes the property only if it is empty, so enrichment never overwrites what a rep typed.
  • Your own property names. jobtitle is 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:

shellscript
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.

~/run-it-on-cargo/

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.

Start building
AurelienAurelienDec 5, 2026
On this page
  • CLI or MCP: pick by where the agent runs
  • The brief, and what each step costs
  • 1. Pull the leads
  • 2. Find and verify work emails, cheapest first
  • 3. Score against the ICP
  • 4. Upsert into the CRM, with duplicates set to fail
  • 5. Turn it into a workflow
  • When this is the wrong setup
  • Frequently asked questions

Stay Informed with our
weekly Newsletter

Related articlesSee all articles
GTM Engineering
Build vs Buy: Scaling Your GTM Engineering Stack in 2026

When a GTM engineering team should build revenue infrastructure in-house and when to buy a platform: what the second year of a custom stack costs, where the line sits layer by layer, and what one system can honestly replace.

AurelienAurelien·Nov 17, 2026
GTM Engineering
Building a Self-Driving GTM Engine with Agentic Infrastructure

Agentic GTM infrastructure is what a self-driving GTM engine runs on: AI agents defined and deployed as code, orchestration workflows callable from the UI, the CLI, the API and agents, and one unified data model behind lead routing and scoring.

AurelienAurelien·Nov 17, 2026
GTM Engineering
GTM as Code: The Complete Guide to Running Your Go-to-Market as Code

How to run your go-to-market as code, end to end: declare it as a Cargo project in a git repository, preview each pull request, deploy on merge, run one-off batches, test agents, draw the graph and roll back. Every step, with the command and the page that covers it.

AurelienAurelien·Nov 17, 2026

Build the self-driving GTM engine

Your coding agents build it on Cargo.Or our team builds, operates and improves it with you.

Start building
Cargo
Backed byY CombinatorSOC 2 Type IICertified
LinkedinX

Product

Data ModelsContextTerritoriesMailboxesToolsAI AgentsPlaysAppsIntegrationsPricing

Add-ons

Chrome extensionButtonFormSlackGitHub

Build

DocsDeveloper resourcesCargo API docsCargo OpenAPI specCargo auth docsCargo webhooksCargo MCP serverProjectsClaude CodeCodexCursorAll coding agents

Resources

ReportsBlogCustomer storiesCookbooksEnrichmentRoutingSignalsScoringCRM hygieneAd audiencesGTM skillsGTM EngineeringGlossaryCompareCargo x ClayCargo x WorkatoCargo x n8nCargo x DeeplineCargo x DefaultCargo x LeanDataCargo x UnifyCargo x ValleyCargo x GojiberryCargo x PhantomBusterCargo x ZapierCargo x ApolloCargo x Chili PiperCargo x Common RoomCargo x MakeCargo x Tray.io

Company

ManifestoCommunityEventsJobsPartners DirectoryPartner Program

Legal

SecurityTerms of servicePrivacy PolicyRefundsDPASupport
© 2026 Cargo
 ////////    ///////    ////////     ////////    ///////
///         ///   ///   ///   ///   ///         ///   ///
///         ///   ///   ///   ///   ///         ///   ///
///         /////////   ////////    ///  ////   ///   ///
///         ///   ///   /// ///     ///   ///   ///   ///
///         ///   ///   ///  ///    ///   ///   ///   ///
 ////////   ///   ///   ///   ///    ///////     ///////

$ npm install -g @cargo-ai/cli