View Markdown

Imports and bulk actions

Import up to 100,000 rows from a file into a model, and publish, reprice, restock or delete thousands of products in one go. Both run in the background on the server: you can close the browser and come back.

Two jobs in the admin are too big to finish in one click: importing a large file into a model, and changing thousands of products at once. Both run in the background on the server. You start them, you can leave, and the page you started them from shows where they are when you come back.

Every screenshot below is numbered. The list under each picture says what the numbered element is, when to click it and what happens next.

Import records from a file

You need a model to import into and a .csv or .xlsx file whose first row holds the column names. To start an import your role needs the right to edit models.

1. Open the import window

Go to Models in the left menu and open the model. Above the record list, on the right, click Import CSV.

The record list of a model with the Import CSV button marked

2. Choose the file

A panel opens on the right side of the screen.

The import panel with the Select file button

3. Match columns to fields

The file is read in your browser and its columns are matched to the model's fields by name. Nothing has been sent anywhere yet, so this is the place to look twice.

Column mapping with a preview of the first five rows

4. Watch the three steps

An import goes through three steps, and the panel always tells you which one it is in.

Step 1 - uploading. This is the only step that needs your browser.

Step 1 of 3, uploading rows

Step 2 - checking. Every row is checked against the model: required fields, number and date formats, values that must be unique. No record is created during this step.

Step 2 of 3, checking rows

If you close the panel now, the progress moves to a line above the record list:

Progress line above the record list

Step 3 - writing. If every row passed the check, this step starts by itself. If some rows failed, the import stops first and asks you - see the next section.

Step 3 of 3, importing rows

5. When some rows are invalid

An import with invalid rows writes nothing until you decide. A yellow bar appears above the record list and stays there until someone answers it. An import left waiting for 24 hours is cancelled.

Yellow bar: the import is waiting for your decision

Click Open to see what is wrong:

List of invalid rows with three choices

Which button to pick:

  • The invalid rows do not matter, or you will add them by hand later - Import the valid rows.
  • The file itself is wrong (a shifted column, a wrong number format) - Cancel import, fix the file, import again.
  • You want to fix only the bad rows - Download report, then Import the valid rows, then import a small file with the corrected rows.

6. The result

When the last row is written the panel shows the totals.

Import completed with totals

The same totals stay above the record list, so a colleague who opens the model later sees what happened. A finished import is kept for 7 days.

Summary line above the record list

Cancel an import

Cancel import is available in every step. It always asks first, and the question tells you what a cancel means at that moment.

Cancel the import? confirmation

A cancel does not undo anything: records that were already written stay. The summary shows how many that was.

Import cancelled summary

When an import stops on its own

If the server loses a step - a deploy, an outage - the import does not hang forever. After about 10 minutes without progress it is marked as stopped, and the line above the record list turns into a warning.

Import stopped line with the Resume button

Open shows the same thing in the import panel:

Import panel: Import stopped, records written 2,000 of 20,000, with Resume

Nothing is lost when an import stops: the records written so far stay, and Resume writes only the rest. You can resume for 7 days.

Two stops cannot be resumed, because the model changed under the import: the model was deleted, or the field used to match existing records is no longer unique. Start a new import in that case.

Change or delete products in bulk

Bulk actions work on the products of one product model. Updating needs the right to edit models, deleting needs the right to delete them.

1. Open the catalog

The product catalog with the model selector and the select-all checkbox

Use the search box and the two filters first if you only want part of the catalog - a bulk action applies to what is selected, and select all follows the current search and filters.

2. Select the products

Ticking the box in the table header selects the products on the current page. A bar appears above the table.

25 selected, with the Select all 6000 matching link

3. Pick the action

The bulk action bar with 6000 products selected

Set stock and Set price replace the value: every selected product gets exactly the number you typed. The price is in your workspace's default currency; prices in additional currencies are left as they are.

4. Follow the progress

A small selection is applied at once. A large one becomes a background job, and the bar is replaced by a progress line.

Processed 500 of 6,000 products, with a Cancel button

One product model runs one job at a time. Wait for the running job, or cancel it, before you start the next one.

5. The result

6000 products updated

A finished job leaves no line on this page. Who ran it and how many products it changed is recorded in the audit log.

Cancel a bulk job

The bulk edit stopped: it was cancelled. 4,000 products were already updated.

Reload the page after a cancel to see which products already carry the new value.

Delete in bulk

Delete selected products? confirmation

Skipped products are not an error: a product that sits in an open order, or that a page still shows, is left in place on purpose.

When a bulk job stops on its own

As with an import, a job that makes no progress for about 10 minutes is marked as stopped. A yellow bar on the catalog page says why and how far it got.

The last bulk edit stopped, with the Resume button

Resuming a delete asks for confirmation again. You can resume for 7 days.

Coming back to a running job

There is no separate screen that lists background jobs. A job belongs to the page it was started from, and the server keeps its state, so closing the tab, signing out or switching computers does not interrupt it.

  • An import - open Models, then the model you imported into. The progress line, the yellow decision bar or the summary is above the record list. Open brings the import panel back.
  • A bulk product job - open Commerce, stay on Products, and pick the same product model. A running job shows its progress line; a job that stopped on its own shows the bar with Resume.

So the one thing to remember is which model the job ran on.

What a member without edit rights sees

A member whose role can view models but not edit them - the built-in Viewer role, for example - sees the same progress and results, without any button that would change the job.

A read-only member sees that the import waits for someone with edit access

The product catalog for a read-only member, without checkboxes

The same goes for a job that is running or has stopped: the member sees it, and cannot cancel or resume it.

A running bulk job for a read-only member, without the Cancel button

A stopped bulk job for a read-only member, without the Resume button

A stopped import for a read-only member, without Resume and Open

This is not only hidden in the interface: the server refuses a cancel, a confirm, a resume or a new bulk job from an account without the right.

Limits at a glance

  • One file: up to 100,000 rows and 50 MB.
  • One import per model at a time, one bulk job per product model at a time.
  • An import waiting for a decision is cancelled after 24 hours.
  • A stopped import or bulk job can be resumed for 7 days.
  • A finished import and its report are kept for 7 days.

Next steps

  • Data Models - fields, required and unique rules that the check step enforces.
  • Commerce - product models, stock and prices.
  • Members and Roles - who may edit and delete models.
  • MCP tools - the same imports and bulk jobs, started by an agent.