CalculationCodeListDataBean considerations

If your store uses the CalculationCodeListDataBean to show promotion-related information for catalog entries or categories, your settings can affect storefront performance. When you use the CalculationCodeListDataBean, performance can be affected by the number of customer segments and conditions that are specified for promotions, and whether you disable any unused functionality.

The CalculationCodeListDataBean is used by WebSphere Commerce to retrieve a list of CalculationCodeDataBeans that matches a specified set of criteria. With this list, the JSP files for your store can display the available discounts that are associated with a particular category or catalog entry.

Promotion description display

The display of promotion description on a product display page is handled by the DiscountDetailsDisplay.jsp page for a store. This JSP file uses the CalculationCodeListDataBean to filter promotions for which the product is entitled. The data bean is used to filter through promotion conditions, member groups, store IDs, included and excluded catalog entries, and more. For instance, if a promotion applies to a particular product, the promotion description displays on the product display page for all SKUs of that product. The data bean however is limited for filtering out attribute values as specified in the promotion purchase conditions. The data bean cannot filter at the attribute dictionary level. If a promotion applies to only the SKUs that contain specific attribute values, the promotion description still displays on the product display page regardless of which SKUs are selected for the product.

Given the limitation of the CalculationCodeListDataBean data bean, the promotion description can show up on product SKUs that do not qualify for the promotion. When a shopper views the promotion description on a product display page, the shopper can assume that the product SKU that they selected is entitled to the promotion. To avoid this confusion, ensure that the promotion descriptions are descriptive enough to include any targeted attribute value conditions or customer segments. For example, instead of having a description that read: 50% off Luigi Valenti Empire Waist Slip Dress, the promotion can instead read: 50% off Red Luigi Valenti Empire Waist Slip Dress. By including attribute value conditions in promotion description shoppers are correctly informed of the potential promotions that they are entitled.

Number of customer segments and conditions

Similar to promotion evaluation, the CalculationCodeListDataBean can call the member subsystem to retrieve customer segment information for shoppers. The performance of the member subsystem for retrieving customer segment information depends on the number of customer segments available in a store. Customer segments can be defined as an explicit customer segment that has members explicitly added into the segment. The use of explicit segments instead of implicit customer segments can improve performance because calculating implicit segments requires processing resources at run time. Implicit customer segments are defined by using rules that target user data, which can be calculated only at run time. To improve the performance of CalculationCodeListDataBean, you can make the following changes:
  • Enable the WCUserDistributedMapCache DistributedMap to help improve member subsystem logic performance
  • Remove customer segments when the segments are no longer required
WebSphere Commerce Version 7.0.0.6 or later

Disabling unused functions

1To improve storefront performance, disable these functions, if appropriate.

allowUnentitledPromotionsByMemberGroup
This parameter controls whether to include in the storefront promotions that target a member group for shoppers that do not belong to the member group. If you do not use member group targeted promotions, then setting this parameter to true can improve performance by avoiding this check. The default value for this parameter is false. When false, a check is performed to ensure that the shopper belongs to the member group for a promotion. If the shopper belongs to the group, the promotion is included in the storefront.
onlyManagementCenterPromotions
This parameter controls whether only Management Center promotions display in your storefront. If your store uses only promotions that are created and updated in Management Center, you can set this flag to true to disable the check process. Disabling this checking process can improve storefront performance. The default value for this parameter is false. When false, a check is performed to determine whether only Management Center promotions are displaying in the storefront
The following example illustrates how to set these parameters on the CalculationCodeListDataBean.
<%-- CalculationCodeListDataBean is used to show the discount information of the product --%>
<wcbase:useBean id="productDiscounts" classname="com.ibm.commerce.fulfillment.beans.CalculationCodeListDataBean">
      <c:set property="catalogEntryId" value="${productId}" target="${productDiscounts}" />
      <c:set property="isProdPromoOnly" value="${param.productIsProdPromoOnly}" target="${productDiscounts}"/>
      <c:set property="includeChildItems" value="${param.productIncludeChildItems}" target="${productDiscounts}"/>
      <c:set property="includeParentProduct" value="${param.productIncludeParentProduct}" target="${productDiscounts}" />
      <%-- UsageId for discount is -1 --%&gt;</p><p> <c:set property="calculationUsageId" value="-1" target="${productDiscounts}" />
      <c:set property="allowUnentitledPromotionsByMemberGroup" value="true" target="${productDiscounts}" /
      <c:set property="onlyManagementCenterPromotions" value="true" target="${productDiscounts}" /
</wcbase:useBean>
1 The interim fix for APAR JR42205 includes this function.