Defining the store's topic list

Professional Edition onlyBusiness Edition only Each store contains a file that defines the topics that can be used by the CSR during the chat session with a customer. The file, CustomerCareStoreQuestionList.jsp, is located in the following directory:

This JSP file returns the following XML string, which defines the chat topics for the store:

<?xml version="1.0" encoding="UTF-8"?>
<WCS_CUSTOMERCARE>
     <QUESTION_LIST>
          <GROUP NAME="TopicGroupName" >
         <      <QUESTION TITLE="TopicName" TEXT="Topic+Text" ></QUESTION>
         /GROUP>
    </QUESTION_LIST>
</WCS_CUSTOMERCARE>

The group element (GROUP), as illustrated above, defines a topic group which can have multiple subtopics. It has the following attributes:

Attribute Name Description Note
Name If a group name is duplicate, the latest group definition is used required

The question element (QUESTION) defines a single topic. It has the following attributes:

Attribute Name Description Note
Title If a title is duplicate, the last title definition is used. required
Text The content of the topic. required

Example CustomerCareStoreQuestionList.jsp

The following code is from the Advance B2B direct starter store's, CustomerCareStoreQuestionList.jsp:

<% // Create XML string
String strCfg=ECLivehelpConstants.EC_CC_XML_HEADER 
    + LiveHelpConfiguration.getOpenTagString(ECLivehelpConstants.EC_CC_XML_ROOT)
    + LiveHelpConfiguration.getOpenTagString(ECLivehelpConstants.
EC_CC_XML_QUESTION_LIST);
%>
<% //unmark this block to add Topic group/topics
 // start of Topic group block, repeat for more topic groups
 strCfg=strCfg + LiveHelpConfiguration.getTopicGroupElementString
("TopicGroupName");
  // start of Topic block, repeat for all topics in the same 
group
  strCfg=strCfg + LiveHelpConfiguration.getTopicElementString("TopicName","Topic Text")
           + LiveHelpConfiguration.getCloseTagString(ECLivehelpConstants.
EC_CC_XML_QUESTION_QUESTION);
  // end of Topic block
 strCfg=strCfg + LiveHelpConfiguration.getCloseTagString
(ECLivehelpConstants.EC_CC_XML_QUESTION_GROUP);
 // end of Topic group block
%> 
<% 
strCfg=strCfg + LiveHelpConfiguration.getCloseTagString
(ECLivehelpConstants.EC_CC_XML_QUESTION_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. The following table provides more detail on the methods.

Notes:
  1. In order to avoid parsing problems, the sample also uses encoded attribute values. You should use Unicode strings to avoid character corruption.
  2. To support multiple languages, you may use a properties file per language, and retrieve the translated name or topic according to the language ID selected in CSR's session.
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 getTopicGroupElementString(String sGroupName) returns a GROUP element string for the topic list LiveHelpConfiguration.getTopicGroupElementString("myGroup") returns string <GROUP NAME = 'myGroup'>
static String getTopicElementString(String sTitle, String sText) returns a QUESTION element string for the topic list LiveHelpConfiguration.getTopicElementString("myTitle", "myText") returns <QUESTION TITLE ="myTitle" TEXT ="myText">

Feedback