Developer forum

Forum » Development » PricePriority in EcomPrices?

PricePriority in EcomPrices?

Anders Ebdrup
Reply

Dear DynamicWeb,

 

We have a requirement where we need to prioritize prices when multiple prices apply.

Initially, I was pleased to find the PricePriority field in the EcomPrices table, as it seems to be designed exactly for this purpose. However, during implementation, we have observed that the field does not appear to have any effect in practice. After reviewing the source code, it also looks like the field is currently not used by the pricing logic.

Could you please clarify the original intention behind the PricePriority field?

  • Is it intended to be used for price selection or prioritization?
  • And if not, are there any plans to support it in future versions?

This information would help us determine whether we can rely on this field or need to implement a custom prioritization approach.

 

Best regards, Anders


Replies

 
Nicolai Pedersen Dynamicweb Employee
Nicolai Pedersen
Reply

Hi Anders

Yes, I guess that is the thought - thoug it is not part of the current logic. I can see 100 things going wrong if we change it - so we probably added the field to use in custom priceproviders.

There are these settings that will affect in which order the prices are fetched from DB, cached and in what order the DefaultPriceProvider handles them:

/Globalsettings/Ecom/Price/List/UseCustomOrder = True
/Globalsettings/Ecom/Price/List/CustomOrder = "PricePriority,Id"

But - if you have 2 prices, lets say 100 with priority 2 and 110 with priority 1, I still think the 100 will be returned as it is lower than 110.

 
Anders Ebdrup
Reply

Hi Nicolai,

 

Thanks for the answer - that was also my thought/worries about this.

I am pretty sure that e.g. BC uses priorities, so it will try to find the most specific price for a customer, and in that "group" of prices find the lowest price, so we are really missing the full implementation of the priority field.

BTW It seems like a lot of coding to do by us to implement this behaviour in our own priceprovider, as all it seems to require will be a change like this:

 
Nuno Aguiar Dynamicweb Employee
Nuno Aguiar
Reply

Hi Anders,

 

If it's getting the lowest price anyway, what does priority matter?

 

Unless we'd have to save which "price Id" it matched (i.e. Price = $100; PriceID = XmasSpecial as opposed to Price=$100 ; PriceID = PriceAgreement202509), which I don't believe it's done anywhere.

 

// Nuno

 
Anders Ebdrup
Reply

Hi Nuno,

 

The price priority could the very nice to have, as we have several customers that have a requirement that a customer specific price overrules an "All customers" price even if the price is higher, and here would the price priority field come in handy, as we then just could use the PricePrority-field instead of creating a custom priceprovider.

 

Best regards, Anders

 
Nuno Aguiar Dynamicweb Employee
Nuno Aguiar
Reply

Hi Anders,

 

I see, so that really means that a setting to determine how Prices are returned is needed. Meaning, choose between the "Cheapest" or "By Priority" (unless DW always goes by priority, assuming nulls and 0 when only wanting to apply the Cheapest)

 

Thanks for clarifying it. Usually it's the US customers asking for the weirdest things :P

Nuno Aguiar

 
Nicolai Pedersen Dynamicweb Employee
Nicolai Pedersen
Reply
This post has been marked as an answer

We are currently exploring these features: https://github.com/dynamicweb/DynamicWeb/issues/497

I have asked the PM to include priority into the coming updates of price matrix.

Votes for this answer: 1

 

You must be logged in to post in the forum