Bulk update of prices - Most optimal way?


Hi everybody.

We have a solution with around 200.000 variants/SKUs each of them having around 40 price points (one per market - we have 40 markets).

Once a week we need to adjust all price points for all variants, and we are looking for the most optimal way of doing it. Do any of you have experience in how to bulk update ~8.000.000 million prices in one go?

We have tried to use PriceServiceExtensions.SetCatalogEntryPricesIfNotReadOnly(catalogKeys, priceValuesSubset) to bulk insert prices (e.g. 20.000 price values at a time), but we often end up with an unresponsive server.

Jan 05, 2021 19:12

I am working on a solution were we have 135 000 items in the catalog and 56 markets. Every night we process quite a lot of changes from the backend ERP systems.

We use parallell processing and run batches of 100 items at once using Save method on IPriceDetailService with list of IPriceDetailValue as parameter. You need to experiment a bit on how many you can process in one go - often it depends on the capacity of the database.

Jan 07, 2021 8:14

Hi Mari - We havent tried the IPriceDetailService yet - Is there a reason for using that compared to the IPriceService?

Jan 07, 2021 8:33

Implementation was done a couple of years back in time, can't remember details. But we tried different approaches and at the ended up with IPriceDetailService as best fit based upon requirements. 

Looking into it now, I might lean on IPriceService as best option. Suggested readings:



Jan 07, 2021 9:04

Thank you Mari - We will try to experiment with our different options.

Jan 07, 2021 9:13

IPriceDetailService  is best (if not only option) for saving individual price. Like if you only want to update a price in a specific market. IPriceService is for batch saving, it's overwritting all prices of a specific SKU. If you are updating all (or majority) prices of SKUs IPriceService might be a better option. If you are updating only 1-2 prices per SKU, IPriceDetailService might work better. That's in theory. I really need to do some test to try out :) 

Jan 11, 2021 12:01
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.