Develop > Presentation layer > Customize marketing > Work with Product Advisor > Create a metaphor XML input file > Update the metaphor settings


Product Advisor XML input file DTD

This section refers to Product Advisor XML input file.


Directives


answer


Description

The answer element encapsulates an answer to a question in a Guided Sell metaphor's question and answer tree. There may be multiple answers for any particular question.


Context


Syntax

<answer> ...answer content...
</answer>


Example

<answer>   
<orderseq>1</orderseq>   
<conceptinfo>       
<lang_id>-1</lang_id>       
<conceptName>none</conceptName>       
<elaboration>null</elaboration>   
</conceptinfo>   
<constraint>       
<pfReference>1</pfReference>       
<columnName>F_CDROM</columnName>       
<operation>1</operation>       
<opValueType>com.ibm.commerce.datatype.DsString</opValueType>       
<opVal>          
<lang_id>-1</lang_id>          
<opValue>none</opValue>       
</opVal>   
</constraint>
</answer>


builder


Description

A required element. This element defines the start of the XML input file.


Syntax

<builder> ...XML input file...
</builder>


Context


category


Description

A required element. This element defines the category for which the following metaphors are being defined.


Syntax

<category ID="category_ref_num"> ...XML input file...
</category>

The category_ref_num value identifies the category reference number for which the metaphor applies. This must match the category reference number found in the WebSphere Commerce database.


Context


Example

<category ID="1"> ...metaphor content...
</category>


columnName


Description

A required element. This element defines the column name used in the database for the parent element. The columnName must match the columnName used in creating the search space. You should refer to the XML file that you created to generate the search space.


Syntax

<columnName> column_name</columnName>


Context


Example

<columnName>F_CDROM</columnName>


conceptInfo


Description


Syntax

<conceptInfo> ...conceptInfo content...
</conceptInfo>


Context


Example

<conceptinfo>   
<lang_id>-1</lang_id>   
<conceptName>none</conceptName>   
<elaboration>null</elaboration>
</conceptinfo>


conceptName


Description

The question or answer text to be displayed to the customer.


Syntax

<conceptName> concept_name</conceptName>


Context


Example

<conceptName>Concept 2</conceptName>


constraint


Description

This element defines constraints passed between successive questions and answers in a Guided Sell metaphor.


Syntax

<constraint> ...constraint content...
</constraint>


Context


Example

<constraint>   
<pfReference>1</pfReference>   
<columnName>PPPRC</columnName>   
<operation>3</operation>   
<opValueType>com.ibm.commerce.datatype.DsCurrency</opValueType>   
<opVal>      
<lang_id>-1</lang_id>      
<opValue>6099.0</opValue>   
</opVal>   
<opVal>      
<lang_id>-2</lang_id>      
<opValue>2</opValue>   
</opVal>
</constraint>


delete_productComparer


Description

An optional element. This element indicates that the currently defined product Comparison metaphor should be deleted.


Syntax

<delete_productComparer>


Context


delete_productExplorer


Description

An optional element. This element indicates that the currently defined Product Explorer metaphor should be deleted.


Syntax

<delete_productExplorer>


Context


delete_salesAssistant


Description

An optional element. This element indicates that the currently defined Guided Sell metaphor should be deleted.


Syntax

<delete_salesAssistant SACID="SA_category_ID">

The SA_category_ID value identifies the Guided Sell metaphor to be deleted. This must match the category ID number found in the WebSphere Commerce database.


Context


display

This element defines whether or not the parent feature should be displayed.


Syntax

<display> display</display>


Description


Context


Example

<display>1</display>


elaboration

This element is reserved for future use, and should always be set to NULL.


Syntax

<elaboration> elaboration</elaboration>


Context


Example

<elaboration>NULL</elaboration>


feature


Description

A required element. This element defines the feature that is the basis for comparison using this metaphor.


Syntax

<feature> ...feature specification...
</feature>


Context


Example

<feature>   
<columnName>PPPRC</columnName>   
<order>4</order>   
<display>1</display>   
<sort>1</sort>   
<widget>com.ibm.commerce.pa.widget.DropDownListFormElement</widget>
</feature>


lang_id


Description

An optional element. This element defines the language for the parent element.


Syntax

<lang_id> language_identifier</lang_id>


Context


Example

<lang_id>-2</lang_id>


metaCategoryId


Description

The metaCategoryId specifies which category's metaphor should be used for this metaphor link.


Syntax

<metaCategoryId> metaCategoryID_number</metaCategoryId>


Context


Example

<metaCategoryId>1</metaCategoryId>


metaphorLink


Description

This element defines the link for a Guided Sell answer, or the default link to use when an answer does not have one defined.


Syntax

<metaphorLink> ...metaphor_link_content...
</metaphorLink>


Context


Example

<metaphorLink>   
<metaCategoryId>1</metaCategoryId>   
<metaphorName>com.ibm.commerce.pa.metaphor.ProductComparerMetaphor</metaphorName>   
<templateName>/webapp/wcs/stores/servlet/pc51.jsp</templateName>   
<templateUsage>0</templateUsage>   
<passConstraint>1</passConstraint>
</metaphorLink>


metaphorName


Description

This element defines the target metaphor's name.


Syntax

<metaphorName> metaphor_name</metaphorName>


Context


Example

<metaphorName>com.ibm.commerce.pa.metaphor.ProductComparerMetaphor</metaphorName>


operation


Description

This element defines the operation to be performed to evaluate the constraint.


Syntax

<operation> operation_number</operation>


Context


Example

<operation>3</operation>


opVal


Description

This element defines language specific constraint information.


Syntax

<opVal> ...opVal content...
</opVal>


Context


Example

<opVal>   
<lang_id>-1</lang_id>   
<opValue>6099.0</opValue>
<opVal>


opValue


Description

This element defines the value for the feature that you want the constraint based upon. This is the value that would be found in the <columnName> element specified for the parent <constraint> element.


Syntax

<opValue> opValue</opValue>


Context


Example

<opValue>6099.0</opValue>


opValueType


Description

Valid types can be found in the ICDATAREG table.


Syntax

<opValueType>op_value_type</opValueType>


Context


Example

<opValueType>com.ibm.commerce.datatype.DsCurrency</opValueType>


order


Description

This element defines the order in which different features are displayed.


Syntax

<order> order </order>


Context


Example

<order>1</order>


orderSeq

A required element. This element defines the display sequence of questions and answers within a question for the Guided Sell metaphor.


Syntax

<orderSeq> orderSeq_number</orderSeq>


Description


Context


Example

<orderseq>1</orderseq>


passConstraint


Description

A Boolean variable that determines whether a constraint should be passed to the target link. If the value is set to 0, the constraint is not passed. If it is set to 1, the constraint is passed.


Syntax

<passConstraint> passConstraint_number</passConstraint>


Context


Example

<passConstraint>1</passConstraint>


pfReference


Description

The category or product family id.


Syntax

<pfReference> pfReference_number</pfReference>


Context


Example

<pfReference>1</pfReference>


productComparer


Description

An optional element. This element defines the start of a Product Comparison metaphor.


Syntax

<productComparer> ...metaphor content...
</productComparer>


Context


productExplorer


Description

An optional element. This element defines the start of a Product Explorer metaphor.


Syntax

<productExplorer> ...metaphor content...
</productExplorer>


Context


qnaTree


Description

An optional element. This element encapsulates the entire question and answer tree for a Guided Sell metaphor.


Syntax

<qnaTree> ...question and answer tree content...
</qnaTree>


Context


Example

<qnaTree>   
<rootQuestion>      
<conceptinfo>         
<lang_id>-1</lang_id>         
<conceptName>Price Question</conceptName>         
<elaboration>null</elaboration>      
</conceptinfo>   
</rootQuestion>   
<answer>      
<orderseq>1</orderseq>      
<conceptinfo>         
<lang_id>-2</lang_id>         
<conceptName>Concept2</conceptName>      
</conceptinfo>      
<constraint>         
<pfReference>1</pfReference>         
<columnName>PPPRC</columnName>         
<operation>3</operation>         
<opValueType>com.ibm.commerce.datatype.DsCurrency</opValueType>         
<opVal>            
<lang_id>-1</lang_id>            
<opValue>6099.0</opValue>         
</opVal>         
<opVal>            
<lang_id>-2</lang_id>            
<opValue>2</opValue>         
</opVal>      
</constraint>      
<metaphorLink>         
<metaCategoryId>1</metaCategoryId>         
<metaphorName>com.ibm.commerce.pa.metaphor.ProductExplorerMetaphor</metaphorName>         
<templateName>/webapp/wcs/stores/servlet/pe51.jsp</templateName>         
<templateUsage>0</templateUsage>         
<passConstraint>1</passConstraint>      
</metaphorLink>   
</answer>   
<answer>      
<orderseq>2</orderseq>      
<conceptinfo>         
<lang_id>-1</lang_id>         
<conceptName>Low</conceptName>      
</conceptinfo>      
<constraint>         
<pfReference>1</pfReference>         
<columnName>PPPRC</columnName>         
<operation>4</operation>         
<opValueType>com.ibm.commerce.datatype.DsCurrency</opValueType>         
<opVal>            
<lang_id>-1</lang_id>            
<opValue>7099.0</opValue>         
</opVal>      
</constraint>      
<question>         
<orderseq>1</orderseq>         
<conceptinfo>            
<lang_id>-1</lang_id>            
<conceptName>Low</conceptName>            
<elaboration>null</elaboration>         
</conceptinfo>         
<answer>            
<orderseq>1</orderseq>            
<conceptinfo>               
<lang_id>-1</lang_id>               
<conceptName>none</conceptName>               
<elaboration>null</elaboration>            
</conceptinfo>            
<constraint>               
<pfReference>1</pfReference>               
<columnName>F_CDROM</columnName>               
<operation>1</operation>               
<opValueType>com.ibm.commerce.datatype.DsString</opValueType>               
<opVal>                  
<lang_id>-1</lang_id>                  
<opValue>none</opValue>               
</opVal>            
</constraint>         
</answer>      
</question>   
</answer>
</qnaTree>


question


Description

The question element encapsulates a question in a Guided Sell metaphor's question and answer tree.


Syntax

<question> ...question content...
</question>


Context


Example

<question>   
<orderseq>1</orderseq>   
<conceptinfo>      
<lang_id>-1</lang_id>      
<conceptName>Low</conceptName>      
<elaboration>null</elaboration>   
</conceptinfo>   
<answer>      
<orderseq>1</orderseq>      
<conceptinfo>         
<lang_id>-1</lang_id>         
<conceptName>none</conceptName>         
<elaboration>null</elaboration>      
</conceptinfo>      
<constraint>         
<pfReference>1</pfReference>         
<columnName>F_CDROM</columnName>         
<operation>1</operation>         
<opValueType>com.ibm.commerce.datatype.DsString</opValueType>         
<opVal>            
<lang_id>-1</lang_id>            
<opValue>none</opValue>         
</opVal>      
</constraint>   
</answer>
</question>


rootQuestion


Description

The rootQuestion element encapsulates the primary question in a Guided Sell metaphor's question and answer tree. The primary question is the question that is always displayed first whenever a new Guided Sell session is started.


Syntax

<rootQuestion> ...root Question content...
</rootQuestion>


Context


Example

<rootQuestion>   
<conceptinfo>      
<lang_id>-1</lang_id>      
<conceptName>Price Question</conceptName>      
<elaboration>null</elaboration>   
</conceptinfo>   
<conceptinfo>      
<lang_id>-2</lang_id>      
<conceptName>Price Question2</conceptName>   
</conceptinfo>
</rootQuestion>


salesAssistant


Description

An optional element. This element defines the start of a Guided Sell metaphor.


Syntax

<salesAssistant SACID="category_ID"> ...metaphor content...
</salesAssistant>

The SACID value identifies the category for the Guided Sell metaphor being created.


Context


sort

This element defines the sequence in which the feature values display. If the value is set to 1, the features are sorted in ascending order. If it is set to 2, the features are sorted in descending order.


Syntax

<sort> sort</sort>


Description


Context


Example

<sort>1</sort>


store


Description

A required element. This element defines the store for which the contained metaphors apply. Metaphors apply to individual stores, and have a unique store element for each store that has metaphors defined in the XML input file.


Syntax

<store SID="store_ref_num"> ...XML input file...
</store>

The store_ref_num value identifies the store reference number for which the metaphor applies. This must match the store reference number found in the WebSphere Commerce database.


Context


Example

<store SID="1"> ...XML input file...
</store>


template


Description

A required element. This element defines the JSP to be used as the template for all pages generated using this metaphor.


Syntax

<template>template file</template>


Context


Example

<template>/webapp/wcs/stores/servlet/sa51.jsp</template>


templateName


Description

This element defines the JSP to be used as the template for the target metaphor.


Syntax

<templateName> template_name</templateName>


Context


Example

<templateName>/webapp/wcs/stores/servlet/pc51.jsp</templateName>


templateUsage


Description

This element defines how the template for the target metaphor should be displayed.


Syntax

<templateUsage> templateUsage_number</templateUsage>


Context


Example

<templateUsage>0</templateUsage>


widget


Description

A required element. This element defines which widget will be used to display the feature values.


Syntax

<widget> widget_name</widget>


Context


Example

<widget>com.ibm.commerce.pa.widget.DropDownListFormElement</widget>


Related concepts

Product Advisor


Related tasks

Create search space for Product Advisor

Create a Product Comparison metaphor

Create a Product Exploration metaphor


+

Search Tips   |   Advanced Search