Thursday, October 9, 2014

Best Selling and Top Browsed Items in Websphere Commerce

Most of the time an eCommerce site has to show the Best Selling items and the Top Browsed items in the store front. Websphere Commerce is having an OOB support for the same. One of the developers asked me how to do this and that is when I realized that it is worth mentioning that steps
  • Make the following changes in the wc-server.xml file
    • Enable personalization ID feature
      •  Ensure that the enable attribute is set to true to the
    • Enable persistent sessions feature
      •  Ensure that the enable attribute is set to true and cookieExpiry value to a +ve value
    • Enable the SensorEventListener(ensre enable attribute is true)
    • Enable the ExperimentEvaluationEventListener(ensre enable attribute is true)
      •  
  • Create an Emarketing spot to show the best selling/ top browsed items
  • Create a Web Activity for the Best Selling or Top Browsed Items and mention the E-Marketing spot created just above. Please note that the Best Selling & Top Browsed is limited to a Category
  • Now the system will show the top browsed and best selling items in the E-marketing spot. But even after doing all these you will not be able to see any of the best selling items. To see the best selling items you need to wait for next day because by default the scheduled job runs at 2:00am. If you want to see the best selling/top browsed item immediately, you need to do the following steps 
    • Browse and place orders in  multiple, different catalog entries in the target category
    • Run the RaiseECEvent scheduled job(This might not be required in case top browsed items list) using Admin Console. When a customer places an order, the RaiseECEvent job asynchronously check whether the categories associated with the purchased products match against any of the defined Display Best Sellers Web activities
    • Run the SaveMarketingStatistics scheduled job to save the Best Selling/Top Browsed events from memory to the DMRANKINGSTAT  table
    • Run the SQL query to make sure that SendMarketingTrigger job will take all the DMACTIVITY_IDs those are there in the DMARKETINSTAT table
      DELETE FROM DMACTATTR WHERE DMACTIVITY_ID = 0 OR DMACTIVITY_ID = 
      (SELECT DMACTIVITY_ID FROM DMACTIVITY WHERE NAME = '')
    • Run the SendMarketingTriggers job to aggreate the statics from DMRANKINGSTAT  to DMRANKINGITEM table
Reference :
http://www-01.ibm.com/support/docview.wss?uid=swg21576498
http://www-01.ibm.com/support/knowledgecenter/SSZLC2_7.0.0/com.ibm.commerce.admin.doc/refs/rsbtestranking.htm?lang=en