Importing Stock in a Bulk

Are you looking for a way to import stock for the bulk of products in one step? In this tutorial we walk you through a convenient way for doing this with one of the IMPEX commands.

Products to which stock has to be imported

Imagine we have 5 products in the project to which we would like to import stock. Given image below shows the list of products, where the Availability shows n/a (not applicable).

Products Main Page
Product main page

Since we don't want to waste the time in adding stock for each product one by one in the Merchant Center, we rather look for a way to import stock for all the products in one step. Following is the image for single stock import.

Single stock
Single stock import

Stock import command

From the IMPEX tool, we select the IMPEX "Stock Import" command which we are going to use for importing stock to the products like shown below:

Stock import command
Select Stock import command

Stock import

The given image below shows the Stock import command page.

Stock import
Stock import command

For importing stock of a bulk of stocks, we need to upload a file either in CSV or XML format, that contains at least two columns: one for the SKU of the product variant and one for the quantity telling how many items of that variant are available in stock.
Following table shows an example CSV file for 5 product variants identified by their SKU and their respective quantity in stock that should be imported. The column headers should be spelled exactly as shown in the example.


As shown in the image below, we need to drop the CSV file on the drop file area of the Stock import tool, before we hit the Run command button.

File upload
CSV file upload

If everything went well we’ll get a response like the one below confirming that 5 new stocks have been imported successfully.

Output new products
5 stocks imported

The stock only gets updated if the quantity to be imported is different to the current quantity of the product variant on the platform. Below image demonstrates that only 2 stocks were updated, when importing stock again with a CSV file in which we changed the quantity of 2 stocks, but left the quantity of the 3 other stocks in the file as they were before.

Output existing products
2 stocks updated

Verify product stock

To be really sure that stock of products have been imported in the project, we can verify their Availability in the Merchant Center:
If the Products page looks like the one shown below, we have succeeded in importing stock. Please be aware that updating the stock information on the Products page can take some minutes after importing the stock information.

Product stock after import
Product stock after import

The image below shows the stock of an individual product after using the stock import tool.

Individual Product stock after import
Individual Product stock after import

Further information about the stock import feature, like importing stocks per supply channel or the usage of custom fields, can be found on the GitHub repository of the tool that is executed by the IMPEX Stock import command.