# Import a file

Bring products in from a CSV, JSON Lines or Excel file, see what changes before it does, and undo it.

_Products → Import_ brings products in from a file when no PIM sends them. Nothing is written until you have seen what the import would do.

## The file

Drop a CSV, JSON Lines or Excel (`.xlsx`) file on the screen, or _Choose_ one: up to 50 MB and 100,000 lines. It goes to the catalog as it is and is read there, never in your browser. Each line is a variant; lines with the same product ref are one product. A CSV may use commas, semicolons or tabs, and prices may be written `99,95` or `99.95`.

## Map the columns

Each column of the file stands in a list with its first values and where it goes: the product ref, the Type, the SKU, the name in a language, an attribute of the Type (per language where it is translated), the categories, a price in a shop, or nowhere. Pick the Type the file's products are of above the list.

The catalog maps what it can by the column's name, so `Artikelnummer`, `SKU`, `Name DE`, `Volumen` or `Preis DE` are already set, marked _Proposed_. The next file with the same columns maps itself the way you started the last one, marked _Remembered_.

With an AI Gateway key in _Settings → System → Import suggestions_, Jev suggests where the columns the names left open go, from the headers and a few of their values. A suggestion stands beside its column with how sure Jev is; take it with a click, or pick something else. The key is your own [Vercel AI Gateway](https://vercel.com/docs/ai-gateway) key and is kept sealed: once kept, the catalog shows only that it is set, by whom and when. Without a key nothing leaves the catalog, and the import works the same.

## Preview

_Preview_ reads the whole file and counts what an import would do: how many products are new, changed, unchanged and refused. Each refused product shows the line of the file it starts at and why, such as:

- an option the Type does not know (`Colour: Pick one of the options.`),
- a SKU another product holds, or the same SKU on two lines,
- a new product without its name or a required value (`Volume is required.`),
- a line without a product ref, an unknown Type, or a price that is no amount,
- a product your PIM brought, where the line changes a field the PIM owns (`Akeneo brought this product and keeps Brand. Change it there.`).

Below them, the first changes show as before and after. Change the mapping and the preview is out of date until you press _Preview_ again.

## Run and Undo

_Run_ applies exactly what the preview showed, in the background. A product someone changed since the preview is skipped and counted. New products wait as drafts, ready to publish; nothing goes live by itself. The import is your edit: the products it makes are yours in every field, a brand and variants too, even where a PIM owns those fields in its own products, and no field becomes read-only.

_Undo_ shows what it would put back, then runs: it deletes the products the import made, unless someone published or changed them since, and restores every value the import set unless someone changed it since. Added variants appear as removals in the preview and are removed only if their content is unchanged; later edits stay. Prices the import set are taken back.

Import the same file a second time and the preview says nothing changes.