I need to update my stock everyday in magento 2 but i dont know how it works.
Do i have to import the same full stock with all columns of my stock.csv and set the qty,is in stock columns with new values ?
or a csv file with only sku,qty,stock availabilty columns?
or a full csv file with all column but only the sku,qty, stock availablity filled ?
Hope somebody could help me.
Best Answer
In order to update stock in Magento 2 using csv, for most scenarios, you will only need to include 'sku' and 'qty' columns.
However, I am assuming for the products in question you already have stock management turned on either globally or per product and you are not using 'backorders'. For more details on advanced stock management see the Magento documentation: http://docs.magento.com/m2/ce/user_guide/catalog/inventory-product-stock-options.html
'is_in_stock' (which maps to 'Stock Availability') is not required either as in most scenarios (based on assumptions above) Magento will auto set this based on whether you provide a stock qty of above 0 or not (i.e. qty of 0 or less will set 'Out of Stock', 1 or above will set 'In Stock')
Finally, the value in the 'qty' column is always the full stock value (not the value you want to increase/decrease by). Therefore a csv like the below is more than sufficient:
I hope that covers everything you need to get a successful import running, if not let me know :)