Rules for Importing Orders via CSV
These rules are specific to importing orders from a CSV. For general documentation on importing from a CSV, see Importing from a Comma Separated Values Flat File.
Unique Identifiers
The unique identifier fields for an order are used to determine whether an existing order should be updated or a new order should be added. During an order import, the unique identifiers (in order of precedence) are: OrderID, ExternalOrderID.
Creating the Orders CSV File
Orders can contain one or more shipments, which in turn can contain one or more sales. Fields particular to an order (like the buyer information, or the total amount paid) only need to be specified once per order. Fields that are particular to a shipment (like the tracking number or shipping service) must be specified for each shipment). Finally, fields that are particular to each sale (like the quantity purchased or the SKU of the item purchased) need to be specified for each individual sale.
The different levels of data required for creating an order make importing from a flat file more complex than a simple import of items or buyers. Importing multilevel data like this may require multiple input lines for each order as described here.
The first row in the CSV as always is the header row. It contains the title of all order, shipment and sales fields to be imported.
After the header row in the input, the first data line should contain information about the order, the first shipment and the first sale. If the order has only one shipment and one item sold nothing further is required. If however, there are additional items in the shipment, or additional shipments in the order, additional rows will need to be created in the input.
For each additional item in the shipment, a new row should contain all of the pertinent sale fields and either the ShipmentID or ExternalShipmentID field to identify the shipment that the sale is part of. All other shipment and order fields should be left empty (as signified by placing a comma in the input for each missing field).
If additional shipments are in the order, then a new row should contain all of the pertinent shipment fields for the new shipment along with the fields for the first sale in the shipment. In addition, the OrderID or ExternalOrderID field must be provided to indicate the order that the shipment is part of. All other order fields should be left empty (as signified by placing a comma in the input for each missing field).
The following example includes just a few order, shipment and sales fields for importing an order with 2 shipments, with the first shipment having 3 sales and the second shipment having 4 sales.
ExternalOrderID,TotalPaidAmount,Buyers Email,ExternalShipmentID,ShippedDate,TrackingNumber,TransactionID,Sales SKU,Sales Title,QtySold
12474,0.00,support@sixbitsoftware.com,10897,,,15879,CareBearsTrip1-10/5/08,1987 - Care Bears Family Vacation Kit - Bristol Myers,1
,,,10897,,,15880,HettrickMfg,Letterhead - 1923 - Hettrick Cotton Goods - Tents,1
,,,10897,,,15881,TRSagamoreHill-9/30/07,FDC - 1953 - Sagamore Hill - Art Craft,1
12474,,,10898,,,15882,GirlWithTwoBirds1-9/30/07,Elaborate & Fine Die-cut - Woman with Two Birds,1
,,,10898,,,15883,,Booklet - 1942 - How Green Was My Valley - Study Guide,1
,,,10898,,,15884,WomanOnTurtle1-9/30/07,Elaborate and Fine Die-Cut - Woman Riding on a Turtle,1
,,,10898,,,15885,WomanOnDragon1-9/30/07,Elaborate and Fine Die-Cut - Woman Riding on a Dragon,1
Notice there is a single order (12474), two shipments (10897, 10898), and 7 sales total.