Skip to content
Leat Help Center

How to format your CSV file for an import

This article explains how to write the values in a CSV file you import on Data → Imports: true or false values, numbers, amounts, dates, select options and the standard contact fields. The file rules apply to every import type. The rules per data type apply wherever you map a column to an attribute, which you do in contact imports and voucher imports.

A value that doesn't match what a column expects isn't always rejected with an error. Sometimes it's saved as something else, often empty or 0, so check your file against the rules below before you import.

For the steps of a contact import, see How to import a list of contacts.

The file itself

  • A header row is required. Every column needs a name in the first row. If one is missing, the upload stops and asks you to add it.
  • Column names should be unique. If a name appears twice, Leat numbers the duplicates so you can tell them apart when you map them.
  • Up to 100,000 rows per file. Split a bigger file and import the parts one after another.
  • Comma, semicolon, tab or pipe as the separator. Leat detects which one your file uses.
  • Save the file as UTF-8 so accented letters come through correctly.
  • Empty lines are skipped.

A minimal contact file looks like this:

email,firstname,lastname,newsletter_opt_in
anna@example.com,Anna,de Vries,true
ben@example.com,Ben,Janssen,false

Automatically set data types or Set all data types to text

The File upload step asks how to read your file.

  • Automatically set data types (Recommended) turns anything that looks like a number into a number. That drops leading zeros: a phone number 0612345678 becomes 612345678, and a postcode, member number or code 00123 becomes 123.
  • Set all data types to text keeps every value exactly as it's written.

If any column holds values that start with a zero, choose Set all data types to text. Numbers, dates and true or false values are still read correctly that way, because Leat reads each value according to the column you map it to.

Dates and Date notation

The Check your data step has a Date notation setting:

  • Day / Month / Year, for example 31-05-2025
  • Year / Month / Day, for example 2025-05-31

Use -, / or . between the parts of the date. A date that doesn't match the notation you chose can't be read. Leat doesn't guess.

Which dates follow it:

  • Activation date and Expiration date when you import new vouchers. Write the date only. A cell with a time in it can't be read, and a date that can't be read is left out, so the voucher is created without it.
  • Expiration date when you update existing vouchers, and when you import or update gift cards. A time is optional: 31-12-2025 18:00. Without a time, it's 23:59 on that day.
  • Starts at, Ends at and Checked in at when you import bookings. Add the time: 31-05-2025 19:30.
  • Datetime attributes in contact and voucher imports. See Datetime below.

Times are in 24-hour format and in your account's time zone.

Date and Birthdate attributes don't follow Date notation. See their sections below.

Amounts and numbers in other imports

  • Amount in cents (prepaid transactions and gift card transactions) takes a whole number of cents. For €25, write 2500. A value with a comma, a dot, a currency symbol or text in it, such as 25,00 or €25, makes the row fail.
  • Points (points with a fixed amount) takes a number of points: 700. A comma or dot is read as a decimal separator and the decimals are dropped, so 389,5 gives 389 points. Leave out thousands separators.
  • Base amount (points with a base amount) takes an amount with a comma or a dot for decimals: 12,50 and 12.50 are both read as 12.50. Leave out thousands separators and currency symbols.

A Points or Base amount value that isn't a number makes the row fail.

Values per data type

These rules apply to every column you map to a custom attribute, in contact imports and voucher imports, and to the standard contact fields.

Boolean (true or false)

  • true and 1 are imported as true.
  • false and 0 are imported as false.
  • Capitals don't matter: True, TRUE and FALSE work too.
email,newsletter_opt_in
anna@example.com,true
ben@example.com,false

Any other value, such as yes, no, ja or x, isn't read as true or false. It's treated as an empty cell, so in a contact import the write mode decides what happens (see "Empty cells and the write mode" below). If your file uses yes and no, replace them with true and false before you import.

Number and Decimal number

  • Write the number on its own: 12, -3, 12.5.
  • Use a comma or a dot for decimals: 12,5 and 12.5 are both read as 12.5.
  • Leave out thousands separators. 1.234 is read as 1.234, not 1234. 1.234,56 and 1,234.56 are both read as 1234.56.
  • Leave out currency symbols and units. A value that doesn't start with a number, such as € 12 or abc, is imported as 0.
  • Use whole numbers for a Number attribute. Use Decimal number for values with decimals.

Birthdate

  • Write the day first or the year first: 31-05-1999, 31/05/1999, 31.05.1999 or 1999-05-31.
  • Month-first dates aren't supported. 12/25/1990 can't be read, and 03/04/2025 is read as 3 April, not 4 March.
  • The date must be between 1 January 1900 and today. A birthdate outside that range is imported as empty.
  • Date notation doesn't apply to birthdates.

Date

The same as a birthdate, without the range limit: day first or year first, with -, / or . between the parts. 31-05-2025 and 2025-05-31 both work. Month-first dates aren't supported, and Date notation doesn't apply.

Datetime

A Datetime value is read in the order you choose under Date notation, for example 31-05-2025 14:30 or 2025-05-31 14:30.

  • Write the time in 24-hour format, with or without seconds: 14:30 or 14:30:00. AM and PM aren't supported.
  • A date without a time is saved as 23:59 on that day.
  • The time is read in your account's time zone. A value with a time zone at the end, such as 2025-05-31T14:30:00Z or +02:00, can't be read.

Select

Use the option's internal value, not its label. You'll find it under Selection options on the attribute's page. To get there, click the gear icon at the top right of the dashboard to open Settings, then click Attributes under Management and open the attribute.

The value has to match exactly, including capitals. A value that doesn't match any option is imported as empty.

Multi-select

Use the internal values of the options and separate them with a semicolon: wine;beer;coffee. Values that don't match an option are left out, and the rest are imported.

If your file uses semicolons as its separator, put the cell in double quotes: "wine;beer".

In a contact import, the write mode decides what happens to options the contact already has:

  • Skip if empty and Always overwrite replace the contact's options with the ones in your file.
  • Append adds the options in your file to the ones the contact already has. It's only offered for multi-select attributes.

Text, Long text, Email, URL, Color and Identifier

Imported as written. Spaces at the start and end are removed. With Automatically set data types (Recommended), a value made up only of digits loses its leading zeros, so choose Set all data types to text for codes like 00123.

License plate

Everything except letters and digits is removed: AB-12-CD is saved as AB12CD.

File upload and media upload

These attributes can't be filled from a CSV file and aren't offered when you map your columns.

Standard contact fields

  • Email is required. It's how Leat recognises a contact: a row with an email address that's already in your account updates that contact, and any other row creates a new one. A row with an empty or invalid email address fails.
  • First name, Last name and Address are text.
  • Phone Number works best in international format starting with +, for example +31612345678. A number without a country code is read as a number from your account's country. A number another contact already has, or one that isn't a valid phone number, isn't set as the contact's phone number.
  • Birth date follows the rules for Birthdate above.
  • Preferred language takes a 2-letter language code: en (English), nl (Dutch), fr (French), de (German), it (Italian), pl (Polish), pt (Portuguese), es (Spanish) or sv (Swedish). Use the code in lowercase, not the name of the language. Any other value leaves the contact's language as it is.
  • Contact type is matched to one of your contact types. After you assign the column, choose under Relation whether it holds the type's ID or its Name. Names are matched regardless of capitals. A value that matches no contact type makes the row fail, and an empty cell leaves the contact's type as it is.

Empty cells and the write mode

In a contact import, the Write mode you pick when you assign a column decides what an empty cell does to a contact who already has a value:

  • Skip if empty (the default): the contact keeps their current value.
  • Always overwrite: the current value is removed.

For a new contact, an empty cell simply leaves the attribute empty.

When values don't come through

  • A true or false attribute stayed empty or didn't change. Your file uses a value other than true, false, 1 or 0, such as yes. Replace it and import again.
  • A select, multi-select, date or birthdate value disappeared. A value Leat can't read in one of these columns is saved as empty, and in a contact import that removes the value the contact had, even with Skip if empty. Check that you used the option's internal value, or a day-first or year-first date.
  • Vouchers have no activation or expiration date. The date didn't match your Date notation, or it had a time in it.
  • Leading zeros are missing. Import again with Set all data types to text.
  • A number attribute is 0. The cell had a currency symbol, a unit or text in front of the number.
  • Some rows failed. Open the import on Data → Imports to see which rows failed and why. Common causes are an invalid email address, a contact type that doesn't exist, an Amount in cents that isn't a whole number, and a voucher code that another voucher already uses. A deleted voucher doesn't count: its code is free again.

Back to the help center