Developer forum

Forum » Ecommerce - Standard features » Price matrix limitations

Price matrix limitations

Adrian Ursu Dynamicweb Employee
Adrian Ursu
Reply

Hi guys,

I have a project that is going to be integrated with an ERP that does not support LivePricing and we need to figure out the most efficient way of handling prices.

Of course, our first option would be PriceMatrix where we would store every price calculated for every CustomerNumber and ProductNumber.

But that will generate about 200 million lines. Is this supported by the PriceMatrix? Will there be any performance hit?

Thank you,

Adrian

 


Replies

 
Morten Bengtson Dynamicweb Employee
Morten Bengtson
Reply

Is there no way that you can request prices directly from the ERP?
Does all customers have unique prices for all products or could that be simplified by grouping customers and/or products in some way?

You can try to import the 200 million prices to price matrix and see how it works.
Adding more prices will degrade performance, because it will take longer to find the correct prices in a given context, but it depends on your data whether it will become an issue or not. If you have a million prices for each product then it might be an issue.

Alternatively you could import prices with relevant criteria to a custom table and then create a custom price provider which finds the correct price in that table.
That would make it possible to add custom price logic, table indexes and caching to improve performance.

 
Imar Spaanjaars Dynamicweb Employee
Imar Spaanjaars
Reply

Also, do you really need all 200 million rows? I ran into this before and we found that the following changes lowered the number of rows by a large amount:

1. Add customers to price groups and assign the prices to the groups. That way, you have a price per product per group and not per user.

2. While each unique user can have a unique price they typically don't. So instead of importing all possible combinations, you import just the defaults and any variations. That way, if the customer number doesn't exist in the matrix, the default is used. If it does exist, the customer specific price is used.

You could combine the above with Morten's suggestions about a custom PriceProvider.

Hope this helps,

Imar

 

 
Adrian Ursu Dynamicweb Employee
Adrian Ursu
Reply

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

 
Nuno Aguiar Dynamicweb Employee
Nuno Aguiar
Reply

Hi Adrian,

 

I guess the thought of the customer updating pricing rules and/or logic would result in a massive batch update OR the price provider to be rebuilt, poses such a risk, that an effort to get Live Pricing (rather than replicate the logic and/or get calculated prices imported batch) be the most logical choice IMHO.

 

Best Regards,

Nuno

 
Adrian Ursu Dynamicweb Employee
Adrian Ursu
Reply

Hi Nuno,

I agree. I can see at least 2 potential issues with replicating the ERP logic:
1. Roundings
2. Rule priority

We'll have to go back to the customer and present the options and the risks.

I still feel that having Liveprice handled by the ERP would be the wisest decision. But at this point, I am unaware of the reasons why we can't have it.

Thank you all for pitching in.

Adrian

 

 

 
Imar Spaanjaars Dynamicweb Employee
Imar Spaanjaars
Reply

>> I still feel that having Liveprice handled by the ERP would be the wisest decision. But at this point, I am unaware of the reasons why we can't have it.

I totally agree!

 

You must be logged in to post in the forum