Importing Order Data

Overview

In order to utilize Recommendations prior to the real-time data collection, order history data can be provided to the Recommendation engine. The order history data does NOT need to include any customer identification details. This document will describe the necessary feeds that are required.

Note this process can be run on an ongoing basis. This would be helpful in a scenario where significant sales activity occurs offline, but you would like to capture that information to help target recommendations on your website. You could continue to upload the file periodically for example. If you would like to automate this process by sending the files to an SFTP server, HawkSearch could run a process to pick it up and add in an automated manner. Please reach out to your HawkSearch contact to discuss.

Feed Formats for Order data

The Recommendations engine will utilize your website’s order history, broken out into two separate files, and representing activity from the last 30 days.

orders.txt

This file represents the summary of the orders from the last 30 days.

order_items.txt

This file represents the items contained within the orders defined in the orders.txt file.

Please review the data feed format for each file. If a particular column does not appear to apply to your data, please bring this to the attention of your Hawk Search implementation representative for further clarification.

File Format Requirements

File Size Limit

The maximum file size that can be imported is 4096 kB. Larger files needs to be spitted and imported separately.

Flat-File Format Properties

ItemValue
EncodingUTF-8
Column DelimiterTab
Column HeadersRequired, case insensitive

Column Headers are allowed in plain text or in quotation marks.

For example: OrderId, orderid, "orderid" or "OrderId"
Row DelimiterUnix Format (\n as a row delimiter)
File NameLowercase and should match names specified above

Orders Data Feed

FILE NAME: orders.txt

The Orders Data Feed consists of order summary data from the site over the last 30 days, provided in a single file named orders.txt.

Required Data Columns

NameTypeData DescriptionRequiredSample Value
OrderIdStringAlphanumeric ID value representing the order identifier. This is usually generated by your ecommerce system and is unique.YesAA123
OrderNoStringAlphanumeric value representing the order number, if it is different than the OrderId. If it is the same, please use the OrderId in this field. Typically unique.YesAA123
SubTotalDecimalThe total of items in the order before taxes or shipping costs.Yes12.34
TaxDecimalThe amount of tax associated with this order.Yes1.23
TotalDecimalThe order total, or the amount that includes shipping, taxes and all associated costs.Yes13.57
CurrencyStringThe currency format used by the order (USD, EURO, CAD)YesUSD
CreateDateMM-DD-YYYYThe date the order was submitted and completed in UTCYes01/23/2014
MemberIdStringThe unique identifier representing the customer. This is usually generated by your ecommerce system. This usually will not contain details such as the customer name.YesZZ1234

Order Items Data Feed

FILE NAME: order_items.txt

The Order Items Data Feed will contain the items associated with each order defined in the Orders Data Feed. This items should be grouped by its order identifier, and provided in a single file named order_items.txt.

Required Data Columns

NameTypeData DescriptionRequiredSample Value
OrderIdStringUnique Alphanumeric ID. This should correspond to the OrderId column specified in the orders.txt fileYesAA123
ItemIdStringAlphanumeric identifier for the item. This should be the unique number or internal identifier used track item. This is typically ItemId, SKU or ProductID. This will be mapped to your primary key field in HawkSearch.YesAABB123
PriceDecimalThe per unit item price.Yes123.45
QuantityIntegerThe number of items purchased in this order.Yes123

Sample Files

order_items.txt

orders.txt

How To Upload Offline Orders

The upload option is within the Workbench in the Recommendations section.