Area: Episerver Product Recommendations, Episerver Personalized Search & Navigation
Applies to versions: v1.4

XML elements

Recommendations [hide]

The root of the XML file is the <orders> element, which contains one <order> element for each order.

Each <order> element contains the following information as attributes: the reference code of the order (or order number), the order date, the currency that the order was placed in, and total value of the order. The subtotal, and shipping cost are optional. For example:

<order refCode="orderRef123" 
       orderDate="2017-04-23T14:25:00 GMT" 
  • The value for orderDate must be in the format defined by ISO 8601 “Date and Time Formats”.
  • The value for currency must be from the available Currency codes, which are in the 3-letter format defined by ISO 4217 “Currency codes”.

Each <order> element contains the following as sub-elements: user information and ordered products information:

  • The <user> element is optional. If present it should contain the email of the user who placed the order. We recommend it is included as this user information will improve the accuracy of the online product recommendations presented to those customers.

    The element must include an XML attribute specifying the user’s email address. For example:

    <user email="customer@email.com"></user>
  • There must be at least one <product> element per order. The element contains the following information as attributes: the product's reference code (as provided in the product catalog feed for Episerver) along with the ordered quantity and ordered price (per unit). For example:
    <product refCode="CB4551" 

    The <product> element can be empty or include a number of sub-elements containing information on the product’s attributes. If supplied, the product’s <attribute> element needs to contain an XML attribute (which consists of a name-value pair specifying the name of the product’s attribute, such as key="pricerange") and a value (such as cheap). For example:

    <product refCode="CB4551" qty="2" price="6.5">
      <attribute key="pricerange">cheap</attribute>

    Note: The price should be the final price per unit that the user paid for the product. Also, information given in the product’s <attribute> element is only imported into the database if it matches the associated information from the online-data feed. That is, if the product’s attribute name or value differs from what is in the database for that product, the new attribute is not imported into the database.

  • The <attribute> element is optional and is used to specify attributes related to the order. There can be multiple instances of this element. If supplied, the order’s <attribute> element needs to contain an XML attribute (which consists of a name-value pair specifying the name of the order’s attribute, such as key="transaction") and a value (such as debitcard). For example:
    <attribute key="transaction">debitcard</attribute>

The following table lists the XML elements and their attributes.

XML element names XML attribute names XML attribute value examples XML element value examples
      order refCode orderRef123  
  orderDate 2017-04-23T14:25:00 GMT  
  currency GBP  
  shipping (optional) 10.00  
  subTotal (optional) 90.00  
  total 100.00  
        attribute (optional) key tillname Till3
    user (optional) email (optional) customer@email.com (optional)  
    product refCode CB4551  
    qty 1  
    price 6.5  
       attribute (optional) key pricerange cheap
Do you find this information helpful? Please log in to provide feedback.

Last updated: Nov 06, 2017

Recommendations [hide]