You can extend one or more of the pricing engine implementations to provide new pricing functionality. For example, you can extend ItemPricingEngineImpl to create an algorithm that prices a set of items differently from the current implementation of priceEachItem. You could create an algorithm that applies promotions in a random order rather than in order of ascending precedence.

Because each implementation of the PricingEngine interface extends the PricingEngineService class, you can extend one or all of the implementations to alter the behavior of a method of PricingEngineService. For example, you could implement the expirePromotion method to send a JMS event enabling the creation of scenarios related to unused and expired promotions. After you complete your extensions, configure the corresponding pricing engine component to use the class. (For more information, see the description of PricingEngineService.)

Each engine can also be extended to leverage existing code. For example, you can extend the pricing engine to determine global promotions using a Personify or NetPerceptions integration. The ItemPricingEngine could be extended to get its global promotions from the integration.

The relevant interfaces are as follows:

  • atg.commerce.pricing.ItemPricingEngine

  • atg.commerce.pricing.TaxPricingEngine

  • atg.commerce.pricing.ShippingPricingEngine

  • atg.commerce.pricing.OrderPricingEngine

  • atg.commerce.pricing.ItemDiscountCalculator

  • atg.commerce.pricing.OrderDiscountCalculator

  • atg.commerce.pricing.ShippingDiscountCalculator

The properties of a promotion Repository Item are in atg.commerce.pricing.PricingModelProperties.

The Qualifier class that holds helper methods is atg.commerce.pricing.Qualifier.

 
loading table of contents...