cancel
Showing results for 
Search instead for 
Did you mean: 

Salable Quantity not updating after stock source import

Salable Quantity not updating after stock source import

I am setting up a new store on a local server. I imported products from several CSV files. I believe manage_stock was set to 1 and is_in_stock was set based on the stock. The initial stock should have gone to the default source. I then setup MSI with throee sources, my store and two drop ship warehouses. I imported the stock sources from CSV. I noticed that most of my categories were empty and the products were not showing up on the front end. I turned on show out of stock products and they all showed up so I realized that the issue was stock related.

 

When I look at the product grid, I see my inventory in the Quantity per Source column. However, in the Salable Quantity column, I see "No manage stock". The products only had two sources assigned. I tried editing a product and adding the Default Source. I saved the product and the Salable Quantity column showed correct inventory and the product would show up on the frontend. So for kicks, I added different sources and every time it seemed to fix the issue. So for more kicks, I opened the product and immediately saved the product. I was surprised to see that the inventory in Salable Quantity was fixed. So simply saving the product fixed it. Since I have thousands of products to update, I tried using bulk updates to update both attributes and assigning/unassigning sources none of these would I trigger the update. The only thing that has worked is manually opening each product and saving it. 

 

I started looking at the tables. I have looked at inventory_stock_1 and it was populated. The inventory_source_item table was populated correctly with one record for each product and source. l have about 27K products. When I checked cataloginventory_stock_status and cataloginventory_stock_item, they only had 7K products. I also noticed that each time, I saved a product in admin, the cataloginventory tables got a new record. 

 

I'm not sure exactly what happened to cause this. What would be an easy way to get this synced up? Can it be done with a bulk update? SQL? can I populate the categoryinventory tables from inventory_source?

1 REPLY 1

Re: Salable Quantity not updating after stock source import

Hey Paul,

we have the exact same problem with about 12K products. Whenever we import the products, some of them are magically out of stock. When we save those products manually in the admin panel, it is suddenly possible to buy them again.

 

We checked pretty much every single table in the database before and after and couldn't find any hints of this problem. Have you solved this issue yet?

 

Best regards

 

Nicolas