CRM pack
Opportunities CSV import API
Import CRM opportunities from CSV. Amount/currency/probability-validated, stage enum-bounded, multilingual.
curl -X POST https://api.adaptivmapr.com/v1/uploads \
-H "Authorization: Bearer $ADAPTIVMAPR_API_KEY" \
-F "template=opportunities_v1" \
-F "file=@your_data.csv"Canonical columns
The whole schema, printed as it ships.
Every canonical column, the type each row carries, whether it is required, the field-level validators that fire on commit, and the multilingual header hints the cascade resolves against. This is the shipped definition, not a summary of it.
opportunities_v1- fields
- 9
- required
- 3
- validated
- 2
- hints
- 24
| Canonical column | Type | Required | Validators | Header hints the cascade matches |
|---|---|---|---|---|
id | string | yes | — | matched on the column name |
account_id | string | — | — | matched on the column name |
name | string | yes | — | namenomnomenombre |
amount | number | yes | — | betragmontantimportomontoamount |
currency | string | — | — | währungdevisevalutamoneda |
stage | enumprospectingqualificationproposalnegotiationclosed_wonclosed_lost | — | — | phasestadefasestage |
probability | number | — | number_range | wahrscheinlichkeitprobabilitéprobabilitàprobabilidad |
close_date | date | — | — | abschlussdatumdate de clôturefecha de cierre |
owner_email | — | email | matched on the column name |
Read the same definition as JSON at GET /v1/templates/opportunities_v1. A hint match resolves on layer 2 — no LLM call, no token spend, just the flat per-map fee. Hover a validator id to see what it checks.
- 9 canonical fields
- 3 required
- 2 validated
- 24 header hints, 5 languages
Why it exists
Written for the file you actually receive.
The Opportunities template is deals in pipeline. Each row carries an id, an account_id, a deal name, an amount, a currency, a stage enum that walks the deal through prospecting → qualification → proposal → negotiation → closed_won / closed_lost, a probability between 0 and 100, an expected close_date, and an owner_email. Sales-ops teams use this template to migrate pipelines between CRMs, to import historical wins for analytics, and to reconcile rep-by-rep forecasts at quarter-close. The probability field is bounded by a number_range validator (0-100) so a corrupted row (probability=1.5 because someone treated it as a fraction) gets rejected at import rather than skewing the forecast. The stage enum reflects the Salesforce / Hubspot / Pipedrive intersection — granular enough to support a forecast, narrow enough to stay portable.
amount is required because an unpriced deal is not an opportunity, it is a lead. Currency is a free string (ISO-4217 is too long to enum); cross-currency rollups happen downstream. owner_email is validated with the email regex so a stale rep email blocks the import early.
Migration scenarios & the foreign headers they ship
Migration scenarios for the Opportunities template: full pipeline migrations between CRMs at quarter-end where any data loss kills the forecast, importing historical wins for win-rate analytics, reconciling rep-by-rep forecasts at quarter-close after a leadership change, and backfilling deals after a system outage that lost a week of activity. Foreign headers we see often: "Account ID / Konto / Name / Nom / Nome / Betrag / Montant / Importo / Monto / Currency / Währung / Devise / Valuta / Stage / Phase / Stade / Fase / Wahrscheinlichkeit / Probabilité / Probabilità / Probabilidad / Abschlussdatum / Date de clôture / Fecha de cierre / Owner / Verantwortlicher". The probability range validator catches the corrupted-fraction case (probability=0.75 instead of 75) — the single most common forecast-distortion bug in homegrown CRM importers.
The cascade
Five layers, and the cheapest one wins.
Layers run in order and stop the moment a column resolves. That is the single biggest cost lever in the system: a column caught on layer 2 never reaches the metered layer 5.
- L1Statisticsno LLM
Auto-accepts a header that past confirmations already resolved the same way, at {minN:100, minRatio:0.95} or {minN:20, minRatio:1.00}.
- L2Heuristicno LLM
Normalises accents, punctuation and whitespace, then compares against the column name, the label, and every registered hint (DE / FR / IT / EN / ES).
- L3Fuzzyno LLM
Token-set ratio plus Levenshtein over the normalised strings. Auto-accepts at 0.80 — it absorbs typos and reordered words.
- L4Semanticcheap, cached
Embedding cosine between the header and the field’s label + hints. Catches the long tail of paraphrases.
- L5LLMmetered
Everything still unresolved goes up in ONE batched, collision-aware call, constrained to this template’s column set so it cannot invent a field.
Try it
One template id, two ways in.
REST for your import pipeline, MCP for your editor. Both run the same cascade and both honour the same schema-only clamp.
REST · POST /v1/uploads
Name the template; the cascade picks up the rest. The canonical definition is read-only at GET /v1/templates/opportunities_v1.
curl -X POST https://api.adaptivmapr.com/v1/uploads \
-H "Authorization: Bearer $ADAPTIVMAPR_API_KEY" \
-F "template=opportunities_v1" \
-F "file=@your_data.csv"MCP · Cursor / Claude Desktop
Drop AdaptivMapr into your editor and call the same cascade as a tool. Schema-only calls leave only column names and up to three clamped sample rows.
// In Cursor or Claude Desktop with the AdaptivMapr MCP server installed:
adaptivmapr.match_headers({
template_id: "opportunities_v1",
headers: ["id", "account_id", "name", "amount"]
})Questions
Opportunities CSV import — FAQ
Ready when you are
Map opportunities in production — without shipping raw records.
Schema-only mode leaves only headers and a handful of clamped samples. Add full-data when you need row-level AI, routed in-region under a BAA.