Skip to content

Products & Inventory

Import stock-outs from a CSV file

Use the Stock-outs tab of Settings, then Import, to record many stock-outs at once from a CSV file. Covers the template, the checks, shelves, references and importing a file twice, and the permission you need.

You can record many stock-outs at once from a CSV file, for example a day's sales or a week's usage exported from another system. Each row becomes one stock-out, exactly like one entered by hand: the same stock rules apply, and it appears with your other stock movements.

How to import stock-outs

  1. Open Settings, then Import, and choose Stock-outs.
  2. In Step 1, select Download to get the template. Replace its two example rows: the codes SKU001 and SKU002 are only examples, and a row with a code you do not have is refused.
  3. Fill in one row per stock-out, with the quantity as a positive number, and save the file as CSV UTF-8.
  4. In Step 3, Upload and review, upload the file and review the results as for products. Nothing is saved until you confirm.
  5. Select the import button, then Yes, Import in the confirmation.
Columns of the stock-outs template
ColumnWhat to enterIf empty
product_codeThe code of an existing product, in upper or lower caseThe row is refused
quantityThe units going out, a number above 0The row is refused
dateYYYY-MM-DD, today or earlier, not in a locked yearToday, in your organisation's time zone
warehouseA warehouse name, in upper or lower caseYour default warehouse
shelfA shelf code in that warehouse, for a product that tracks shelvesUnassigned
commentA note stored on the stock-outNo comment
referenceYour own document or line number, up to 100 charactersNo reference

product_code and quantity are required; if either column is missing, the whole file is refused. A file can hold up to 500 rows; split a larger one and import each part.

The file must be a CSV of up to 10 MB, with commas or semicolons as separators. Write every quantity in one number format, such as 1234.5 or 1.234,5 throughout. A file that mixes formats, or whose quantities could be read either way, is refused before anything is imported.

When a row is refused

A stock-outs import creates nothing, so products, warehouses and shelves must already exist. A row is refused if its product code matches no product or matches a deleted or inactive product, if its warehouse matches none of your warehouses or two of them, or, for a product that tracks shelves, if its shelf code matches no shelf in that warehouse.

A row is also refused if the quantity is missing, not a number or not above 0, or if the date is not written as YYYY-MM-DD, is in the future or is in a locked year. If you belong to departments, a row whose product is in none of yours is refused.

An empty warehouse cell uses your default warehouse. If no warehouse, or more than one, is marked as default, those rows are refused; write the warehouse in each row.

A row is refused if it would take the product's stock in that warehouse below zero on its date or on any later date. Units held for a supplier claim are not available. Rows are checked in date order, then in file order, and each row counts the rows before it.

A row dated before today is recorded at the end of that day in your organisation's time zone, so stock received that day is available to it. A row dated today, or without a date, is recorded at the moment of the import.

Shelves

For a product that tracks shelves, the units leave from the shelf in shelf, or from Unassigned when the cell is empty. The row is refused if that shelf, or Unassigned, does not hold enough. Units taken from two shelves need two rows. For a product that does not track shelves, a shelf code is ignored with a warning.

Importing the same file twice

A row whose reference has already been imported is skipped with a warning, so importing the same file again does not record it twice. Deleting the stock-out frees its reference. If the same reference appears on two rows of one file, the second row is refused.

Results

Refused rows do not stop the others, and a row refused while it is being saved is left out on its own. After the import, Rows to look at gives each row that was not recorded and why, so you can fix those rows and import them in a second file.

Permission

The Stock-outs tab needs the Import Movements permission, which the organisation owner has automatically. Someone with only Import Movements sees only this tab, and someone with only Import Products does not see it.