# Import your Shopify products into the store

> Bring your products, variants, prices, images and stock counts over from Shopify with the products CSV it exports, checking the file first.

Source: https://www.coritan.com/docs/organizations/commerce/imports/

In the dashboard:

- /dashboard/organizations/…/commerce/imports: https://www.coritan.com/dashboard/organizations

**Imports** brings your catalogue over from Shopify. Upload the products CSV that Shopify exports, and Coritan creates the products, variants, prices, images and stock counts in it. Check the file first: a check reads every row and reports what an import would do, without writing anything.

## Before you begin

- You need the Admin or Owner role to upload a file. Every member can open **Imports** and read its reports.
- In your Shopify admin, open Products, choose Export, and save the CSV file. The file can be up to 10 MB and 5,000 rows. A spreadsheet file, such as one saved as `.xlsx`, is refused.
- The store must sell in the currency of the prices. Add it under **Store** in [Settings](/docs/organizations/commerce/settings/#store) first.
- To import stock counts, the store needs a stock location that is turned on, as [Add a stock location](/docs/organizations/commerce/inventory/#add-a-stock-location) describes.

## Check the file

1. In the [dashboard](https://www.coritan.com/dashboard/organizations), open the organization, then **Commerce**, then **Imports**.
2. On the **Import from Shopify** card, under **Products CSV**, select **Choose a CSV file…** and choose the file.
3. Under **What to do**, keep **Check it first**.
4. Under **Products the store already has**, choose **Update them** or **Leave them as they are**.
5. Under **Prices are in**, choose the currency of the prices. Shopify's export has no currency column.
6. Under **Stock counts are for**, choose the location that the stock counts belong to. It starts at the store's default location.
7. Select **Check the file**.

The check's report opens and follows the check until it finishes. **What an import would do** gives the counts, and **Rows it could not use** lists the rows an import would skip. The report says **Nothing was written**.

## Import the file

After a check in the same session, select **Import this file** on the check's report. It imports the same file with the same settings.

Otherwise:

1. On the **Import from Shopify** card, choose the file and the settings as for a check.
2. Under **What to do**, choose **Import it**.
3. Select **Import the file**.

The import writes the products in batches, and its report shows the progress. You can leave the page while it runs. One import runs at a time: while one is running, the card shows its progress, and you can send the next file once it finishes.

## How the file is read

- Rows that share a `Handle` are one product. The first row holds the product and its first variant, and the rows after it add variants or images.
- With **Update them**, a product whose handle the store already has is updated. A variant matches the store's by SKU, then by its option values, and a variant the file does not mention is left alone. A blank cell keeps what the store has, except that a blank `Variant Inventory Tracker` turns off stock tracking for the variant, as it does in Shopify.
- With **Leave them as they are**, those products are skipped, and only products with a new handle are created.
- A product takes its status from the `Status` column, or from `Published`. Without either column, a new product is a draft.
- `Variant Inventory Qty` sets the stock count at the location you chose.
- `Product Category` becomes a category that the storefront does not show.
- Images stay at the addresses in the file, which must start with `https://`. The store links them without copying them, as [Add images](/docs/organizations/commerce/products/#add-images) explains.

## Read an import's report

The **Imports** card lists every import, newest first, with its **File**, **Status**, what it did to **Products**, the **Rows with problems** and when it was **Uploaded**. **Check only** marks a check. Select an import to open its report.

| Status | What it means |
| --- | --- |
| Queued | It waits to start, and says **Starts shortly**. |
| Running | It is reading the file, and says how many products it has done. |
| Completed | It read the whole file. |
| Failed | It stopped part way. The report says why. |

The report's counts are under **What it did**, or **So far** while it runs: **Products created**, **Products updated**, **Products skipped**, **Variants created**, **Variants updated**, **Images added**, **Stock counts set** and **Categories created**.

**Rows it could not use** gives each skipped row's number in the file, its **Handle** and the **Problem**. The rest of the file still imports, and a product with no usable variant row is skipped whole. When the list is long, search it by row, handle or problem, and select **Download as CSV** to fix the rows in a spreadsheet.

## Result

- The imported products appear in [Products](/docs/organizations/commerce/products/), priced in the currency you chose, with their stock counts in [Inventory](/docs/organizations/commerce/inventory/).
- A check changes nothing in the store.

## Troubleshooting

**Check the file** or **Import the file** cannot be selected
: Another import is running. Wait for it to finish, or select **See its progress** to follow it.

The card says **Could not start the import**
: Another import started first, or the file was refused, and the alert gives the reason. **See that import** opens the import that is running.

The file is refused
: It is over 10 MB or 5,000 rows, empty, a spreadsheet file rather than CSV, or not Shopify's product export, such as a file without a `Handle` column. Export fewer products at a time, or save the file as CSV.

The report says **The import stopped**
: The alert gives the reason. The batches it finished stay imported, so send the file again to import the rest.

Imported products are not on the storefront
: The file had no `Status` or `Published` column, so the new products are drafts. Publish them in [Products](/docs/organizations/commerce/products/).

Stock counts were not imported
: The store had no stock location turned on, and **Stock counts are for** said **No location**. [Add a stock location](/docs/organizations/commerce/inventory/#add-a-stock-location), then import the file again.

**Import this file** is missing from a check's report
: The dashboard forgets the file when you reload the page. Select **Upload the file**, then choose the file again with **Import it**.

The report says **No such import**
: The link points to an import this store does not have. Select **All imports** to go back to the list.

## Related

- [Add and edit your store's products](/docs/organizations/commerce/products/)
- [Track stock and stock locations](/docs/organizations/commerce/inventory/)
- [Change your store's settings](/docs/organizations/commerce/settings/)

## With the API

`POST https://api.coritan.com/api/v1/orgs/{org_slug}/commerce/imports` takes the file as the multipart field `file`, with `mode` (`upsert` or `create_only`), `currency_code`, `location_id`, and `dry_run=true` for a check. It answers `202` with the queued import. `GET /commerce/imports/{import_id}` follows it, and `GET /commerce/imports` lists the store's imports. [Import products from Shopify](/docs/organizations/storefront/commerce-api/#import-products-from-shopify) has the details.

```bash
curl -X POST "https://api.coritan.com/api/v1/orgs/acme/commerce/imports?dry_run=true&currency_code=EUR" \
  -H "Authorization: Bearer $CORITAN_TOKEN" \
  -F "file=@products_export.csv"
```
