# Import customers by spreadsheet

> For the administrator: register or update many customers at once by importing an Excel or CSV spreadsheet, checking the column mapping.

Source: https://vendria.com/en/ajuda/importar-clientes-por-planilha

## Where to find it

In the menu, under **Customers**, **Import** button at the top of the screen. It opens the
**Import Customers** window. Only the administrator sees the button, and it disappears when
your company's customers come only from the ERP.

## What the customer import is for

Registering or updating many customers at once from a spreadsheet that
you already have: the export from the old system, the finance team's list, a registry
in Excel. The spreadsheet doesn't need to follow a template: Vendria reads the header, suggests
which field each column is and you check before importing.

It accepts Excel (.xlsx, .xls, .xlsm, .xlsb) and CSV.

## How to import customers by spreadsheet

1. In **Customers**, click **Import**.
2. In **Excel or CSV file**, choose the spreadsheet. The screen shows **Analyzing
   file with AI...** while it reads.
3. In the **Column Mapping** step, check each spreadsheet column and the field
   it goes to. The columns appear grouped into **Company Details**,
   **Address**, **Main Contact**, **Commercial**, **Other** and **Not
   mapped**. To discard a column, choose **— Ignore —**.
4. If you want, choose the **Default seller**, used when the spreadsheet's seller
   isn't found.
5. Check the **Sample** just below: these are the first rows with the
   mapping already applied.
6. Click **Import N rows**. The button shows the progress.
7. The **Import Result** step shows how many **Companies created**,
   **Companies updated** and **Ignored**, and the **Errors** per row.

Don't know how to build the spreadsheet? In the first step, **Download full template**
downloads an Excel file with all the columns the import understands.

## The fields the spreadsheet can fill in

- **Company Details**: Trade Name, Legal Name, CNPJ/CPF, Person Type
  (PF/PJ), State Registration, Tags, Segment, External Code, Status, Email
  (Company), Phone (Company).
- **Address**: City, State, ZIP code, Neighborhood, Street.
- **Commercial**: Payment Terms, Payment Method, Freight Type, the
  locks for each (Lock Payment Terms, Lock Payment Method,
  Lock Freight) and the customer's installment rules (Minimum Installment,
  Installment Interval, Maximum Term, Accepts Cash).
- **Other**: Seller.

A row with no trade name uses the legal name as the name. A row with neither is
skipped, with the reason **name and legal name missing**.

## New customer or updated customer

For each row, Vendria looks for a customer that already exists:

1. by **CNPJ/CPF**, including the CNPJ of an already registered branch;
2. if it doesn't find one, by **External Code**.

Found: the customer is **updated** with what the row brings (an empty field in the spreadsheet
doesn't erase what already exists). Not found: a **new** customer is created. That's why
reimporting the same corrected spreadsheet doesn't duplicate customers, as long as the row
has a CNPJ or code.

When the row matches by the CNPJ of a **branch**, its data doesn't overwrite the
head office record: the customer only counts as updated.

## Each customer's seller

The **Seller** column is matched by the seller's **name** in Vendria, ignoring
accents and case. A name that matches no one falls to the
**Default seller**; with no default seller, the customer has no seller (or keeps
the one it had, if it already existed).

Write the name exactly as the person is registered in **Users**. A
nickname or an extra surname makes the customer fall to the default seller.

## ⚠️ The Status column reactivates deactivated customers

When the spreadsheet updates a customer that already exists, its **Status** is
rewritten. With no status column mapped (or with the cell empty) the customer is
considered **active**. In other words: importing a spreadsheet without the **Status** column
**reactivates** customers you had deactivated by hand.

Only these values stay inactive: **inactive** (or **inactive**), **bloqueado** (or
**blocked**), **suspenso** (or **suspended**) and **cancelled**, the last one only in
Portuguese: **cancelled** doesn't deactivate. If you keep deactivated customers, include the
**Status** column in the spreadsheet or remove those rows before importing.

## ⚠️ Contact columns don't create buyers

The mapping step offers **Contact Name**, **Contact Phone**,
**Contact Email** and **Contact CPF**, and the result shows **Buyers
created** and **Buyers linked**. But today's import registers only the
**company**: the spreadsheet's contacts don't become buyers, and those two numbers
stay at zero.

To give the customer's people access, use the **Buyers** tab on the profile. See [Give a buyer access: catalog, WhatsApp and stores](/en/ajuda/dar-acesso-a-um-comprador).

## The spreadsheet's payment terms

**Payment Terms** are checked row by row. A term that doesn't move forward
in time (**10/10/10** instead of **10/20/30**) is refused: the row is imported
without the terms and the reason appears in **Errors**. Fix it on the customer's profile or
in the spreadsheet and import again.

**Payment Method** and **Freight Type** are translated into Vendria's
options; a value that isn't recognized is left blank.

Terms that come from the spreadsheet count as **set by the administrator**: the
automatic terms learning doesn't overwrite them later.

## The next import remembers the mapping

After importing, Vendria keeps how you mapped the columns. On the next
spreadsheet with the same format, the mapping comes suggested the same way.

## When it goes wrong

- **"Upload expired. Upload again."**: the analyzed spreadsheet waited
  too long for confirmation. Start over from **Import**.
- **Many skipped**: check whether the name column was mapped to **Trade
  Name** or **Legal Name**.
- **Duplicate customers after importing**: the rows had no CNPJ or
  External Code, so there was no way to find the existing record.
- **The seller didn't come in**: the name in the spreadsheet doesn't match the registered name.
- **The Import button doesn't appear**: you're not an administrator, or your
  company's customers come only from the ERP.
