A sales file ties revenue to leads you already have. Each row is one sale: an amount, a date and something that says which lead it belongs to. When the row is accepted the sale is recorded and the lead moves to won.
Columns
| Column | Headings recognised | Needed | What it is |
|---|---|---|---|
lead_external_id | lead_external_id, lead id, lead, customer id, kundenummer | This or email | The id you gave the lead, its external_id. Exactly one lead must have it. |
email | email, e-mail, mail, email address, e-mailadresse | This or lead_external_id | The lead's email address. The newest lead with that address that arrived no later than the day of the sale is used. A name is never used. |
amount | amount, beløb, belob, total, revenue, omsætning, value, værdi | Yes | The amount, above zero, as a number in the currency's main unit. |
currency | currency, valuta | Optional | A three-letter currency code. Left empty, the workspace's currency is used. |
occurred_at | occurred_at, date, dato, sale date, salgsdato, invoice date, fakturadato | Optional | The date of the sale. Left empty, the moment of the import is used. It cannot be more than a day in the future. |
external_id | external_id, id, lead id, sale id, invoice, faktura, fakturanummer, order id, ordrenummer | Optional | Your own id for the sale, such as an invoice number. Without it, the lead, the amount and the date identify the sale. |
revenue_basis | revenue_basis, basis | Optional | booked, invoiced or collected. Left empty: booked. |
verification_source | verification_source, verification, source, kilde | Optional | manual, crm or invoice. Left empty: manual. |
As with leads, the import screen proposes a column for each field from the header row, and you can change every choice. Capital letters do not matter, and underscores and dashes count as spaces.
How a sale finds its lead
You must map the amount, and either lead_external_id or email.
- By the lead's id.
lead_external_idis the id the lead has in your system, the one imported asexternal_idwith the lead file or sent with the lead through the API. Exactly one lead must have it. If no lead has the id, or more than one does, the row is left out and the reason says which. - By email address. Used when the row has no lead id. The address must match a contact exactly. Among that contact's leads the newest one that arrived on or before the day of the sale is chosen, and leads marked as duplicates are skipped. If no lead with that address arrived before the sale, the row is left out.
A sale is never matched on a name.
Rules for a row
- Amount. A number above zero.
48500,48500.00,48.500,00and48,500.00are all read as the same amount: when both a comma and a full stop appear, the last one is the decimal mark, and a single mark followed by exactly three digits is read as a thousands separator. A refund cannot be imported with this file. - Currency. A three-letter code such as
DKK. Without a currency the row gets the workspace's currency. - Date.
occurred_atis the day of the sale, in the same forms as the date of a lead, read in the workspace's time zone. Without a date the sale gets the moment of the import; a date more than a day in the future is refused. - The sale's own id.
external_idis the invoice or order number. Give it whenever you can: it is how the sale is recognized next time. - Revenue basis.
booked,invoicedorcollected. Empty meansbooked. - Verification source.
manual,crmorinvoice, saying where the number was checked. Empty meansmanual.
A row with an unknown revenue basis, verification source or currency is left out; nothing is corrected by guessing.
Importing the same file again
A sale with an external_id is recognized by it. A sale without one is recognized by its lead, amount, currency and date. Either way a second import leaves the sale as it is and counts the row under Already there.
Give each sale its number
Two real sales to the same lead, for the same amount on the same day, look like one sale when neither has an id. With an invoice or order number in external_id they stay two.
Sample
The rows are made up. The first sale names its lead by id; the second has only the email address and writes the amount and date the Danish way, with the amount in quotes because it contains a comma.
lead_external_id,email,amount,currency,occurred_at,external_id,revenue_basis,verification_source
L-1001,,48500.00,DKK,2026-04-22,INV-2041,invoiced,invoice
,bo@example.org,"12.500,00",DKK,28-04-2026,INV-2042,booked,manual
A file with every column and two fictional rows is at https://heymysocial.com/docs/files/samples/sales.csv and its rows point at the leads of the sample lead file, so import that one first.
In the app
- Open Leads and press Import. You need a role that may manage leads, and you must be on the agency's own team.
- Under What is in the file? choose Sales, choose the CSV file and press Read the file.
- On Map the columns, check the proposal against the first rows of the file, then press the import button, which says how many rows it will import. If the amount or both ways of finding the lead are unmapped, the screen says so and nothing is imported.
- Result shows Imported, Already there and Not imported, and lists each row that was left out with its line number and the reason.
Import the leads before their sales. A sale whose lead is not in the workspace yet is left out, and importing the same sales file again after the leads are in picks it up. The size and row limits are on the overview of files.
Other ways to record a sale
- In the app, Record a sale on the lead's own page records one sale.
- An assistant records one sale with record_sale.
- A system sends a
sale_wonevent through the API or the signed webhook; see server events. - A CRM connection takes sales by webhook, API or its own export file, under the CRM's ids.
How sales count toward a campaign is described under attribution.