# What the catalog import does with each product

> For the administrator: how the import recognizes each product by its code, what it deactivates, what it keeps and what it does with the price tables.

Source: https://vendria.com/en/ajuda/o-que-a-importacao-faz-com-os-produtos

## Where to find it

In your account menu, under **Catalog and exports**, **Import** tab →
**Import spreadsheet**. This article explains what happens to the products when you
confirm an import, especially **Import new catalog**, which is the one that
can deactivate products.

## How the import recognizes a product that already exists

The product is recognized by its **code** (SKU), with no difference between uppercase and
lowercase. For each row of the spreadsheet:

- a code that **already exists** in the store's catalog → the product is **updated**;
- a **new** code → the product is **created**;
- a row with **no code** but with a description → the description is also used as the
  code;
- a row with no code **and** no description → the row doesn't go in and becomes the warning
  "SKU and description missing".

⚠️ Changing a product's code in the spreadsheet doesn't "rename" the product: the
import creates a new product with the new code, and the old one (absent from the
spreadsheet) is deactivated in the full import. The new one doesn't inherit history,
photos or last paid price from the old one.

## Columns you didn't map stay as they are

The import only writes the fields the spreadsheet brings. If you import a
spreadsheet with no stock column, for example, the stock of existing products
**is not zeroed**: it stays as it was. The same goes for unit, packaging and
the other fields: a column missing from every tab is a preserved column.

## What happens to a product that isn't in the spreadsheet

In **Import new catalog**, every active product in the store whose code doesn't appear
in the spreadsheet is **deactivated**. That's the number the screen calls **Removed**.

"Removed" here means **out of circulation**, not deleted:

- the product disappears from search and from the catalog the buyer sees;
- it stays registered and appears in the product list with the
  **Status** filter set to **Inactive only** or **Active and inactive**;
- if the code **comes back** in a future import, the product is **reactivated** and
  updated, not created again.

In **Update existing catalog**, no product is deactivated.

⚠️ In a store whose catalog is synced with the ERP, products that came from the ERP
are not deactivated for being missing from the spreadsheet: there, the ERP is what decides what can be sold.

## Repeated codes in the spreadsheet

When the same code appears twice **in the same tab**:

- if the two rows differ only by variant (color, size), they become
  variants of the same product;
- otherwise, the **first** row wins, and the second becomes the warning "SKU 'X' duplicated
  (keeping previous row)" in the **Duplicate SKUs** list.

When the code appears in **two tabs** that are checked, the row from the **last**
tab wins.

## Cross-references, photos and collections

**Cross references**: in the full import, the other brands' codes
declared by the spreadsheet **replace** those that came from previous imports.
An alternative code that left the spreadsheet stops being valid. Barcodes
read by the ERP or registered by hand are not deleted. If the spreadsheet has no
cross-reference column, nothing changes.

**Photos**: a column with the image link (starting with `http://` or
`https://`) makes the import download the photo; photos pasted inside the
spreadsheet's cells are also used. See [Import the product photos](/en/ajuda/importar-imagens-dos-produtos) for
photos that are in a folder.

**Collections**: the column classified as **Collection** groups the products by
its value, creating the collection when it doesn't exist yet.

## What the full import does with price tables

When the spreadsheet brings one or more commercial **price table** columns, the
full import treats the spreadsheet as the store's entire list of tables:

- columns with the same name as an existing table update that table;
- new names create new tables;
- ⚠️ the store's **active** commercial tables that don't appear in the spreadsheet are
  **deactivated** and lose their prices;
- **promotional** tables are never deactivated because of this.

See [Load price table prices by spreadsheet](/en/ajuda/precos-das-tabelas-por-planilha).

## Common questions

**"I imported and the Removed number came out high."** The spreadsheet didn't bring those
codes. Check the product list with **Status** → **Inactive only**; to
bring them back, reimport a spreadsheet that contains them (the update
also reactivates whatever comes back).

**"A product I had deleted came back."** If its code is in the spreadsheet,
the import creates or reactivates it.

**"The stock didn't change after the import."** The stock column wasn't
mapped, and an unmapped column stays as it was. In a store where the product list
shows the stock read from the ERP, the number on screen is the ERP's, not the
spreadsheet's.
