When configured to use price lists, Commerce Service Center provides two global context price lists: one for list prices and another for sale prices. Commerce Service Center takes advantage of a Commerce feature that allows the price lists to be passed into the pricing engine through the extra parameter map to override the default behavior that determines which price list to use. The following Commerce PricingTools API is used for pricing orders. For additional information, refer to the Commerce Programming Guide. Note the Map parameter that is included on the API:

public OrderPriceInfo priceOrderTotal(Order pOrder,
                           PricingModelHolder pPricingModels,
                           Locale pLocale,
                           RepositoryItem pProfile,
                           Map pExtraParameters)

The CSRAgentTools API generates a map that contains the IDs of the current global context price list selections. This API is used by Commerce Service Center to generate the extra parameter map for pricing operations. Commerce Service Center has also extended createRepriceParameterMap of all the PurchaseProcessFormHandlers to call this API:

public Map addPriceListParameter(Map pExtraParameters)

The CSRAgentTools API is used for pricing an order that will call addPriceListParameter as part of the process:

public void repriceOrder(String pRepricingOperation, Order pOrder,
           PricingModelHolder pUserPricingModels,
           Locale pLocale, RepositoryItem pCustomerProfile,
           RepositoryItem pAgentProfile,Map pExtraParameters,
           PipelineErrorHandler pErrorHandler)

When loading an order into the global context, Commerce Service Center attempts to extract the correct price lists from the order itself. If the price lists can be determined from the order, they will load into the global context at the same time as the order.

CSREnvironmentTools contains the API for accessing the global context price list selections, setting new global context price list selections and extracting a price list from an order:

public RepositoryItem getCurrentPriceList()
public RepositoryItem getCurrentSalePriceList()

public void setCurrentPriceList(RepositoryItem pPriceList)
public void setCurrentSalePriceList(RepositoryItem pPriceList)

public RepositoryItem getListPriceListFromOrder(Order pOrder)
public RepositoryItem getSaleListPriceListFromOrder(Order pOrder)

For additional information on environment monitoring, refer to the Understanding Environment Monitoring section.

Copyright © 1997, 2014 Oracle and/or its affiliates. All rights reserved. Legal Notices