Loading...
Area: Episerver Product Recommendations, Episerver Personalized Search & Navigation
Applies to versions: Not applicable

Offline and historical orders

Recommendations [hide]

To improve product recommendations, Episerver can import offline orders. These are customers' purchase-history data from offline sources, such as, phone orders and in-store purchases.

Using offline order data enables the following:

  • Product recommendations to draw on offline order information when other information is not available.
  • Product recommendations to draw on a merge of both online and offline data.
  • Excluding products from recommendations if those products were already bought offline.

For Episerver to import offline orders, give them in the following XML format that contains the offline orders along with the user who placed each order and the products that were purchased. The following is a sample XML file showing only mandatory elements and attributes:

<orders>
  <order refCode="orderRef" orderDate="2017-04-23T14:25:00 GMT" currency="GBP" total="100.0">
    <user email="customer@email.com"></user>
    <product refCode="ref1" qty="1" price="50.0"></product>
    <product refCode="ref2" qty="2" price="20.0"></product>
  </order>
</orders>

The following is a sample XML file showing all the possible elements and attributes:

<orders>
  <order refCode="orderRef" orderDate="2017-04-23T14:25:00 GMT" currency="GBP" shipping="10.0" subTotal="90.0" total="100.0">
    <user email="customer@email.com"></user>
    <product refCode="ref1" qty="1" price="50.0">
      <attribute key="attr11">value11</attribute>
    </product>
    <product refCode="ref2" qty="2" price="20.0">
      <attribute key="attr21">value21</attribute>
    </product>
    <attribute key="attr1">value1</attribute>
    <attribute key="attr2">value2</attribute>
  </order>
</orders>

Offline Order

customerId field was added for offline order requests for B2B use. The following code shows a sample request:

{  "lang"  : "{{lang}}",
   "order" : { 
               "orderDate"  : "someOrderDate",
               "refCode"    : "someRefCode",
                 .. other fields ..
               "customerId" : "customerId",     
             },
   "user"  : {
               //user fields
             }
}
Historical Orders

Same as OfflineOrdercustomerId was added for historical orders for B2B use. The following code shows a sample of HistoricalOrder import  file format:

<orders>
  <order refCode="someRefCode" ..other fields.. customerId="SomeCustomerId">
    <user email="someEmail"/>
      //List of products
  </order>
<orders>
Related topics
Do you find this information helpful? Please log in to provide feedback.

Last updated: Nov 03, 2017

Recommendations [hide]