Stock import
The stock import changes stock levels in bulk from an Excel workbook. Each row adds stock to, or removes stock from, one product in one warehouse, and becomes a stock movement.Before you start
- You need the Import Stock Items permission, under Inventory Management.
- The import is part of Inventory Management. If Inventory Management is not enabled for your organization, it is not available.
- The products must exist in the Catalog, and the warehouses on Inventory > Warehouses, each with a code.
Import a file
1
Open the import
Open Inventory > Stock Levels and choose Data > Bulk import. The Bulk stock import window
opens.
2
Get the template
Click Download template. You get
stock-import-template.xlsx, with the header row only.3
Fill in the rows
Add one row per product and warehouse, under the header row; see Columns.
4
Upload the file
Drop the file on the window, or pick it from your computer. Omnilinker reads it and shows a preview: the number of
valid rows, the number of invalid ones, and the first 50 rows, with invalid rows highlighted.
5
Run the import
Click Run import. Invalid rows are skipped; to include them, fix the file, click Back and upload it again.
The window shows the progress as a percentage and as rows processed, succeeded (
OK) and failed (fail), then
Import complete.File
- An Excel workbook,
.xlsx, of at most 5 MB. CSV and older.xlsfiles are not accepted. Split a larger file into several smaller ones. - The first row is the header row. Data starts in row 2. Through the API, each row’s
lineNumberis its row number in the sheet. - Keep the header names exactly as in the template. They are in English whatever the language of your Omnilinker.
Columns
Quantity is a change, not the new stock level: a row with 5 adds five units to whatever is in stock. A positive
quantity is saved as a positive adjustment, a negative one as a negative adjustment, on Stock Movements.
Example:
Why a row is skipped or fails
The window counts invalid and failed rows but does not say why. Check the rows against these rules. A row is invalid, and skipped, when:
A valid row fails while the import runs, and the other rows still import, when:
- no product has the SKU (check upper and lower case),
- no warehouse has the code,
- the row would take the stock below zero.
- it is larger than 5 MB: “Excel file exceeds the 5 MB limit. Split it into smaller batches.”
- it is not an Excel workbook: “The file is not a valid Excel (.xlsx) workbook, or it is corrupted. Download the template and try again.”
Import stock through the API
The same import is available to an API key with the Import Stock Items permission:POST /api/inventory/stock-import/parse-excelwith the workbook as a base64-encoded JSON string. The answer is the preview:rows, each withlineNumber,sku,warehouseCode,quantity,reason,notesandvalidationError, plusvalidRowCountandinvalidRowCount.POST /api/inventory/stock-import/enqueue-importwith{ "rows": [ … ] }. Rows with avalidationError, or without a SKU or warehouse code, are left out. The answer is the import’s id, and the import runs in the background.
enqueue-import. Give each row its own
lineNumber: Omnilinker uses it to make sure a row is applied once even if the background import is retried. That
protection covers one import only: each call to enqueue-import starts a new import, so sending the same rows twice
changes the stock twice. To check the result, read the stock levels or the stock movements afterwards; the progress of
an import is not available through the API.
GET /api/inventory/stock-import/import-template returns the template.
Exports
Exports are Excel workbooks unless noted. Column headers are in English. Times are in UTC, written asyyyy-MM-dd HH:mm:ss unless noted.
When an export would go over its limit, narrow the filters first. The stock exports stop at the limit; the other
exports refuse to start and say how many rows the filters match. Exporting the filtered offers also needs at least one
active filter: “Export requires at least one active filter. Please narrow your query before exporting.”
Exporting needs the export permission of the page, such as Export Stock Items and Export Stock Movements under
Inventory Management. The Catalog’s exports are described in
Importing products, prices and images, and the price history’s CSV download in
Price history.
Stock levels
One row per product and warehouse. Sheet name:Stock Levels.
Product SKU, Product Name, Brand, Category, Warehouse, On Hand, Reserved, Reserved (ERP), Available,
On Order, In Transit, Reorder Point, Safety Stock, Max Stock Level, Reorder Quantity, Status,
Discontinued, Notes.
Status is one of InStock, LowStock, OutOfStock, NoStock or Overstock. Quantities have up to four
decimal places.
Stock movements
One row per movement. Sheet name:Stock Movements.
Date, Product SKU, Product Name, Warehouse, Movement Type, Quantity, Running Balance,
Reference Number, Reason, Source Warehouse Id, Destination Warehouse Id, Lot Number, Serial Number, Notes.
Date is when the movement was recorded, in UTC. Movement Type is one of Receipt, Shipment,
AdjustmentPositive, AdjustmentNegative, TransferOut, TransferIn, Reservation, ReservationRelease, Return,
Scrap, CountAdjustment, InitialStock, ErpSync or ExternalSync. The warehouse ids of a transfer are GUIDs.
Offers
Sheet name:Offers Export.
Product Name, SKU, GTIN, Merchant, Data Source, Current Price, Currency, Availability,
Reference Price, Reference Currency, Basis Level, Basis Origin, Price Difference (%), Price Difference,
Last Update, External Offer ID, Offer URL, Created Date.
See Offers for what the reference price and the difference mean.
Product overview
Sheet name:Product Overview Export.
Product Name, SKU, GTIN, Brand, Comparison Price, Purchase Price, Offer Currency, Reference Currency,
Purchase Currency, Total Offers, Available Offers, Not Available Offers, Total Violations, Lowest Price,
Average Price, Highest Price, Median Price, Price Deviation (%), Below Market (%), Tracking Status,
Last Update, Created Date, Merchants, Has No Offers, Has Stale Data.
See Product overview.
Price gaps
The Export gaps window of the manufacturer dashboard offers three formats: Excel, CSV and Evidence pack (one CSV per reseller plus a summary, zipped). Excel and CSV have the same columns. Excel puts them on a sheet namedGaps:
Product, SKU, GTIN, Reseller, Authorised seller, Source, Market, Price, Currency, Reference,
Reference currency, Reference level, Deviation %, Difference, Band, Gap since (UTC), Availability.
Options under Include add columns or a sheet:
- Offer URL and scrape time for every row adds
Offer URLandSeen at (UTC). - Who moved first, and case status adds
Moved first,CaseandCase status. - A sheet with the … offers that cannot be compared (Excel only) adds a second sheet,
Not comparable, withProduct,SKU,Reseller,Source,Market,Price,Currency,Why it cannot be compared,Reference currency,Reference levelandSeen at (UTC).
Authorised seller holds Yes or No, and Moved first holds Yes or nothing. Times are in ISO 8601, in UTC.
Gap since (UTC) starts with before when the gap was already open where the price history Omnilinker keeps begins.
The CSV file is meant for other tools and scripts:
- UTF-8 with a byte order mark.
- Comma-separated, with CRLF line ends. A value with a comma, a quote or a line break is put in double quotes, and a quote inside it is doubled.
- Numbers use a dot for decimals and no thousands separator, whatever your language: prices with two decimals,
Deviation %with one. - A text value that starts with
=,+,-or@gets a leading', so a spreadsheet does not run it as a formula. Strip it if your script needs the original text.
- one CSV per reseller, named after the reseller’s domain and the date, with the columns
Product,SKU,GTIN,Reference price level,Recommended price,Currency,Price in the shop,Difference (%),Checked at (UTC),SourceandOffer link; summary.txt, which states the scope, when the pack was made, the reference price level per market, the tolerance and the counts;not-comparable.csv, when you tick A file with the … offers that cannot be compared.
Stock import
The stock import, step by step.
Importing products, prices and images
The Catalog’s import and export files.
Stock levels and movements
What each quantity means.
Developer overview
Call the API instead of exchanging files.