Posted on 15/02/2022 17:07:05
Hi guys,
Thank you for your reactions.
The ERP is Visma. I understand that we don't connect to it directly but through another API supported by a Visma partner. And our attempts on querying live prices failed (so far).
They have 4 layers of price rules and we have to take the most relevant for the user. They have Generic prices, CustomerGroupPrices, ProductGroupPrices, CustomerPrices.
Normally, this should translate into a set of discounts and some customer-specific prices. But the number of discounts could potentially lead to other performance issues. In my past experience, having 100 discounts would degrade the performance for carts with 100 orderlines because of the evaluation of the discount rules. Maybe something has changed in newer versions but it something I have to keep in mind.
I agree that the majority of price rules will be either CustomerGroupOrices or ProductGroupPrices and only in some cases very specific prices. But the decision to choose the best price based on these rules may generate different results than what the ERP would calculate.
Oh, and on top of that, there are, obviously, time limits for each price rule.
The data structure seemed to fit the PriceMatrix (assuming we can ask the ERP to send us the calculated prices) but if I read correctly your suggestions, we will eventually end up with a custom price provider anyway.
Thank you,
Adrian