Each store contains a file that defines the URLs that the CSR can send to a customer's browser during the chat session. The file, CustomerCareStoreURLList.jsp , is located in the following directory:
- WAS_installdir/installedApps/instance_name/WC_instance_name.ear/Stores.war/storedir/CustomerServiceArea/CollaborationSection
WAS_userdir/WAS_instance_name/installedApps/cell_name/WC_instance_name.ear/Stores.war/storedir/CustomerServiceArea/CollaborationSection
This JSP file returns the following XML string, which contains the URL information for the store:
<?xml version="1.0" encoding="UTF-8"?> <WCS_CUSTOMERCARE> <URL_LIST> <GROUP NAME="URLGroupName" > <PAGE NAME="IBM" URL="http%3A%2F%2Fwww.ibm.com" ></PAGE> </GROUP> </URL_LIST> </WCS_CUSTOMERCARE>
The group element (GROUP), as illustrated above, defines a URL group which can have multiple URLs. It has the following attributes:
- Name: The name of the URL group. Name is a required attribute. If a group name is duplicate, the latest group definition is used.
The page element (PAGE) defines a single URL address. It has the following attributes:
- Name: The name of the URL page. Name is a required attribute. If a page name is duplicate, the latest page definition is used.
- URL: The URL address of the page. URL is a required attribute.
Example CustomerCareStoreURLList.jsp
The following code is from the Advanced B2B direct starter store's, CustomerCareStoreURLList.jsp:
<% // Create XML string String strCfg=ECLivehelpConstants.EC_CC_XML_HEADER + LiveHelpConfiguration.getOpenTagString(ECLivehelpConstants. EC_CC_XML_ROOT) + LiveHelpConfiguration.getOpenTagString(ECLivehelpConstants. EC_CC_XML_URL_LIST); %> <% //unmark following block to add URL group/pages // start of URL group block, repeat for more URL groups strCfg=strCfg + LiveHelpConfiguration.getURLGroupElementString("URLGroupName"); // start of URL pages block, repeat for all pages in the same group strCfg=strCfg + LiveHelpConfiguration.getURLPageElementString ("IBM","http://www.ibm.com") + LiveHelpConfiguration.getCloseTagString (ECLivehelpConstants.EC_CC_XML_URL_PAGE); // end of URL pages block strCfg=strCfg + LiveHelpConfiguration.getCloseTagString (ECLivehelpConstants.EC_CC_XML_URL_GROUP); // end of URL group block %> <% strCfg=strCfg + LiveHelpConfiguration.getCloseTagString (ECLivehelpConstants.EC_CC_XML_URL_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.
Note: In order to avoid parsing problems, the sample also uses encoded attribute values. Unicode string is also used to avoid character corruption.
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 URL list | LiveHelpConfiguration.getTopicGroupElementString("myGroup") returns string <GROUP NAME = 'myGroup'> |
static String getURLPageElementString(String sName, String sURL) | returns a PAGE element string for URL list | LiveHelpConfiguration.getURLPageElementString("myName", "myURL") returns <QUESTION TITLE ="myName" TEXT ="myURL"> |