Tuesday, February 14, 2017

Advanced personalisation in Hybris

Via enabling the advanced personalisation feature there can be a performance degradation in the site depends on the configuration
Personalisation is achieved with the help of the following extensions
   btg - for personalisation
   btgcockpit - for personalisation management via WCMS cockpit
It can be enabled with the help of storefront.btg.enabled property. Upto version 6.0 the extensions are included as part of base accelerator and enabled but the btgcockpit extension is not included.
Along with the above, the following changes need to be added to the web.xml

BTGSegmentFilter
de.hybris.platform.store.web.servlets.BTGSegmentFilter

       
BTGSegmentFilter
/view/*

From version 6.1 onwards btg is not coming up as default feature instead it provided as an add on named b2cbtgaddon
The customer segments can be viewed and edited using the Customer Segment perspective in WCMS cockpit

Step by Step
  1. Open the WCMS Cockpit with Advanced Personalization tool(localhost:9001/cmscockpit)
  2. Select the Customer Segments link from the top left corner (Customer segments normally contains a rules and output action)
  3. Create a new customer segment with name Viewed Beacon Jacket 300441355
    1. Select the catalog version as the staging catalog
    2. Select the store as Apparel Site UK
    3. Select the scope as (Session(D)/Persistent)
    4. Select the mode(Optimized Processing(D)/Full Processing)
  4. Now you will see the Customer segment screen
  5. Add a Customer Segement rule via pressing the + button on right hand side of the Customer Segment Rules session in the screen
    1. Select the type of the Rule(Order Rule/Cart/Customer/Website). We are selecting Website rule
    2. Select the left operand type as 'Has Viewed Products' from first combo box and choose operator as 'contains any'  from second combo box and  type '300441355' in the product text box and select the staging version of the product and press next and press done
  6. Next step is to add the output action
    1. Press the + button on the right hand side of the Output Actions session in the screen
    2. You can select the action(Add user to Group/Show or hide a WCMS Item). We are selecting Show or hide a WCMS Item
    3. Type Mini Cart - APP-S in in the WCMS Component and press next
    4. Select the 'should not see this WCMS Component' radio button and press next and done
  7. Press the Customer Segments Tab and you will see the newly created customer segement
  8. This is created in the staging area and press the synchronize button(a red button just left above to the customer segment) to synchronize the catalog
  9. Once you press synchronize the system create another customer segment on online version
  10. Now go to front end and select any product or any other page. You will see the mini basket
  11. As soon as you press the Glazier jacket product view the min basket component disappear from the page

Visibility of a product for a customer in Hybris store front

The product will be visible only after finishing and satisfying the following valdiations

  1. Catalog url pattern matches
  2. Catalog version active
  3. Category visibility
  4. Date range matches
  5. Product approved(check and unapproved product will not be shown)

Step 1 & 2 will be checked at the start of the session and all other steps are checked on each mouse click

Creating a new Store in Hybris


  • Using modulegen create the corresponding accelerator module (For eg. if we are choosing the b2caccelerator).
  • The above step creates the customised extension for yacceleratorcore,yacceleratorfacade,yacceleratorinitialdata,yacceleratorstorefront,yacceleratortest and yacceleratorcockpit
  • Apparelstore and electronicstore extensions hold the sample store data. We could remove these extensions if we don't need them
  • Identify the changes required in the existing hybris product model for the customer's product model. Apply the changes in the items.xml file from the core extension
  • Create the impex script for product catalog, catalog versions, category taxonomy, classification structure(if applicable) etc. and put it in the initialdata extension
  • Configure solr index

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


Tuesday, September 16, 2014

APAR information on WCS

versioninfo.sh file will provide you the feature pack fix pack information about your WCS installation. But how to get the APAR installed in a particular WCS installation? There are couple of ways you can check this

  • historyInfo.sh file will provide you all the installation/uninstall information about the fix pack feature pack and APARs
  • The file NIFStack.xml will contain the information about the apars installed. The location of the file is /instances//properties/version/update/backup/NIFStack.xml.
  • More information about the APAR installation will be there in /logs/update/APAR_name.install 
 

Monday, September 15, 2014

IHS Access Log for WebSphere Commerce sites

While doing the production server trouble shooting for many of the issues, the investigation starts from the IHS access logs. But the default IHS log configuration will not give you enough details for troubleshooting and diagnose the root cause server. It will be more complicated when there is a cache layer exists as well. The following log level will give you all the information needed for trouble shooting. The log will provide the output in a csv format so that it will be easier for further processing if needed

LogFormat  "\"%h\",\"%{%Y-%m-%d-%H.%M.%S.000000}t\",%p,\"%H\",\"%m\",\"%U\",\"%q\",%>s,\"%b\",\"%{WAS}e\",%D,\"%{CACHED_RESPONSE}o\"" common

h - Client IP
t - Access Time
p - Port
H - Protocol
m - Request method
U - URL without query String
q - Query String
>s - Status of the request
b - size of response in bytes
{WAS}e - Name of the WAS server
D - Time taken to serve request in micro seconds
{CACHED_RESPONSE}o - The request served from dyna cashe or not

If we want to shoe the request and response cookie values then we could use the following parameter for a short period of time

{Cookie}i - Cookie request header
{Set-Cookie}o - Cookie with response

Reference : http://www.ibm.com/developerworks/library/co-websphere-access-feature/
http://httpd.apache.org/docs/2.0/mod/mod_log_config.html#formats

Monday, June 16, 2014

Facebook integration in WCS 7.0

The following step by step instructions will help some one to integrate facebook with WCS Aurora store
  • Open Store Management Tool from Management Center
  • Select the store in which you want to enable face book and open the store via double clicking
  • Select Configuration tab
  • Check the check box named "Facebook Integration" and save
  • The next step is to register the site to face book. If you don't have a facebook developer a/c please register as a developer first
  • Then "Create Application" button in the Facebook developer page and provide the details(You can create 'N' number of applications for each environments like testing,uat prod etc)
  • It will create the AppID. Add the generated to the WCS Database via providing the sql insert into storeconf(STOREENT_ID,NAME,VALUE) values (10001,'wc.facebook.application_id', 'fb_app_id_returned');
  • In the settings session on the Apps session of the Facebook developer page, select the Settings. Then press the "Add Platform" button and select type of application as website
  • The system ask you to enter the url enter http://localhost/webapp/wcs/stores/servlet/en/aurora as the url and press Save changes
  • Restart the server
  • Now when you are going to the storefront you will see the "Connect to Facebook" link the header session
  • You can see the statistics in the Dashboard page of Facebook developer
Reference : http://www-01.ibm.com/support/knowledgecenter/SSZLC2_7.0.0/com.ibm.commerce.aurora-starterstore.doc/concepts/csmsocfbint_aurora.htm?lang=en