Import large amount of stock entries

What is the recommended way of importing a large amount of stock quantities?

Importing stock one by one using InventoryItemService.Update(inventoryItem) and InventoryItemService.Insert(inventoryItem) is too slow for our stock imports, especially in a multi server environment.

Feels like we need a function like InventoryItemService.Update(List) or InventoryItemService.UpdateByVariant(…)

Litium version: 7.2.2

Create a DataService and update batchwise, use Create/Update/Delete on the batch and then commit for best optimization with calls to the DB server.

Ok, but cache is not updated when using the DataService, right?

No need to update the cache since its running through the API. But for fetching stuff with DataService, for example on public sites then you need to cache it so no need on hitting the DB every time for same call.

Aha ok, so Update/Insert/Delete will handle cache updates, great!

1 Like

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.