Opportunities CSV import API
opportunities_v1
Import this template via API. Import CRM opportunities from CSV. Amount/currency/probability-validated, stage enum-bounded, multilingual.
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"
At a glance
- Pack
- CRM
- FHIR resource
- —
- Risk level
- low
- Fields
- 9 (3 required, 2 validated)
Why this template?
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 & common foreign headers
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.
Schema
The canonical column set, with 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.
| Column | Type | Required | Validators | Hints |
|---|---|---|---|---|
| id | string | yes | — | — |
| account_id | string | — | — | — |
| name | string | yes | — | name · nom · nome · nombre |
| amount | number | yes | — | betrag · montant · importo · monto · amount |
| currency | string | — | — | währung · devise · valuta · moneda |
| stage | enum | — | — | phase · stade · fase · stage |
| probability | number | — | number_range (min 0, max 100) | wahrscheinlichkeit · probabilité · probabilità · probabilidad |
| close_date | date | — | — | abschlussdatum · date de clôture · fecha de cierre |
| owner_email | — | — |
How AdaptivMapr maps your headers to this template
Five layers run in order, cheapest first. Layer 1 (Statistics) auto-accepts headers that have been mapped the same way across past uploads. Layer 2 (Heuristic) compares your header to the column name, the optional label, and every registered hint (DE / FR / IT / EN / ES) after a Unicode-and-punctuation-normalising pass. Layer 3 (Fuzzy) catches typos and reordered words. Layer 4 (Semantic) uses cached embeddings to catch the long tail of paraphrases. Layer 5 (LLM) only fires on genuinely ambiguous columns, constrained to the template’s allowed column set so it cannot invent a field. When a layer auto-accepts, the lower-cost layers below it never run — that is the cost lever.
REST · POST /v1/uploads
Pass the template_id; the cascade picks up the rest.
curl -X POST https://api.adaptivmapr.com/v1/uploads \ -H "Authorization: Bearer $ADAPTIVMAPR_API_KEY" \ -F "template=opportunities_v1" \ -F "file=@your_data.csv"
The canonical template definition is read-only at GET /v1/templates/opportunities_v1.
MCP · Cursor / Claude Desktop
Drop AdaptivMapr into your IDE. Schema-only calls are free and unlimited.
// In Cursor or Claude Desktop with the AdaptivMapr MCP server installed:
adaptivmapr.match_headers({
template: "opportunities_v1",
headers: ["id", "account_id", "name", "amount"]
})MCP install instructions →FAQ — Opportunities CSV import
How do I extend stage for a custom pipeline?
Fork and edit enum_values. The canonical set is the cross-CRM intersection — custom pipelines are first-class but live in the workspace fork.
What about products on the opportunity?
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.
Does probability auto-adjust by stage?
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.
How do I model multi-currency forecasts?
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.