Differences

This shows you the differences between two versions of the page.

appendixd:simple_product_administration:sorting_and_ranking_attributes [2015/06/25 08:53]
vovanin
appendixd:simple_product_administration:sorting_and_ranking_attributes [2015/06/29 02:56] (current)
vovanin
Line 1: Line 1:
 +====== Sorting and Ranking Attributes ======
 +
 +Here are some additional functionalities you can employ when using the Simple Product administration. 
 +
 +1. If you create a product with an attribute and, for that attribute, you add <Rank> node next to <Value> and <Value Code>, the Rank will sort only the values in Setup>Attributes, while values in Product Attributes/Options will be lined as determined by the XML. These values will get automatic sort, and in that order will be displayed in Configurator. These values will be sorted automatically and, as such, will be displayed in the Configurator. 
 +
 +XML example:
 +
 +<code XML>
 +<?xml version="1.0" encoding="utf-8"?>
 +<Products>
 +  <Product>  
 +     <Identificator>PartNumber</Identificator>
 +    <DisplayType>Configurable</DisplayType>
 +     <ProductSystemId>Regression_cpq</ProductSystemId>
 +     <PartNumber>Test Number</PartNumber>
 +    <ProductType>Accessories</ProductType>
 +    <ProductName>
 +      <USEnglish><![CDATA[RegressionProduct]]></USEnglish>
 +    </ProductName>
 +    <Categories>
 +      <USEnglish><![CDATA[Hardware]]></USEnglish>
 +    </Categories>
 +   <Attributes>
 +      <Attribute>
 +         <AttributeName>
 +            <USEnglish><![CDATA[RegressionAttribute]]></USEnglish>
 +         </AttributeName>
 +    <AttributeSystemId>Regression</AttributeSystemId>
 +          <AttributeType>UserSelection</AttributeType>
 +     <DisplayType>DropDown</DisplayType>
 +       <Values>
 +            <Value>
 +               <USEnglish><![CDATA[1]]></USEnglish>
 +                <Rank>10</Rank>
 +        <ValueCode>1</ValueCode>
 +           </Value>
 +              <Value>
 +               <USEnglish><![CDATA[2]]></USEnglish>
 +                <Rank>20</Rank>
 +            <ValueCode>2</ValueCode>
 +            </Value>
 +              <Value>
 +               <USEnglish><![CDATA[3]]></USEnglish>
 +                <Rank>30</Rank>
 +            <ValueCode>3</ValueCode>
 +            </Value>
 +              <Value>
 +               <USEnglish><![CDATA[4]]></USEnglish>
 +                <Rank>40</Rank>
 +            <ValueCode>4</ValueCode>
 +            </Value>
 +         </Values>
 +       </Attribute>
 +      </Attributes>
 +  </Product>
 +</Products>
 +</code>
 +
 +2. If you add one more node, the <Sort> node, you will set the same values in the <Sort> node. Result: Rank will sort values in Setup>Attributes, while values in Product Attributes/Options will be lined as determined by <ValueCode>. The values will be sorted in an ascending order, that is from the smallest item to the largest, or in an alphabetical order.  
 +
 +XML example:
 +
 +<code XML>
 +<?xml version="1.0" encoding="utf-8"?>
 +<Products>
 +  <Product>  
 +     <Identificator>PartNumber</Identificator>
 +    <DisplayType>Configurable</DisplayType>
 +     <ProductSystemId>Regression_cpq</ProductSystemId>
 +     <PartNumber>Test Number</PartNumber>
 +    <ProductType>Accessories</ProductType>
 +    <ProductName>
 +      <USEnglish><![CDATA[RegressionProduct]]></USEnglish>
 +    </ProductName>
 +    <Categories>
 +      <USEnglish><![CDATA[Hardware]]></USEnglish>
 +    </Categories>
 +   <Attributes>
 +      <Attribute>
 +         <AttributeName>
 +            <USEnglish><![CDATA[RegressionAttribute]]></USEnglish>
 +         </AttributeName>
 +    <AttributeSystemId>Regression</AttributeSystemId>
 +          <AttributeType>UserSelection</AttributeType>
 +     <DisplayType>DropDown</DisplayType>
 +       <Values>
 +            <Value>
 +               <USEnglish><![CDATA[1]]></USEnglish>
 +                <Rank>10</Rank>
 +        <ValueCode>4</ValueCode>
 +        <Sort>1</Sort>
 +           </Value>
 +              <Value>
 +               <USEnglish><![CDATA[2]]></USEnglish>
 +                <Rank>20</Rank>
 +            <ValueCode>3</ValueCode>
 +            <Sort>1</Sort>
 +            </Value>
 +              <Value>
 +               <USEnglish><![CDATA[3]]></USEnglish>
 +                <Rank>30</Rank>
 +            <ValueCode>2</ValueCode>
 +            <Sort>1</Sort>
 +            </Value>
 +              <Value>
 +               <USEnglish><![CDATA[4]]></USEnglish>
 +                <Rank>40</Rank>
 +            <ValueCode>1</ValueCode>
 +            <Sort>1</Sort>
 +            </Value>
 +         </Values>
 +       </Attribute>
 +      </Attributes>
 +  </Product>
 +</Products>
 +</code>
 +
 +3. Note that this example uses the same node as before. If you use the same values in the <Sort> node for two <Values>, these two values in Product Attributes/Option will be lined as determined by the order from the <ValueCode>; other values will be sorted as determined by <Sort>. Values with the same <Sort> within the configurator will be lined as determined by the <Value> (from the smallest item to the largest, or in an alphabetical order); other values will be sorted as determined by the order from <Sort>.
 +
 +XML example:
 +
 +<code XML>
 +<?xml version="1.0" encoding="utf-8"?>
 +<Products>
 +  <Product>  
 +     <Identificator>PartNumber</Identificator>
 +    <DisplayType>Configurable</DisplayType>
 +     <ProductSystemId>Regression_cpq</ProductSystemId>
 +     <PartNumber>Test Number</PartNumber>
 +    <ProductType>Accessories</ProductType>
 +    <ProductName>
 +      <USEnglish><![CDATA[RegressionProduct]]></USEnglish>
 +    </ProductName>
 +    <Categories>
 +      <USEnglish><![CDATA[Hardware]]></USEnglish>
 +    </Categories>
 +   <Attributes>
 +      <Attribute>
 +         <AttributeName>
 +            <USEnglish><![CDATA[RegressionAttribute]]></USEnglish>
 +         </AttributeName>
 +    <AttributeSystemId>Regression</AttributeSystemId>
 +          <AttributeType>UserSelection</AttributeType>
 +     <DisplayType>DropDown</DisplayType>
 +       <Values>
 +            <Value>
 +               <USEnglish><![CDATA[1]]></USEnglish>
 +                <Rank>10</Rank>
 +        <ValueCode>4</ValueCode>
 +        <Sort>1</Sort>
 +           </Value>
 +              <Value>
 +               <USEnglish><![CDATA[2]]></USEnglish>
 +                <Rank>20</Rank>
 +            <ValueCode>3</ValueCode>
 +            <Sort>3</Sort>
 +            </Value>
 +              <Value>
 +               <USEnglish><![CDATA[3]]></USEnglish>
 +                <Rank>30</Rank>
 +            <ValueCode>2</ValueCode>
 +            <Sort>2</Sort>
 +            </Value>
 +              <Value>
 +               <USEnglish><![CDATA[4]]></USEnglish>
 +                <Rank>40</Rank>
 +            <ValueCode>1</ValueCode>
 +            <Sort>1</Sort>
 +            </Value>
 +         </Values>
 +       </Attribute>
 +      </Attributes>
 +  </Product>
 +</Products>
 +</code>
 +
 +4. If you use different values in the <Sort> node, values in Product Attributes/Options will be lined in an order as determined by <Sort>; the same behavior will take place in the Configurator, as expected. 
 +
 +XML example:
 +
 +<code XML>
 +<?xml version="1.0" encoding="utf-8"?>
 +<Products>
 +  <Product>  
 +     <Identificator>PartNumber</Identificator>
 +    <DisplayType>Configurable</DisplayType>
 +     <ProductSystemId>Regression_cpq</ProductSystemId>
 +     <PartNumber>Test Number</PartNumber>
 +    <ProductType>Accessories</ProductType>
 +    <ProductName>
 +      <USEnglish><![CDATA[RegressionProduct]]></USEnglish>
 +    </ProductName>
 +    <Categories>
 +      <USEnglish><![CDATA[Hardware]]></USEnglish>
 +    </Categories>
 +   <Attributes>
 +      <Attribute>
 +         <AttributeName>
 +            <USEnglish><![CDATA[RegressionAttribute]]></USEnglish>
 +         </AttributeName>
 +    <AttributeSystemId>Regression</AttributeSystemId>
 +          <AttributeType>UserSelection</AttributeType>
 +     <DisplayType>DropDown</DisplayType>
 +       <Values>
 +            <Value>
 +               <USEnglish><![CDATA[1]]></USEnglish>
 +                <Rank>10</Rank>
 +        <ValueCode>4</ValueCode>
 +        <Sort>1</Sort>
 +           </Value>
 +              <Value>
 +               <USEnglish><![CDATA[2]]></USEnglish>
 +                <Rank>20</Rank>
 +            <ValueCode>3</ValueCode>
 +            <Sort>3</Sort>
 +            </Value>
 +              <Value>
 +               <USEnglish><![CDATA[3]]></USEnglish>
 +                <Rank>30</Rank>
 +            <ValueCode>2</ValueCode>
 +            <Sort>2</Sort>
 +            </Value>
 +              <Value>
 +               <USEnglish><![CDATA[4]]></USEnglish>
 +                <Rank>40</Rank>
 +            <ValueCode>1</ValueCode>
 +            <Sort>4</Sort>
 +            </Value>
 +         </Values>
 +       </Attribute>
 +      </Attributes>
 +  </Product>
 +</Products>
 +</code>
 +
 +
  
You are here: SAP Sales Cloud CPQ Online HelpSAP CPQ APISimple Product Administration Web MethodSorting and Ranking Attributes