CRM pack

Opportunities CSV import API

Import CRM opportunities from CSV. Amount/currency/probability-validated, stage enum-bounded, multilingual.

low riskopportunities_v1
30-second curl
curl -X POST https://api.adaptivmapr.com/v1/uploads \
  -H "Authorization: Bearer $ADAPTIVMAPR_API_KEY" \
  -F "template=opportunities_v1" \
  -F "file=@your_data.csv"
→ 9 canonical fields · 2 validated · low risk

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 columnTypeRequiredValidatorsHeader hints the cascade matches
idstringyesmatched on the column name
account_idstringmatched on the column name
namestringyesnamenomnomenombre
amountnumberyesbetragmontantimportomontoamount
currencystringwährungdevisevalutamoneda
stageenumprospectingqualificationproposalnegotiationclosed_wonclosed_lostphasestadefasestage
probabilitynumbernumber_rangewahrscheinlichkeitprobabilitéprobabilitàprobabilidad
close_datedateabschlussdatumdate de clôturefecha de cierre
owner_emailemailemailmatched 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.

  1. 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}.

  2. L2Heuristicno LLM

    Normalises accents, punctuation and whitespace, then compares against the column name, the label, and every registered hint (DE / FR / IT / EN / ES).

  3. L3Fuzzyno LLM

    Token-set ratio plus Levenshtein over the normalised strings. Auto-accepts at 0.80 — it absorbs typos and reordered words.

  4. L4Semanticcheap, cached

    Embedding cosine between the header and the field’s label + hints. Catches the long tail of paraphrases.

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

bash
curl -X POST https://api.adaptivmapr.com/v1/uploads \
  -H "Authorization: Bearer $ADAPTIVMAPR_API_KEY" \
  -F "template=opportunities_v1" \
  -F "file=@your_data.csv"
→ upload created · mappings ready · confirm before commit

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.

mcp
// In Cursor or Claude Desktop with the AdaptivMapr MCP server installed:
adaptivmapr.match_headers({
  template_id: "opportunities_v1",
  headers: ["id", "account_id", "name", "amount"]
})
schema-only · headers and ≤3 rows, 80 chars each
MCP install instructions

Questions

Opportunities CSV import — FAQ

Fork and edit enum_values. The canonical set is the cross-CRM intersection — custom pipelines are first-class but live in the workspace fork.
Opportunity line items belong in a separate template (similar to claims_line_items_v1). The canonical row is the deal header; line items link via opportunity_id.
No — the template carries whatever value the source ships. Stage-based probability is a CRM convention that varies per team; we do not impose it.
Each row carries its own currency. Cross-currency rollups happen downstream against a workspace-wide FX table — the canonical row stays raw so reporting can be re-priced over time.

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.

No free tier · $10 prepaid wallet to start · every map draws a small flat fee, deterministic ones included