CRM pack

Campaigns CSV import API

Import marketing campaign reports from any CSV: channel, dates, budget, spend, currency and leads. Channel enum-bounded, multilingual headers.

30-second curl
curl -X POST https://api.adaptivmapr.com/v1/uploads \
  -H "Authorization: Bearer $ADAPTIVMAPR_API_KEY" \
  -F "template=campaigns_v1" \
  -F "file=@your_data.csv"
→ 9 canonical fields · 0 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.

campaigns_v1
fields
9
required
2
validated
0
hints
50
Canonical columnTypeRequiredValidatorsHeader hints the cascade matches
idstringyes—kampagnen-idkampagnennummerid campagneid campagnacampaign idid de campaña
namestringyes—kampagnecampagnecampagnacampaigncampaña
channelenumemailpaid_searchpaid_socialdisplayeventcontentother——kanalcanalcanalechannelmedium
start_datedate——startdatumbeginndate de débutdata iniziostart datefecha de inicioreporting starts
end_datedate——enddatumendedate de findata fineend datefecha de fin
budgetnumber——budgetpresupuestobilancio
spendnumber——ausgabenkostendépensesspesaspendcostgastoamount spent
currencystring——währungdevisevalutacurrencymoneda
leadsnumber——leadsanfragenprospectscontatticlientes potenciales

Read the same definition as JSON at GET /v1/templates/campaigns_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
  • 2 required
  • 0 validated
  • 50 header hints, 5 languages

Why it exists

Written for the file you actually receive.

The Campaigns template is one marketing campaign per row: an id and a name (both required), the channel, start and end dates, the budget, the actual spend, the currency and the number of leads the campaign brought in. It is the shape that an ad platform's campaign report, a marketing-automation export and the planning sheet a marketing lead keeps all reduce to. Marketing operations teams use it to put paid search, paid social, events and email in one table, to compute cost per lead across channels that each report it differently, and to compare planned budget with what finance actually paid. Keeping budget and spend as two columns is what makes the variance visible. It is `low` risk, campaign economics with no personal data, so a confirmed mapping commits straight through. The leads themselves are people and belong in the Leads template; this one only counts them.

id and name are required. channel is an enum (email, paid_search, paid_social, display, event, content, other), so a platform's own vocabulary such as "Search", "Performance Max" or "Sponsored Content" needs mapping into it before import; unknown values are reported, not guessed. budget and spend are numbers in the row's currency, which is a free string, and leads is a plain count. start_date and end_date auto-detect formats, and an always-on campaign can leave end_date blank. There are no impressions, clicks or conversions: each platform defines them differently, and a cross-channel table that mixes them misleads.

Migration scenarios & the foreign headers they ship

Common moves: pulling a quarter of Google Ads, Microsoft Ads, Meta and LinkedIn campaign reports into one table for a channel-mix review; loading HubSpot or Marketo campaign exports into a warehouse beside pipeline data; reconciling an events budget kept in a spreadsheet against invoices; and carrying campaign history across a change of marketing-automation tool. Headers we see: "Kampagnen-ID / Campaign ID / Kampagne / Campaign / Campagne / Kanal / Canal / Channel / Medium / Startdatum / Start date / Date de début / Enddatum / End date / Budget / Ausgaben / Kosten / Cost / Spesa / Währung / Currency code / Leads / Anfragen". A Google Ads report's "Campaign", "Budget" and "Cost" resolve directly; so do Meta's "Amount spent (EUR)" and "Reporting starts", which land on spend and start_date.

The cascade

Six 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/campaigns_v1.

bash
curl -X POST https://api.adaptivmapr.com/v1/uploads \
  -H "Authorization: Bearer $ADAPTIVMAPR_API_KEY" \
  -F "template=campaigns_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 a few example values.

mcp
// In Cursor or Claude Desktop with the AdaptivMapr MCP server installed:
adaptivmapr.match_headers({
  template_id: "campaigns_v1",
  headers: ["id", "name", "channel", "start_date"]
})
schema-only · column names and a few examples only
MCP install instructions

Questions

Campaigns CSV import — FAQ

Our campaigns spend in several currencies. Is that a problem?
No. currency sits on every row, so each campaign keeps its own. Convert to one reporting currency downstream, at the rate your finance team uses.
Where do clicks and conversions go?
They are not fields. If you need them, define a custom schema in your workspace that adds them, and keep in mind that platforms count them differently.
Does AdaptivMapr pull reports from the ad platforms?
No. There is no ad-platform connector. Export the campaign report as CSV or Excel and upload it, or drop it into a storage bucket one of your connectors syncs.
How are leads counted?
As the source counts them. leads is a plain number taken from the file; attribution rules belong to the platform or CRM that produced it.

Map campaigns in production — without shipping raw records.

Minimal data mode sends only column names and a few example values — never the full file. Add full-data when you need row-level AI, routed in-region under a BAA.