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.
Hi Mari - We havent tried the IPriceDetailService yet - Is there a reason for using that compared to the IPriceService?
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:
https://vimvq1987.com/price-optimizing-to-be-or-not-to-be/
https://devblog.gosso.se/2020/11/update-prices-properly-in-episerver-commerce/
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 :)
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.