Confused by GetPerformanceDetailWithDiscountingEx()

Former Member
Former Member $organization

Hi all,

Just when I thought I understood the results of GetPerformanceDetailWithDiscountingEx(), I'm getting some results that don't make sense, though it may be that someone has set up discounted price types incorrectly.  How should I consider the three tables, Price, PriceType, and AllPrice?  By what general algorithm should I expose zones and price types for a user to choose from?

Here's what I originally thought:

  • Price - the default pricing for each zone
  • PriceType - metadata about each price type
  • AllPrice - a list of all possible zone-price-type combinations

My main question would be, how do you know when a price type should be offered to the user?  The system that I'm working with is returning all kinds of discount price types that should not be shown to web users by default.  I can't figure out how to differentiate.

Also, what is the meaning of the "def_price_type" field of the PriceType table?  What purpose does it serve that the AllPrice table's "def_price_type" field doesn't already serve? That seems to imply that a single price type must be set as default for every single zone.

Other than that, what is the practical use for the Price table?  It seems redundant from the AllPrice table.

Thanks for your advice,
Bryan 

Parents
  • Hi Bryan,

    The way that I understand it is that the Price table lists out the default pricetype for the mos..  There could be multiple rows because of zone. 

    PriceType  table has the pricetypes that are availale to the customer with information whether or not it is a promo price type.  The AllPrice table lists out all the price types that are potentially available , along with zone info.  I am joining pricetype and allprice based on the price type id, to get my avalilable pricetypes by zone for the user.

    The def_price_type in allprice has the id of the default price type for the mos of sale.  I can send over some code too if you like.

    Hope it helps,

    Jon

Reply
  • Hi Bryan,

    The way that I understand it is that the Price table lists out the default pricetype for the mos..  There could be multiple rows because of zone. 

    PriceType  table has the pricetypes that are availale to the customer with information whether or not it is a promo price type.  The AllPrice table lists out all the price types that are potentially available , along with zone info.  I am joining pricetype and allprice based on the price type id, to get my avalilable pricetypes by zone for the user.

    The def_price_type in allprice has the id of the default price type for the mos of sale.  I can send over some code too if you like.

    Hope it helps,

    Jon

Children
No Data