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 commercetools™ platform 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 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

For importing stock of the bulk of products, we need to upload a file either in CSV or XML format, that contains only two columns with header ‘SKU’ and ‘quantity’. The given image below shows the Stock import page.

Stock import

Following image is an example of csv file for 5 products with the SKU and quantity as headers.

Csv file

As shown in the image below, we need to upload the CSV or XML file to Stock import, before we hit the Run command button.

File upload

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

Output new products

Below image shows what will be the output, if the stocks are imported only for already existing products.

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.

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

comments powered by Disqus