Defining the store's monitoring list

Professional Edition onlyBusiness Edition only Each store contains a file that defines the items to be monitored by the CSR. The file, CustomerCareMonitorList.jsp, is located in the following directory:

CustomerCareMonitorList.jsp is loaded into the CSR applet when the WebSphere Commerce Accelerator calls the CCMonitorListView command. This command returns a JSP file that returns the following XML string, which defines the monitoring information for the store:

<?xml version="1.0" encoding="UTF-8"?>
<WCS_CUSTOMERCARE>
      <MONITORING_LIST>
         <ATTR ID="4" LABEL="MonitoringVisitorsTableCurrentPage" ></ATTR>
         <ATTR ID="3010" LABEL="MonitoringVisitorsTableInSite" UNIT="30" ></ATTR>
         <ATTR ID="3011" LABEL="MonitoringVisitorsTableInPage" UNIT="30" ></ATTR>
         <ATTR ID="6" LABEL="MonitoringVisitorsTableCart" ></ATTR>
      </MONITORING_LIST>
</WCS_CUSTOMERCARE>

The attribute element (ATTR), as illustrated above, defines a monitoring attribute for the customer.

Attribute Name Description Note
ID The Sametime attribute ID that is used to track this item. required
Label The label key for the description of this item in the properties file. The corresponding description will display in the CSR applet. required
Unit The integer value that indicates after how many seconds that the counter will increase by 1. optional. Used by predefined counter attributes only.

When the CSR launches the CSR applet, the applet loads the XML string, creating a monitoring list. The monitoring list displays the string value associated with the corresponding Sametime attribute. If necessary, JavaScript functions retrieve the attribute values from appropriate store pages.

Note: If the XML string contains an error, or the CustomerCareMonitorList.jsp file cannot be located, the CSR applet uses the default monitoring list, which only includes the customer's name.

Example CustomerCareMonitorList.jsp

The following code example is from the Advanced B2B direct starter store:

<%
// Create XML string
String strCfg=ECLivehelpConstants.EC_CC_XML_HEADER 
      + LiveHelpConfiguration.getOpenTagString(ECLivehelpConstants.EC_CC_XML_ROOT)
     + LiveHelpConfiguration.getOpenTagString(ECLivehelpConstants.
EC_CC_XML_MONITORING_LIST);
%>

<%  // modify this block to customize monitoring list 
      strCfg=strCfg + LiveHelpConfiguration.getMonitorAttributeElementString(ECLivehelpConstants.EC_CC_ST_ATTR_PAGE_URL, "MonitoringVisitorsTableCurrentPage")
 + LiveHelpConfiguration.getCloseTagString(ECLivehelpConstants.
EC_CC_XML_MONITORING_ATTR);
      strCfg=strCfg + LiveHelpConfiguration.getMonitorCounterAttributeElementString(ECLivehelpConstants.EC_CC_ST_ATTR_SITE_COUNTER,  "MonitoringVisitorsTableInSite","30")
 + LiveHelpConfiguration.getCloseTagString(ECLivehelpConstants.
EC_CC_XML_MONITORING_ATTR);
     strCfg=strCfg + LiveHelpConfiguration.getMonitorCounterAttribute
ElementString(ECLivehelpConstants.EC_CC_ST_ATTR_PAGE_COUNTER,  "MonitoringVisitorsTableInPage", "30")
 + LiveHelpConfiguration.getCloseTagString(ECLivehelpConstants.
EC_CC_XML_MONITORING_ATTR);
     strCfg=strCfg  + LiveHelpConfiguration.getMonitorAttributeElementString(ECLivehelpConstants.EC_CC_ST_ATTR_CART_ITEMS,  "MonitoringVisitorsTableCart")
 + LiveHelpConfiguration.getCloseTagString(ECLivehelpConstants.EC_CC_XML_MONITORING_ATTR);
%>

<%
strCfg=strCfg
 + LiveHelpConfiguration.getCloseTagString(ECLivehelpConstants.EC_CC_XML_MONITORING_LIST)
 + LiveHelpConfiguration.getCloseTagString(ECLivehelpConstants.EC_CC_XML_ROOT);
%>

The sample uses the utility methods of the LiveHelpConfiguration class to ensure the correctness of the XML. In order to avoid parsing problems, the sample also uses encoded attribute values. The following table provides more detail on the methods.

Method Description Notes>
static String getOpenTagString(String tagName) returns an open tag string LiveHelpConfiguration.getOpenTagString("HELLO") returns string <HELLO>
static String getCloseTagString(String tagName) returns a closed tag string LiveHelpConfiguration.getCloseTagString("HELLO") returns string </HELLO>
static String getMonitorAttributeElementString(String sAttributeId, String sLabelKey) returns an ATTR element string for the monitoring list LiveHelpConfiguration.getMonitorAttributeElementString("1234", "myLabel") returns string <ATTR ID="1234" LABEL="myLabel" >
static String getMonitorCounterAttributeElementString(String sAttributeId, String sLabelKey, String sUnit) returns a Counter ATTR element string for the monitoring list LiveHelpConfiguration.getMonitorCounterAttributeElementString("1234", "myLabel","60") returns string <ATTR ID="1234" LABEL="myLabel" UNIT="60" >

The following table lists the predefined Sametime attribute IDs that can be monitored.

Attribute ID Description Label Key String Notes
ECLivehelpConstants.EC_CC_ST_ATTR_PAGE_URL The web page that shopper is browsing "MonitoringVisitorsTableCurrentPage" Requires input from store pages
ECLivehelpConstants.EC_CC_ST_ATTR_CART_ITEMS The number of items that have been added to the shopping cart "MonitoringVisitorsTableCart" Requires input from store pages
ECLivehelpConstants.EC_CC_ST_ATTR_SITE_COUNTER How long the customer has been in the store site "MonitoringVisitorsTableInSite" Counter attribute, uses UNIT to set the updating frequency
ECLivehelpConstants.EC_CC_ST_ATTR_PAGE_COUNTER How long the customer has been in this page "MonitoringVisitorsTableInPage" Counter attribute, uses UNIT to set the updating frequency, requires input from store pages to reset the counter
ECLivehelpConstants.EC_CC_ST_ATTR_WAIT_COUNTER How long the customer has been waiting for the CSR "MonitoringVisitorsTableInWait" Counter attribute, uses UNIT to set the updating frequency. Reset by a customer submitting a help request or when a customer is requeued by a CSR during chatting.It is also used to determine which customer will be served first by the CSR when the CSR uses the "Serve Next" button
ECLivehelpConstants.EC_CC_ST_ATTR_REQ_QUEUE Name of the queue that the customer's request is in "MonitoringVisitorsTableQueue Initial queue name, may be provided when a customer submits a help request in store page
ECLivehelpConstants.EC_CC_ST_ATTR_REQ_CSR_NAME Name of the CSR that is chatting with the customer "MonitoringVisitorsTableCSR" Will be updated when a CSR accepts a request from a queue

Note: Customized monitoring items can be defined using the attribute ID greater than 8000. For example,

<ATTR ID="8004" LABEL="MonitoringVisitorsTableItem8004"></ATTR>

Feedback