User Feed

If desired, Boomtrain can import profile data, shopping cart data, order history data, and offline order data through a JSON or XML feed.

Security Recommendations

Because this feed contains sensitive information make sure to make the feed accessible using HTTP basic access authentication over HTTPS (http://en.wikipedia.org/wiki/Basic_access_authentication).

Additionally, please make the feed accessible only from Boomtrain's IPs:
5.9.21.130
5.9.21.154
136.243.8.5
136.243.8.59
144.76.102.133

The Feed Structure

The feed should contain all the data required to support the intended implementation. All this data can be used in user segmentation and product recommendations. If unsure what information to include, please check with your Boomtrain account manager.

{
  "users": {
    "user": [
      {
        "email": "The e-mail of the user",
        "customer_id": "The same customer_id used in the JS Tracking Code.",
        "first name": "User's first name",
        "last name": "User's last name",
       "cart": "Your user's shopping cart", // optional
        "orders": ["Your user's order history"], // optional
        "wishlists": ["Your user's wishlists"] // optional       
      }
    ]
  }
}

JSON Feed Example

Here is a JSON feed example.

{
  "users": {
    "user": [
      {
        "email": "[email protected]",
        "customer_id": "Customer ID", //same customer_id that you identify with on-site - in most cases this is email address
        "cart": {
          "cart_ts": "123456789", //Cart update timestamp(Unix Epoch Time)
          "cart_url": "https://url.com/cart", //URL to the user's cart
          "items": [
            {
              "item_id": "1232456", //Unique product identifier (ID or SKU)
              "item_url": "https://url.com/product",
              "item_price": "123.45",
              "item_qty": "2",
              "item_currency": "USD",
            },
            {...next item...}
          ],
        "orders": [
          {
	          "order_id": "123456",
            "order_ts": "123456789", //Order Timestamp(Unix Epoch Time)
            "order_amount": "123.45",
            "order_currency": "USD",
            "order_source": "phone", //website or phone or offline
            "items": [
              {
                "item_id": "1232456", //Unique product identifier (ID or SKU)
                "item_url": "https://url.com/product",
                "item_price": "123.45",
                "item_qty": "2",
                "item_currency": "USD",
              },
              {...next item...}
            ]
          },
          {...next order...}
        ],              
        "wishlists": [
          {
            "wishlist_id": "123456",
            "wishlist_name": "name",
            "wishlist_create_ts": "123456789", //wishlist_create Timestamp(Unix Epoch Time)
            "wishlist_update_ts": "123456789",  //wishlist_update Timestamp(Unix Epoch Time)
            "wishlist_amount": "123.45",
            "wishlist_currency": "USD",
            "wishlist_source": "phone", //website or phone or offline
            "items": [
              {
                "item_id": "1232456", //Unique product identifier (ID or SKU)
                "item_url": "https://url.com/product",
                "item_price": "123.45",
                "item_qty": "2",
                "item_currency": "USD",
              },
              {...next item...}
            ]
          },
          {...next wishlist...}
        ],
      },
      {...next user...}
    ]
  }
}

XML Feed Example

If you choose to use an XML feed, please use this format:

<?xml version="1.0" encoding="UTF-8"?>
<users>
  <user>

    <!-- BASIC PROFILE DATA SECTION -->
      <customer_id>The same customer_id used in the General Tracking Code<customer_id>
      <email>[email protected]</email>
    <!-- ORDERS HISTORY SECTION -->
    <orders>
      <!-- first order -->    
      <order>
        <order_id>Order ID</order_id>
        <order_ts>Order Timestamp(Unix Epoch Time)</order_ts>
        <order_amount>12345.67</order_amount>
        <order_currency>EUR</order_currency>
        <order_source>website or phone or offline</order_source>
        <items>
          <item>
            <item_url>URL of the item, same as in product catalogue feed</item_url>
            <item_id>Item SKU</item_id>
            <item_price>12345.67</item_price>
            <item_currency>EUR</item_currency>
            <item_qty>99</item_qty>
          </item>
        </items>
      </order>
      <!-- second order -->    
      <order>
        <!-- order details -->           
      </order>
      <!-- next orders... -->    
    </orders>

    <!-- SHOPPING CART SECTION -->
    <cart> 
      <cart_ts>Cart Timestamp(Unix Epoch Time)</cart_ts>
      <cart_url>URL that recreates this cart for the user</cart_url>
      <items>
        <!-- first cart item -->
        <item>
          <item_url>URL of the item, same as in product catalogue feed</item_url>
          <item_id>Item SKU</item_id>
          <item_price>12345.67</item_price>
          <item_currency>EUR</item_currency>
          <item_qty>3</item_qty>
        </item>
        <!-- second cart item -->
        <item>
          <!-- item details -->          
        </item>
        <!-- next cart items... -->
      </items>
    </cart>

  </user>
  <!-- next users... -->    
</users>

Notes:
The "url" tag must contain the URL of the product as it is used on-site.
For the "url" tag, please provide URLs that do not redirect. This will affect the reporting as well as the functioning of the widgets.
All the URLs must use the same HTTP/HTTPS protocol.