Wednesday, June 17, 2015

Enabling Personalization ID in WCS 7

Concept

In simplest terms PersonalizationID (USERS.PERSONALIZATIONID) ties together Generic, Guest and Registered user id's together.  so, why do you really need a personalization id. Let us take a practical scenario of precision marketing and remember me functionality.

Use Case

WCS assigns users with a generic user id as soon as the user accesses store pages which do not require unique identification of end user, an example of this would be home page, browse pages. Let's say the user browsed the Men's section and finally decided to buy a product, as soon as user adds this item the cart (Remember the user has not yet logged in) WCS can no longer use the generic user id as generic user id is shared among multiple users visiting the site, to solve this problem, WCS generates a unique user id for the user and ties together the cart item and the generated user id, called as "Guest id" in WCS (This is a valid scenario as most of the B2C sites do not require you to login for "add to cart" functionality until you initiate a checkout process).

Let us think about precision marketing in this use case, on the home page we have a content spot which shows all recently browsed items by a user, from the use case above user browsed men's section as a generic user and added an item to cart as a guest user, so there is no way to tie together the browse history across these two user id's, personalization id solves this problem, since personalization id does not change when the user browsing the site transitions from a generic to a guest user. if we could tie the browse history to personalization id, we can display men's category top sellers on the home page irrespective of user transition from generic -> guest - Registered user id.


Enabling Personalization ID

By default personalization id is switched off in WCS. if you query users table you will notice that personalizationid column is null, this indicates personalizationid is switched off.

select PERSONALIZATIONID from users;

To enable personalization id in toolkit. edit the instance.xml file, this should be located under

<TOOLKIT_INSTALL_DIR>\WCDE_ENT70\workspace\WC\xml\config\wc-server.xml

search for "<PersonalizationId  display="false" enable="false"/>" , change the value of enable to true and save and restart the WCS instance.

Browse through some of the store pages and query your database "
select PERSONALIZATIONID from users;" , this time around you should see long integer values in this column, this indicates that WCS is now assigning personalizationid to the users visiting your site.

Thursday, July 3, 2014

WCS e-commerce solution with powerful cross-channel analytics



Web e-commerce solution with powerful cross-channel analytics
Analytics WCS Report Types Description
Top Line Cross Channel Top Line Cross Channel report provides conversion related KPIs (e.g., sales, average order value, items ordered, etc.) for both the web and call center channels.
Campaigns Campaigns report types provide detailed performance metrics (impressions, clicks, click thru rates, conversion rates, sales, orders, etc.) using the identical hierarchical structure and campaign names specified from within the WebSphere Commerce business user tool set.
Promotions (Web, Call Center and Cross Channel) Promotions reports show a range of performance metrics (orders, sales, average order value, cost of promotion, average cost, sales cost, etc.) associated with discount promotions deployed on a WebSphere Commerce site. Promotions reports include separate views focused on the web and call center channels as well as a combined (web and call center) cross channel view.
E-Marketing Spots E-Marketing Spot reports provide metrics (impressions, clicks, click thru rates, conversion rates, sales, orders, etc.) from the perspective of the individual E-Spots deployed in WebSphere Commerce.
Marketing Experiments Marketing Experiments reports track results (impressions, clicks, conversion rates, sales, etc.) of A/B tests deployed in WebSphere Commerce.
B2B Contracts (Web, Call Center and Cross Channel) B2B Contracts reports provide a hierarchical view of a seller’s business customers matching the hierarchy used in WebSphere Commerce. Within each account, you can view the assigned contracts and associated sales metrics (sales, orders, average order value, average items per order, etc). B2B Contracts also provide specific web, call center and cross channel report views.

Friday, June 20, 2014

Dynamic cache limitation

Dynamic cache limitation
 
If you use the cachespec.xml file to enable invalidation you might encounter the following behaviour:
  • When you create a catalogue entry or move a catalogue entry from one category to another in the Management Center, the catalogue entry would not show up on the storefront.
  • When you create a category in the Management Center, the category would not show up on the storefront.
  • When you update a child object in the Management Center, the parent object cache entry is not automatically invalidated. For example, when you update a catalogue entry in the Management Center, the category display page does not reflect the updates in the storefront.


 To resolve these problems, you have to do invalidate cache manually. 

1. Lunch the Cache monitor using following method:
  1. Access the web application using a web browser with the following web address, most of  this URL will be secure access, its recommended that, access the Administration host machine:
        https://admin_host_name:port/cachemonitor

2. Do one of the following steps:


Option
Description
Remove an entry from cacheClick Invalidate when viewing a cache entry.
Remove all entries for a certain dependency IDClick Invalidate when viewing entries for a dependency ID or click Invalidate when viewing entries for a template
Clear the entire contents of the cacheClick Clear Cache while viewing statistics or contents
Clear the contents on the ESI processorsClick Clear Cache while viewing ESI statistics or contents.
Clear the contents of the disk cache.Click Clear Disk

Monday, April 28, 2014

Managed Assets

Managed assets are files that are uploaded by business users to be used for store marketing or product supplements. They are added to Asset tool or the marketing tool in MC. 

1. Managed assets, when uploaded through MC, are first stored in CMFILE, CMSMALLFILE and CMLARGEFILE tables of WCS DB.

2. From there, the scheduled job "ScheduledContentManagedFileEARUpdateCmd" evaluates its set of criteria in the WCS configuration file (wc-server.xml). The criteria and their default values are :-

minNumOfFilesForUpdate - the minimum number of files for an update to occur.
minSecFromLastUpload - The minimum number of seconds since the last update. 

3. The files are extracted from DB and placed into the EAR of the staging environment.

4. These assets are then pushed to the production environments with the fileprop utility when when stagingprop called. 

Wednesday, March 5, 2014

Collecting DB2 JDBC Driver Tracing Configuration in WAS

The DB2 JDBC driver allows trace configuration through the following data source custom properties. 

traceLevel – Set to “-1” by default to capture all JDBC driver trace data.


                
If the value is null and the WAS.database=all or com.ibm.ws.db2.logwriter=all is included in the WAS trace specification, then the trace will be integrated with the WebSphere Application Server trace.

Append the following to a WebSphere connection pool trace:

WAS.database=all OR com.ibm.ws.db2.logwriter=all

The “WAS.database=all” trace property allows an integrated trace to enabled and disabled during runtime.

Tuesday, March 4, 2014

Troubleshooting and performance using ServiceLogger

ServiceLogger is a new lightweight trace that can be used in mainly in Production environment. This feature available in 7.0.0.4 onwards.

Add the  following code to web.xml file for the Stores.war project. This is for logging of JSP execution times with ServiceLogger requires a new Servlet Filter is registered in web.xml file.


<filter>
  <filter-name>JspExecutionServiceLoggingFilter</filter-name>
<filter-class>com.ibm.commerce.webcontroller.JspExecutionServiceLoggingFilter</filter-class>
  <init-param>
    <param-name>ServletName</param-name>
    <param-value>JspExecutionServiceLoggingFilter</param-value>
  </init-param>
</filter>


<filter-mapping>
  <filter-name>JspExecutionServiceLoggingFilter</filter-name>
  <url-pattern>/*</url-pattern>
  <dispatcher>FORWARD</dispatcher>
  <dispatcher>INCLUDE</dispatcher>
  <dispatcher>ERROR</dispatcher>
</filter-mapping>

Enabling the Logger in the WAS Admin Console:-

com.ibm.commerce.foundation.logging.ServiceLogger={fine,finer,finest}
 
The difference with this logger is that it will write more or less depending on the logging level selected {fine,finer,finest}. This  fine grained control allows to minimize the performance impact for use in production and other environments.

Sunday, March 2, 2014

Websphere Commerces Change CommonsHttpSolrServer To HttpSolrServer


WCS Fix Pack 8 and Feature Pack 7, IBM does not changed from
CommonsHttpSolrServer class to HttpSolrServer in JSPs, its still referring old CommonsHttpSolrServer class in JSP files, so when open any starter store, solr search throws exception. 

In solr 4.0 onwards CommonsHttpSolrServer is not available, so just replace it with HttpSolrServer.It does not documented anywhere.

Solution:-

1. Find all he JSPs which contain CommonsHttpSolrServer reference
2. Replace with HttpSolrServer and save JSPs
3. Restart the app server and enjoy the new feature of FEP-7