Tutorial

How to import stock for the bulk of products?

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 powerful IMPEX commands.

Products to which stock has to be imported

Imagine we have 5 products in our 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

Since we don’t want to waste our time in adding stock for each product one by one in the ↗ Admin Center EU (or ↗ Admin Center US ), 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

Stock import command

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

Stock import command

Stock import

The given image below shows the Stock import command page.

Stock import

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.

skuquantityOnStock
sku_MB_PREMIUM_TECH_T_variant1_148369478955455
sku_MB_SOFTSHELL_LINER_variant1_147393390920473
sku_WB_ATHLETIC_TANK_variant1_147393390920345
sku_GIRLS_HARTBREAK_CREW_variant1_147393390920265
sku_SAPPHIRE_variant1_147393390919932

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

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

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

Verify product stock

To be really sure that stock of products have been imported in our project, we can verify their Availability in the ↗ Admin Center EU (or ↗ Admin Center US ):
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

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

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.