HomeGuidesAPI Reference
Submit Documentation FeedbackJoin Developer CommunityOptimizely GitHubOptimizely NuGetLog In

Offline orders

This topic shows how to pass offline orders via XML files.

Offline orders are customer purchase-history data from offline sources, such as, phone orders and in-store purchases. Optimizely can import offline orders to improve product recommendations.

To pass offline orders over API, see Offline order tracking endpoint.

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 Optimizely 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="[email protected]"></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="[email protected]"></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>

Did this page help you?