Skip to content
Denne side findes på dansk. Læs på dansk
HeyMySocial

CRM export file format

How a CSV export of leads or sales from your CRM is reconciled with HeyMySocial, which columns it needs, how statuses are mapped and what happens on a conflict.

A CRM export is different from the plain lead and sales files: every row carries the CRM's own id, and the file is reconciled against what HeyMySocial already knows. Upload it as often as you like. It catches whatever a webhook missed, and for a CRM that can only export it is the whole connection.

Each row goes through the same reconciler as a record from the inbound webhook or the API, so the rules below are the same on all three routes. The ready-made HubSpot and Pipedrive connector is built but switched off; the file and the webhook are what work today.

Columns

ColumnFileNeededWhat it is
external_idBothYesThe CRM's own id of the record. The heading may also be id.
updated_atBothOptionalWhen the record last changed in the CRM. Left empty, the moment of the import is used. An older record never overwrites a newer one.
statusLeadsOptionalThe lead's status in the CRM's own words. It is translated with the connection's status mapping; a status with no mapping is listed for review and the lead keeps its status here.
reasonLeadsOptionalWhy the lead was disqualified or lost.
contact_external_idLeadsOptionalThe CRM's id of the contact behind the lead.
lead_refLeadsOptionalThe lead's id in HeyMySocial, when the CRM already holds it. The record is tied to exactly that lead.
nameLeadsOptionalThe person's name.
emailLeadsOptionalTheir email address. An open lead that is already here for the same address is linked, not doubled.
phoneLeadsOptionalTheir phone number.
companyLeadsOptionalThe company they belong to.
captured_atLeadsOptionalWhen the lead arrived. Left empty: updated_at.
first_contacted_atLeadsOptionalWhen the lead was first contacted.
lead_external_idSalesThis or lead_refThe CRM's id of the lead the sale belongs to. The lead must have been imported first.
lead_refSalesThis or lead_external_idThe lead's id in HeyMySocial.
opportunity_external_idSalesOptionalThe CRM's id of the opportunity the sale closes.
amountSalesThis or amount_minorThe amount in the currency's main unit, written with a dot or a comma. A negative amount is a refund.
amount_minorSalesThis or amountThe amount as a whole number of the currency's smallest unit.
currencySalesYesA three-letter currency code.
occurred_atSalesOptionalWhen the sale happened. Left empty: updated_at.
kindSalesOptionalsale or refund. Left empty, the sign of the amount decides.
revenue_basisSalesOptionalbooked, invoiced or collected.
noteSalesOptionalA note kept on the sale.

A file holds either leads or sales, never both. Unlike the other imports there is no column step on the screen. Columns are matched by name: capital letters do not matter, and spaces and dashes count as underscores, so Lead Status and lead_status are the same. A column with another name is brought in through the connection's field mapping (see below), and a column that is neither known nor mapped is ignored.

  • Every file needs external_id, the CRM's own id for the row. A column called id is accepted instead.
  • updated_at is optional: when the row last changed in the CRM. Without it every row counts as changed at the moment of the upload.

Rules for a lead row

  • A lead the connection has not seen is matched before it is created. lead_ref may hold HeyMySocial's own id of the lead and links the row straight to it. Otherwise the contact is looked up by contact_external_id or by the exact email address. If that contact has one open lead here that the CRM is not linked to yet, the row is linked to it, because the same person usually reached you through the website first. Linking to an existing lead this way can be switched off under Mapping.
  • A new lead needs a known contact or contact details of its own (name, email, phone or company). It is created with the row's status, or as new, and with captured_at as the day it arrived.
  • Status is translated through the connection's status mapping, then through a list of common CRM words that are understood without one. A status found in neither is not guessed: the rest of the row is applied, the lead keeps its status here, and the row is listed so you can add the mapping.
  • Newest wins. When the CRM's status is newer than the one here, it is applied, with reason if the row has one. When it is older, the status here stays and the CRM's value is kept in the lead's timeline.
  • First contact. first_contacted_at only fills an empty first-contact time. For a lead that already exists here, the time it arrived and the campaign it came from are never changed by a CRM.

Rules for a sale row

  • Its lead must be known: lead_external_id is the CRM id of a lead this connection has already linked, or lead_ref is HeyMySocial's id of the lead. A sale whose lead is not known is listed as an error and applied when you upload it again after the lead.
  • Amount and currency are both needed. amount is in major units and may be written 48500.00, 48.500,00 or 48,500.00; amount_minor is a whole number of minor units instead. The currency is a three-letter code.
  • Refunds. A negative amount is stored as a refund unless kind says otherwise.
  • Date. occurred_at is the day of the sale; without it the row's updated_at is used.
  • The CRM owns sales. When a sale with the same id comes again with other numbers, the CRM's numbers replace the ones here.

Write dates in the form 2026-04-22 or 2026-04-22T10:00:00Z. They are read as UTC when they carry no offset.

Mapping your CRM's words

On the connection's page, the card Mapping has two lists. Statuses pairs a status in the CRM with a status here; the card also shows the statuses that are understood without a mapping. Fields pairs a field in the CRM with a field here, per kind of record, so an export with a column called Stage can feed status without editing the file. Press Save the mapping before you upload.

The seven statuses a CRM status can map to are described under lead statuses.

Uploading the same file again

A sale row with the same content as last time changes nothing, and a row that is older than what the connection already has is not applied. A lead row without updated_at counts as changed at the moment of the upload, so it puts the CRM's status back on a lead whose status was changed here in the meantime. With updated_at in the file, the same export twice, or an older export after a newer one, does no harm.

For a lead file you can tick This is a full export. Leads the connection has linked that are missing from the file are then reported, because they may have been deleted or merged in the CRM. Nothing is deleted here.

Sample

The rows are made up. A lead file, where In progress is one of the words understood as contacted:

external_id,status,name,email,company,updated_at
C-501,Qualified,Anna Example,anna@example.com,Example Roofing ApS,2026-04-20T10:00:00Z
C-502,In progress,Bo Sample,bo@example.org,Sample Carpentry,2026-04-21T08:30:00Z

A sales file, naming the lead by its CRM id:

external_id,lead_external_id,amount,currency,occurred_at
S-9001,C-501,48500.00,DKK,2026-04-22

A sample lead export with every column and two fictional rows is at https://heymysocial.com/docs/files/samples/crm.csv and a sample sales export, whose rows point at a lead of the first file, at https://heymysocial.com/docs/files/samples/crm-sales.csv

In the app

  1. Open Settings, then Connections. If there is no CRM connection yet, press Connect next to CRM by file (or CRM by webhook, which takes files as well), name it and press Connect the CRM. You need a role that may manage integrations.
  2. On the connection, press Mapping and reconciliation.
  3. In the card Reconcile from a file, choose under What the file contains between Leads with their status and Sales, choose the CSV file and press Reconcile the file.
  4. A notice says how many of the rows were applied. Rows that could not be applied are listed under Reconciliation errors on the same page, each with the CRM's id and what was wrong. Resolve one when you have fixed it, or ignore one that should stay out.

The size and row limits are on the overview of files. A file with more rows than the limit is refused; split it and upload the parts.

Through the API

A system can send the same records without a file through send-crm-records and read what failed with list-crm-reconciliation-errors. To have the CRM send changes as they happen, see the inbound webhook and the guide to connecting a CRM by webhook.