Customer care will work without a frameset, however none of the monitoring customer activities will be available to the CSR. That is, information gathered from a customer is only accurate to the moment when the customer submits the help request. If after that point a customer changes pages, or adds more items to the shopping cart, the new information will not be updated for the CSR in the monitoring list.
In order to use customer care without a frameset:
- Add the following code to the JSP file that includes the link to launch the chat page:
<script> function LaunchChat() { <% String pname = request.getRequestURI(); int indpn = pname.lastIndexOf('/'); indpn = pname.lastIndexOf('/', indpn-1); if(indpn != -1) { pname = pname.substring(indpn+1);} String headerType = (String) request.getAttribute("liveHelpPageType"); if (headerType==null) { headerType="";} if (headerType.equals("personal")) { %> currentPageURL='PERSONAL_URL'; <% } else { %> currentPageURL=escape(location.href); <% } %> currentpageDesc="<%=pname%>"; chatURL="<%=com.ibm.commerce.tools.util.UIUtil.getWebappPath(request)%> CCChatPageView?" + "pageURL=" + currentPageURL + "&pageDesc=" + currentpageDesc; WindowName=""; chatAttr="toolbars=no,location=no,directories=no,status=yes, menubar=no,scrollbars=no,resizable=no,width=360,height=400" window.open(chatURL,WindowName, chatAttr); return true; } </script>
Note: Ensure that the width and height are the same as defined in the APPLET tag of CustomerCareChatSetup.jsp.
- If the page you add the above code to is a personal page, ensure you define the personal page before this code block with following statement: request.setAttribute("liveHelpPageType", "personal");
- You may also want to add additional parameter value pairs in the chatURL string for customized attributes or other useful information, which can be picked up in CustomerCareChatSetup.jsp through the request object.
- Add the following code to launch the chat page from a link or an image:
<A HREF="javascript:void(LaunchChat());"> <FONT COLOR="#ffffff" STYLE="font-size : 8pt"> <%= tooltechtext.getString("LiveHelp")%></FONT></A>
- (Optional) Customize the CustomerCareChatSetup.jsp file to pass in additional customer information. The following applet parameters allow you to customize the CustomerCareChatSetup.jsp.
Customizable Parameter Name Description Note CHAT_FONT_SIZE Font size to be used in the chat area. Default value is 12. CHAT_FONT_COLOR Font color to be used for incoming messages in the chat area. Default is blue (#0000FF). CHAT_NAME_LENGTH Length of characters that are reserved for displaying user names in the chat area. Default is 15. WAIT_RANGE_1 Integer value, if the number of waiting customer in the store is less than this value, the waiting message 1 displays. Otherwise the waiting message according to the WAIT_RANGE_2 setting displays. Use -1 when only message 1 will be displayed. WAIT_RANGE_2 Integer value, if the number of customers waiting in the store is less than this value, but greater than WAIT_RANGE_1, waiting message 2 displays. Otherwise the waiting message according to the WAIT_RANGE_3 setting displays. Ignored if WAIT_RANGE_1 is -1. Use -1 to disable this range. WAIT_RANGE_3 Integer value, if the number of customers waiting in the store is less than this value, but greater than WAIT_RANGE_2, waiting message 3 displays. Otherwise waiting message 4 displays. Ignored if WAIT_RANGE_2 is -1. Use -1 to disable this range. contentFrame Name of the frame that is used for regular WebSphere Commercestore pages. Default is "_blank". When the CSR sends back a URL, it will always launch a new browser window. COUNTER_UNIT_WAIT Integer value, indicates how frequently the wait counter should increased by 1. Default is 30 seconds. Ensure it is the same as defined in the store's CustomerCareMonitorList.jsp file. WIDTH Preferred width of the chat frame in pixel. The default width is 360 pixels. The length of the invitation message will affect the finial width. HEIGHT Height of the chat frame in pixels. The default is 400 pixels. QUEUE_ID Customer Care queue ID Providing a valid queue ID will put the help request directly into the queue. ML_ATTRIBUTES List of customized monitoring attribute IDs, separated by commas. Example: <PARAM name="ML_ATTRIBUTES" value="8001,9002"> ML_ATTRIBUTE_xxxx Provide the value of customized monitoring attribute xxxx (xxxxx is the attribute ID) Example <PARAM name="ML_ATTRIBUTE_8001" value="A value string ">Ensure the attribute ID has already been defined in ML_ATTRIBUTES parameter, or this parameter will be ignored.