3Sample Files for Use with Siebel Smart Answer Connector
Sample Files for Use with Siebel Smart Answer Connector
This chapter contains the following types of files, which you use to configure Oracle’s Siebel Smart Answer Connector and call various business service methods:
Sample Configuration File for Use with Siebel Smart Answer Connector
Sample C++ Input and Output Files for Use with Siebel Smart Answer Connector
Sample Lookup (Categorize) Files for Use with Siebel Smart Answer Connector
Sample RefreshKB Files for Use with Siebel Smart Answer Connector
Sample Feedback Files for Use with Siebel Smart Answer Connector
Sample Configuration File for Use with Siebel Smart Answer Connector
For Siebel Smart Answer Connector to function, you must configure a mandatory XML configuration file. The following code is a sample configuration file that helps establish the connection to an external (third-party) adapter to work with a Siebel application (version 8.1 or later). The administrator must specify the correct values in this file for the DLL Name, Facade Name, and the Siebel File System location.
<?xml version="1.0" encoding="UTF-8"?>
<SAConfig xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <!-- NLPAdapterDLLName is a mandatory element --> <NLPAdapterDLLName>T:\ses\siebsrvr\XSAAdapter.dll</NLPAdapterDLLName> <!-- FacadeName is an optional element. --> <!-- If missing, the default value "InvokeMethod" will be used. --> <FacadeName>InvokeMethod</FacadeName> <!-- FileSystem is an optional element. --> <!-- If missing, the default value of $ClientRootDir will be used. --> <FileSystem>\\tjones-pc\fs\</FileSystem> </SAConfig>
Sample KBI Files for Siebel Smart Answer Connector
This topic provides the following sample KBI (Knowledge Base Interchange) files that call business service methods for Siebel Smart Answer Connector:
LPeter_org.xml File
The following sample code is a Knowledge Base Interchange (KBI) XML file for importing multilevel categories. Enter the knowledge base for your deployment of Siebel Smart Answer Connector; the knowledge base is dictated by the user application.
<?xml version="1.0" encoding="UTF-8"?> <!-- Copyright (c) 2009, Oracle Corporation, Inc., All rights reserved. --> <!-- --> <!-- File : KB_Interchange_1_0.xml --> <!-- Revision : 1.0 --> <!-- Date : 14 Jan 2009 --> <!-- Creator : Tom Jones --> <!-- --> <!-- Description: Knowledge Base Interchange standard for Siebel Appln. --> <!-- --> <!-- Change Log: --> <!-- author Date Comment --> <!-- ========== =========== =========================================== --> <!-- -->
<!DOCTYPE knowledge-base [ <!ELEMENT knowledge-base (category*)> <!-- name : Name of the knowledge base. Default value is "Siebel_KB" --> <!ATTLIST knowledge-base name CDATA #REQUIRED > <!ELEMENT category (category*)> <!-- name : Name of the category --> <!-- kscore : Knowledge Score of the category --> <!ATTLIST category name CDATA #REQUIRED kscore CDATA "50"> ]> <!-- This file shall have 0..* nested categories --> <knowledge-base name="LPeter_org"> <category name="David Palmer"> <category name="Robert Segal"> <category name="Naomi Campbell"> <category name="Victor Li"/> <category name="Shayam Pitroda"/> <category name="Anuja Sonalker"/> </category> <category name="Bhavin Gosrani"/> <category name="Nilesh Shah"/> </category> <category name="Sheetal Shah"> <category name="Roop Kumar Rathod"/> <category name="Ramani Iyer"/> <category name="Minal Nade"/> <category name="Brijesh Vairagiwala"/> <category name="Sachin Kulkami"/> <category name="Mehul Mehta"/> <category name="Rupal Doshi"/> <category name="Nalini Hegde"/> <category name="Venkatramanan Srinivisan"/> <category name="Trupti Goel"/> </category> <category name="Helen Su"> <category name="Hemangi Ghodepar"/> </category> <category name="Aaron Boyd"/> <category name="Kishor Kunar"/> <category name="Snehal Binn-Smith"/> <category name="Ying Ping"/> <category name="Roberto Chavez"/> <category name="Henry Picean Jr."/> </category> <category name="Elma Gilberto"> <category name="Rita Gomez"> <category name="Chini Tumkur"/> <category name="John Buchannan"/> <category name="Franchesco Pastor"/> <category name="Julia Roberts"/> <category name="Tom Cruise"/> <category name="Owen Willson"/> <category name="Jackie Chan"/> <category name="King Kenedy I"/> <category name="Tim Rutherford"/> <category name="Vivian Richards"/> <category name="Shaun Pollock"/> </category> <category name="Roberta Martini"/> <category name="Ferrie Albuquerque"/> <category name="James Hommer"/> </category> </knowledge-base>
ITProducts.xml File
The following sample code is an example of a Knowledge Base Interchange (KBI) XML file. Use this code as the basis for creating a file for importing multilevel product categories. Enter the knowledge base for your deployment of Siebel Smart Answer Connector; the knowledge base is dictated by the user application.
<?xml version="1.0" encoding="UTF-8"?> <!-- Copyright (c) 2009, Oracle Corporation, Inc., All rights reserved. --> <!-- --> <!-- File : KB_Interchange_1_0.xml --> <!-- Revision : 1.0 --> <!-- Date : 14 Jan 2009 --> <!-- Creator : Tom Jones --> <!-- --> <!-- Description: Knowledge Base Interchange standard for Siebel Appln. --> <!-- --> <!-- Change Log: --> <!-- author Date Comment --> <!-- ========== =========== =========================================== --> <!-- -->
<!DOCTYPE knowledge-base [ <!ELEMENT knowledge-base (category*)> <!-- name : Name of the knowledge base. Default value is "Siebel_KB" --> <!ATTLIST knowledge-base name CDATA #REQUIRED > <!ELEMENT category (category*)> <!-- name : Name of the category --> <!-- kscore : Knowledge Score of the category --> <!ATTLIST category name CDATA #REQUIRED kscore CDATA "50"> ]> <!-- This file shall have 0..* nested categories --> <knowledge-base name="IT Products"> <category name="Desktop"> <category name="Input Device"> <category name="Mouse"/> <category name="Keyboard"/> </category> <category name="CPU"> <category name="Power Supply"/> <category name="RAM"/> <category name="CD-ROM Drive"/> <category name="Processors"/> <category name="HDD 100GB"/> </category> <category name="Monitor"/> </category> <category name="Laptop"> <category name="Power Adapter"/> <category name="Portable Mouse"/> <category name="Docking Station"/> </category> <category name="Tablet PC"> <category name="Sticker"/> <category name="Stylus Pen"/> </category> </knowledge-base>
Media17.xml File
The following sample code is an example of a Knowledge Base Interchange (KBI) XML file. Use this code as the basis for creating a file for importing multilevel media categories. Enter the knowledge base for your deployment of Siebel Smart Answer Connector; the knowledge base is dictated by the user application.
<?xml version="1.0" encoding="UTF-8"?> <!-- Copyright (c) 2009, Oracle Corporation, Inc., All rights reserved. --> <!-- --> <!-- File : KB_Interchange_1_0.xml --> <!-- Revision : 1.0 --> <!-- Date : 14 Jan 2009 --> <!-- Creator : Tom Jones --> <!-- --> <!-- Description: Knowledge Base Interchange standard for Siebel Appln. --> <!-- --> <!-- Change Log: --> <!-- author Date Comment --> <!-- ========== =========== =========================================== --> <!-- -->
<!DOCTYPE knowledge-base [ <!ELEMENT knowledge-base (category*)> <!-- name : Name of the knowledge base. Default value is "Siebel_KB" --> <!ATTLIST knowledge-base name CDATA #REQUIRED > <!ELEMENT category (category*)> <!-- name : Name of the category --> <!-- kscore : Knowledge Score of the category --> <!ATTLIST category name CDATA #REQUIRED kscore CDATA "50"> ]> <!-- This file shall have 0..* nested categories --> <knowledge-base name="Media17"> <category name="Media"> <category name="Radio"/> <category name="Satellite Radio - XM"/> </category> <category name="AM Channels"> <category name="FM Channels"> <category name="KISS FM"/> <category name="KOST 103.5 FM"/> <category name="KWIC FM"/> </category> </category> <category name="Television"> <category name="Music & Fashion"/> <category name="Documentary Films"/> <category name="Commercial Films"/> <category name="News Channel"/> </category> <category name="Internet"/> <category name="Print"> <category name="Magazine"/> <category name="News Paper"/> </category> </knowledge-base>
Sample C++ Input and Output Files for Use with Siebel Smart Answer Connector
This topic provides the following input and output files as examples of how the business service methods are called when using Siebel Smart Answer Connector and an adapter that uses C++:
Categorize Output File
The following sample code is an example of the expected output of the Categorize method. This XML-formatted message flows from a third-party adapter to a Siebel application (version 8.1 or later).
<?xml version ="1.0" encoding ="UTF-16"?> <?XsearchAdapter-XML EscapeNames="true"?> <OutputBlock Character_spcSet="utf16" Language="English"> <Categories> <category name="Ramani Iyer" kscore="95"/> <category name="Bhavin Gosrani" kscore="96"/> </Categories> </OutputBlock>
Identify Language Input File
The following sample code is an example of the expected input for the Identify Language method. This XML-formatted message flows from a Siebel application (version 8.1 or later) to a third-party adapter.
<?xml version="1.0" encoding="UTF-8"?> <!-- Copyright (c) 2009, Oracle Corporation, Inc., All rights reserved. --> <!-- --> <!-- File : IdLanguageInput.xml --> <!-- Revision : 1.0 --> <!-- Date : 09 Apr 2009 --> <!-- Creator : Tom Jones --> <!-- --> <!-- Description: Sample input for NLP engine adapter based on SAIO --> <!-- format --> <!-- --> <!-- Change Log: --> <!-- author Date Comment --> <!-- ========== =========== =========================================== --> <!-- -->
<!DOCTYPE saio [ <!ELEMENT method (input*, output*)> <!-- name : Name of the property --> <!ATTLIST method name CDATA #REQUIRED action CDATA #REQUIRED> <!ELEMENT input (category*, property*)> <!ELEMENT output (category*, property*)> <!ATTLIST input category-count CDATA #REQUIRED property-count CDATA #REQUIRED > <!ATTLIST output category-count CDATA #REQUIRED property-count CDATA #REQUIRED> <!-- name : Name of the category --> <!-- kscore : Knowledge Score of the category --> <!ATTLIST category name CDATA #REQUIRED kscore CDATA #REQUIRED > <!-- name : Name of the property --> <!-- value : Value of the property --> <!ATTLIST property name CDATA #REQUIRED value CDATA #REQUIRED > ]> <method name="IdentifyLanguage"> <input category-count="0" property-count="2"> <property name="Text" value="testing arun"/> <property name="Channel" value="eMail"/> </input> </method>
Identify Language Output File
The following sample code is an example of the expected output for an Identify Language method. This XML-formatted message flows from a third-party adapter to a Siebel application (version 8.1 or later).
<?xml version="1.0" encoding="UTF-8"?> <!-- Copyright (c) 2009, Oracle Corporation, Inc., All rights reserved. --> <!-- --> <!-- File : IdLanguageInput.xml --> <!-- Revision : 1.0 --> <!-- Date : 09 Apr 2009 --> <!-- Creator : Tom Jones --> <!-- --> <!-- Description: Sample input for NLP engine adapter based on SAIO --> <!-- format --> <!-- --> <!-- Change Log: --> <!-- author Date Comment --> <!-- ========== =========== =========================================== --> <!-- --> <!DOCTYPE saio [ <!ELEMENT method (input*, output*)> <!-- name : Name of the property --> <!ATTLIST method name CDATA #REQUIRED action CDATA #REQUIRED> <!ELEMENT input (category*, property*)> <!ELEMENT output (category*, property*)> <!ATTLIST input category-count CDATA #REQUIRED property-count CDATA #REQUIRED > <!ATTLIST output category-count CDATA #REQUIRED property-count CDATA #REQUIRED> <!-- name : Name of the category --> <!-- kscore : Knowledge Score of the category --> <!ATTLIST category name CDATA #REQUIRED kscore CDATA #REQUIRED > <!-- name : Name of the property --> <!-- value : Value of the property --> <!ATTLIST property name CDATA #REQUIRED value CDATA #REQUIRED > ]> <method name="IdentifyLanguage"> <output category-count="0" property-count="6"> <property name="Channel" value="eMail"/> <property name="Text" value="testing arun"/> <property name="Language Name" value="English US"/> <property name="Language Code" value="ENU"/> <property name="Msg Character Set" value="utf16"/> <property name="Status" value="Success"/> </output> </method>
Sample Lookup (Categorize) Files for Use with Siebel Smart Answer Connector
This topic provides the following input and output files as examples of how the Lookup (Categorize) business service method is called when using Siebel Smart Answer Connector:
Lookup (Categorize) Input File
The following sample code is an example of a SOAP (Simple Object Access Protocol) request message for the Lookup (Categorize) method. A SOAP message is a specification for exchanging structured information in the implementation of Web services. This request message is sent to a third-party adapter or Web service from a Siebel application (version 8.1 or later).
<?xml version="1.0" encoding="UTF-8" ?> <?Siebel-Property-Set EscapeNames="true"?> <PropertySet Character_spcSet="utf16" Language="" ProcessMode="Local" Return_spcCategory_spcId="TRUE" Default_spcCharacter_spcSet="utf16" Default_spcLanguage=""> <Categorization_spcEntity text="question" /> </PropertySet>
Lookup (Categorize) Output File
The following sample code is an example of a SOAP response message for the Lookup (Categorize) method. This response message is sent from a third-party adapter or Web service to a Siebel application (version 8.1 or later).
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <SOAP-ENV:Body> <rpc:LookupResponse xmlns:rpc="http://siebel.com/asi/"> <OutputLookupSiebelMessage> <ListOfSALookupOutput xmlns="http://www.siebel.com/xml/GetParams_IO"> <SALookupHeader> <CharacterSet>utf16</CharacterSet> <Language>English</Language> <Categories> <CategoryName>Ramani Iyer</CategoryName> <CategoryScore>95</CategoryScore> </Categories> <Categories> <CategoryName>Bhavin Gosrani</CategoryName> <CategoryScore>96</CategoryScore> </Categories> </SALookupHeader> </ListOfSALookupOutput> </OutputLookupSiebelMessage> </rpc:LookupResponse> </SOAP-ENV:Body> </SOAP-ENV:Envelope>
Sample RefreshKB Files for Use with Siebel Smart Answer Connector
This topic provides the following input and output files as examples of how the RefreshKB business service method is called when using Siebel Smart Answer Connector:
Refresh KB Input File
The following sample code is an example of a SOAP request message that calls a RefreshKB method. This request message is sent from a Siebel application (version 8.1 or later) to a third-party adapter or Web service.
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:asi="http://siebel.com/asi/" xmlns:get="http://www.siebel.com/xml/GetParams_IO"> <soapenv:Header/> <soapenv:Body> <asi:RefreshKB> <InputRefreshSiebelMessage> <get:ListOfSARefreshInput> <!--Zero or more repetitions:--> <get:SARefreshInput> <get:KBName>test_arun</get:KBName> </get:SARefreshInput> </get:ListOfSARefreshInput> </InputRefreshSiebelMessage> </asi:RefreshKB> </soapenv:Body> </soapenv:Envelope>
Refresh KB Output File
The following sample code is an example of a SOAP response message generated from a third-party Web service in response to a RefreshKB method called by a Siebel application (version 8.1 or later).
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<SOAP-ENV:Body> <rpc:RefreshKBResponse xmlns:rpc="http://siebel.com/asi/"> <OutputRefreshSiebelMessage> <ListOfSARefreshOutput xmlns="http://www.siebel.com/xml/GetParams_IO"> <SARefreshOutput> <Status>Success</Status> <ExportFileURI>\\tjones-pc\fs\smartanswer\export\ ITProductsKBI_20090409122506.xml<ExportFileURI> </SARefreshOutput> </ListOfSARefreshOutput> </OutputRefreshSiebelMessage> </rpc:RefreshKBResponse> </SOAP-ENV:Body> </SOAP-ENV:Envelope>
Sample Feedback Files for Use with Siebel Smart Answer Connector
This topic provides the following input and output files as examples of the invocation of the Feedback business service method for Siebel Smart Answer Connector:
Feedback Input File
The following sample code is an example of a SOAP request message for the Feedback method. This request message is sent from a Siebel application (version 8.1 or later) to a third-party adapter or Web service.
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:asi="http://siebel.com/asi/" xmlns:get="http://www.siebel.com/xml/GetParams_IO"> <soapenv:Header/> <soapenv:Body> <asi:Feedback> <InputFeedbackSiebelMessage> <get:ListOfSAFeedbackInput> <!--Zero or more repetitions:--> <get:SAFeedbacklnput> <get:Language>English</get:Language> <get:LookupText>test</get:LookupText> <get:CharacterSet>utf16</get:CharacterSet> <get:PositiveCategory>Ramani Iyer</get:PositiveCategory> <get:NegativeCategory>Bhavin Gosrani</get:NegativeCategory> </get:SAFeedbacklnput> </get:ListOfSAFeedbackInput> </InputFeedbackSiebelMessage> </asi:Feedback> </soapenv:Body> </soapenv:Envelope>
Feedback Output File
The following sample code is an example of a SOAP response message generated from a third-party Web service in response to a Feedback method called by a Siebel application (version 8.1 or later).
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <SOAP-ENV:Body> <rpc:FeedbackResponse xmlns:rpc="http://siebel.com/asi/"> <OutputFeedbackSiebelMessage> <ListOfSAFeedbackOutput xmlns="http://www.siebel.com/xml/GetParams_IO"> <SAFeedbackOutput> <Status>Success</Status> </SAFeedbackOutput> </ListOfSAFeedbackOutput> </OutputFeedbackSiebelMessage> </rpc:FeedbackResponse> </SOAP-ENV:Body> </SOAP-ENV:Envelope>