The price of a package product is based on the product components in the package. The system uses the following code to calculate package pricing:
List Price
If Product_Component.RATE_STRUCTURE is null
select Product_Pricing.PRICE times [Package Product]Product.PACKAGE_DISCOUNT_PCT
where [Package Product]Product.PRODUCT_ID = Product_Component.PRODUCT_ID
and [Package Component Product]Product_Component.COMPONENT_PRODUCT_ID = Product.PRODUCT_ID
and Product_Component.ACTIVE_FLAG = ‘Y’
and [Package Component Product]Product.ORG_ID = Rate_Structure.ORG_ID
and [Package Component Product]Product.ORG_UNIT_ID = Rate_Structure.ORG_UNIT_ID
and [Package Component Product]Product.PRODUCT_ID = Product_Rate_Code.PRODUCT_ID
and Product_Rate_Code.RATE_STRUCTURE = Rate_Structure.RATE_STRUCTURE
and [Package Component Product]Product.PRODUCT_ID = Product_Pricing.PRODUCT_ID
and Product_Pricing.RATE_STRUCTURE = Rate_Structure.RATE_STRUCTURE
and Rate_Structure. DEFAULT_STRUCTURE_FLAG = ‘Y’
and Product_Rate_Code.ACTIVE_FLAG = ‘Y’
and Product_Rate_Code.ECOMMERCE_FLAG = ‘Y’
and Product_Rate_Code.DEFAULT_RATE_WEB_FLAG = ‘Y’
else
If Product_Component.RATE_STRUCTURE is not null and Product_Component.RATE_CODE is not null
select Product_Pricing.PRICE times [Package Product]Product.PACKAGE_DISCOUNT_PCT
where [Package Product]Product.PRODUCT_ID = Product_Component.PRODUCT_ID
and [Package Component Product]Product_Component.COMPONENT_PRODUCT_ID = Product.PRODUCT_ID
and Product_Component.ACTIVE_FLAG = ‘Y’
and [Package Component Product]Product.ORG_ID = Rate_Structure.ORG_ID
and [Package Component Product]Product.ORG_UNIT_ID = Rate_Structure.ORG_UNIT_ID
and [Package Component Product]Product.PRODUCT_ID = Product_Rate_Code.PRODUCT_ID
and Product_Rate_Code.RATE_STRUCTURE = Product_Component.RATE_STRUCTURE
and Product_Rate_Code.RATE_CODE = Product_Component.RATE_CODE
and [Package Component Product]Product.PRODUCT_ID = Product_Pricing.PRODUCT_ID
and Product_Pricing.RATE_STRUCTURE = Product_Component.RATE_STRUCTURE
and Product_Pricing.RATE_CODE = Product_Component.RATE_CODE
and Product_Rate_Code.ACTIVE_FLAG = ‘Y’
and Product_Rate_Code.ECOMMERCE_FLAG = ‘Y’
else
If Product_Component.RATE_STRUCTURE is not null and Product_Component.RATE_CODE is null
select Product_Pricing.PRICE times [Package Product]Product.PACKAGE_DISCOUNT_PCT
where [Package Product]Product.PRODUCT_ID = Product_Component.PRODUCT_ID
and [Package Product]Product.MEMBERS_ONLY_FLAG = ‘N’
and [Package Component Product]Product_Component.COMPONENT_PRODUCT_ID = Product.PRODUCT_ID
and Product_Component.ACTIVE_FLAG = ‘Y’
and [Package Component Product]Product.ORG_ID = Rate_Structure.ORG_ID
and [Package Component Product]Product.ORG_UNIT_ID = Rate_Structure.ORG_UNIT_ID
and [Package Component Product]Product.PRODUCT_ID = Product_Rate_Code.PRODUCT_ID
and Product_Rate_Code.RATE_STRUCTURE = Product_Component.RATE_STRUCTURE
and Product_Rate_Code.ACTIVE_FLAG = ‘Y’
and Product_Rate_Code.ECOMMERCE_FLAG = ‘Y’
and Product_Rate_Code.DEFAULT_RATE_WEB_FLAG = ‘Y’
Member Price
If Product_Component.RATE_STRUCTURE is null
select Product_Pricing.PRICE times [Package Product]Product.PACKAGE_DISCOUNT_PCT
where [Package Product]Product.PRODUCT_ID = Product_Component.PRODUCT_ID
and [Package Component Product]Product_Component.COMPONENT_PRODUCT_ID = Product.PRODUCT_ID
and Product_Component.ACTIVE_FLAG = ‘Y’
and [Package Component Product]Product.ORG_ID = Rate_Structure.ORG_ID
and [Package Component Product]Product.ORG_UNIT_ID = Rate_Structure.ORG_UNIT_ID
and [Package Component Product]Product.PRODUCT_ID = Product_Rate_Code.PRODUCT_ID
and Product_Rate_Code.RATE_STRUCTURE = Rate_Structure.RATE_STRUCTURE
and [Package Component Product]Product.PRODUCT_ID = Product_Pricing.PRODUCT_ID
and Product_Pricing.RATE_STRUCTURE = Rate_Structure.RATE_STRUCTURE
and Rate_Structure.MEMBER_PRICE_FLAG = ‘Y’
and Product_Rate_Code.ACTIVE_FLAG = ‘Y’
and Product_Rate_Code.ECOMMERCE_FLAG = ‘Y’
and Product_Rate_Code.DEFAULT_RATE_WEB_FLAG = ‘Y’
else
If Product_Component.RATE_STRUCTURE is not null and Product_Component.RATE_CODE is not null
select Product_Pricing.PRICE times [Package Product]Product.PACKAGE_DISCOUNT_PCT
where [Package Product]Product.PRODUCT_ID = Product_Component.PRODUCT_ID
and [Package Component Product]Product_Component.COMPONENT_PRODUCT_ID = Product.PRODUCT_ID
and Product_Component.ACTIVE_FLAG = ‘Y’
and [Package Component Product]Product.ORG_ID = Rate_Structure.ORG_ID
and [Package Component Product]Product.ORG_UNIT_ID = Rate_Structure.ORG_UNIT_ID
and [Package Component Product]Product.PRODUCT_ID = Product_Rate_Code.PRODUCT_ID
and Product_Rate_Code.RATE_STRUCTURE = Product_Component.RATE_STRUCTURE
and Product_Rate_Code.RATE_CODE = Product_Component.RATE_CODE
and [Package Component Product]Product.PRODUCT_ID = Product_Pricing.PRODUCT_ID
and Product_Pricing.RATE_STRUCTURE = Product_Component.RATE_STRUCTURE
and Product_Pricing.RATE_CODE = Product_Component.RATE_CODE
and Product_Rate_Code.ACTIVE_FLAG = ‘Y’
and Product_Rate_Code.ECOMMERCE_FLAG = ‘Y’
else
If Product_Component.RATE_STRUCTURE is not null and Product_Component.RATE_CODE is null
select Product_Pricing.PRICE times [Package Product]Product.PACKAGE_DISCOUNT_PCT
where [Package Product]Product.PRODUCT_ID = Product_Component.PRODUCT_ID
and [Package Product]Product.MEMBERS_ONLY_FLAG = ‘N’
and [Package Component Product]Product_Component.COMPONENT_PRODUCT_ID = Product.PRODUCT_ID
and Product_Component.ACTIVE_FLAG = ‘Y’
and [Package Component Product]Product.ORG_ID = Rate_Structure.ORG_ID
and [Package Component Product]Product.ORG_UNIT_ID = Rate_Structure.ORG_UNIT_ID
and [Package Component Product]Product.PRODUCT_ID = Product_Rate_Code.PRODUCT_ID
and Product_Rate_Code.RATE_STRUCTURE = Product_Component.RATE_STRUCTURE
and Product_Rate_Code.ACTIVE_FLAG = ‘Y’
and Product_Rate_Code.ECOMMERCE_FLAG = ‘Y’
and Product_Rate_Code.DEFAULT_RATE_WEB_FLAG = ‘Y’
Also in this section:
· Defining General Package Information
See also:
· Creating an Order for a Package