File Format - Order

Order History File Format

The first line of an Order History CSV file must be the header row.

An order instance is a group of rows in the CSV file that are sequential and include the same required fields. Data relating to fields specified under Base Headers and Multi-Column Headers must be specified in the first row of an order instance. Additional rows of an order instance may only include fields specified under Multi-Row Headers.

Required Headers

To successfully import an order CSV file, the following columns must be included in the header row:

Column NameDescriptionType
Order ID (Required)*Identification string for an orderstring

Base Headers

The following headers are optional. Fields for these columns must be specified in the first row of an order instance, otherwise data will be lost.

Column NameDescriptionType
Purchase Date (Required) *Date which the order was made (Z-normalized RFC3339 format)string
Store ID (Required)*ID of the store where the order was madestring
Employee ID (Required)*ID of the employee associated with this orderstring
Customer ID (Required)*ID of the customer who placed this orderstring
Currency (Required)*Currency used to pay for this orderstring
Order Status ID (Required)*ID of the order status of this order.
Integers will be resolved to internal identifiers
integer, string
Order Tax (Required)*Amount of tax paid for this order (2 decimal places)number
Order Total (Required)*Total cost of this order (2 decimal places)number
Payment MethodPayment method used to pay for the order (could be Visa, MC, etc. or Cash/Credit/etc.)string
Payment Module CodePayment module code used when paying for this orderstring
GroupsSee below
Custom AttributesSee below

Groups

A group is a class of headers that relate to one another, and may allow for multiple pieces of information to be presented. For example, a customer can have multiple emails, addresses, phone numbers, and more.

Order groups include:

Billing Address

There is one way that a billing address can be formatted in your CSV file. The header row may only contain up to one set of billing address headers. Only the first row of an order instance can contain data relating to a billing address. Data in additional rows under a billing address column will be lost. All headers in this group are optional.

The following columns may be included:

Column NameDescriptionType
Billing NameName of the recipientstring
Billing AddressStreet address of the billstring
Billing SuburbSuburb of this billing addressstring
Billing CityCity of this billing addressstring
Billing ZoneZone (such as state or province) of this billing addressstring
Billing PostcodePostal code of this billing addressstring
Billing CountryCountry of this billing addressstring

Delivery Address

There is one way that a delivery address can be formatted in your CSV file. The header row may only contain up to one set of delivery address headers. Only the first row of an order instance can contain data relating to a delivery address. Data in additional rows under a delivery address column will be lost. All headers in this group are optional.

The following columns may be included:

Column NameDescriptionType
Delivery NameName of the recipientstring
Delivery AddressStreet address of the deliverystring
Delivery SuburbSuburb of this delivery addressstring
Delivery CityCity of this delivery addressstring
Delivery ZoneZone (such as state or province) of this delivery addressstring
Delivery PostcodePostal code of this delivery addressstring
Delivery CountryCountry of this delivery addressstring

Customer Address

There is one way that a customer address can be formatted in your CSV file. The header row may only contain up to one set of customer address headers. Only the first row of an order instance can contain data relating to a delivery address. Data in additional rows under a delivery address column will be lost. All headers in this group are optional.

The following columns may be included:

Column NameDescriptionType
Customer NameName of the customerstring
Customer AddressStreet address of the customerstring
Customer SuburbSuburb of this customer’s addressstring
Customer CityCity of this customer’s addressstring
Customer ZoneZone (such as state or province) of this customer’s addressstring
Customer PostcodePostal code of this customer’s addressstring
Customer CountryCountry of this customer’s addressstring

Shipment

There is one way that a shipment can be formatted in your CSV file. The header row may only contain up to one set of shipment headers. Only the first row of an order instance can contain data relating to a shipment. Data in additional rows under a shipment column will be lost. All headers in this group are optional.

The following columns may be included:

Column NameDescriptionType
Shipping MethodMethod of this shipmentstring
Shipping Module CodeCode representing the shipping module of this shipmentstring

Line Items

There are two ways that line items can be formatted in your CSV file: A Multi-Row Approach or Multi-Column Approach.

Multi-Row Approach

In this approach, one set of column headers is used alongside multiple rows of data. To allow for multiple rows of data, additional rows must include the same Required Headers fields.

Multi-Column Approach

In this approach, multiple sets of column headers may be used alongside one row (the first row) of an order instance. To use these columns multiple times, an identifying number must exist for N and be unique for every new set of columns.

Columns from the Multi-Row Approach cannot be mixed with columns from the Multi-Column Approach in a CSV file for the Line Items group.

The following columns may be included:

Multi-Row Approach
Column Name
Multi-Column Approach
Column Name
DescriptionType
Item Product IDItem N Product IDID of the product of this line item. If not provided, lookup via variantId will be performed.string
Item Variant IDItem N Variant IDID of the variant of this line itemstring
Item Original PriceItem N Original PriceOriginal price of this line item (4 decimal places)number
Item Paid PriceItem N Paid PricePrice actually paid for this line item (4 decimal places)number
Item TaxItem N TaxTax paid for this line item (4 decimal places)number
Item QuantityItem N QuantityQuantity of this line item purchased (decimal precision: float)number
Item Refund QuantityItem N Refund QuantityQuantity of the line item that have already been refundednumber

Where N is some positive integer.

Totals

There are two ways that totals can be formatted in your CSV file: A Multi-Row Approach or Multi-Column Approach.

Multi-Row Approach

In this approach, one set of column headers is used alongside multiple rows of data. To allow for multiple rows of data, additional rows must include the same Required Headers fields.

Multi-Column Approach

In this approach, multiple sets of column headers may be used alongside one row (the first row) of an order instance. To use these columns multiple times, an identifying number must exist for N and be unique for every new set of columns.

Columns from the Multi-Row Approach cannot be mixed with columns from the Multi-Column Approach in a CSV file for the Totals group.

The following columns may be included:

Multi-Row Approach
Column Name
Multi-Column Approach
Column Name
DescriptionType
Total Description(Required)*Total N DescriptionKind of total this is (e.g. Total, Subtotal)string
Total Sort Order(Required)*Total N Sort OrderOrder in which this total is sortedinteger
Total Value(Required)*Total N ValueAmount of this total (4 decimal places)number

Where N is some positive integer

Payments

There are two ways that payments can be formatted in your CSV file: A Multi-Row Approach or Multi-Column Approach.

Multi-Row Approach

In this approach, one set of column headers is used alongside multiple rows of data. To allow for multiple rows of data, additional rows must include the same Required Headers fields.

Multi-Column Approach

In this approach, multiple sets of column headers may be used alongside one row (the first row) of an order instance. To use these columns multiple times, an identifying number must exist for N and be unique for every new set of columns.

Columns from the Multi-Row Approach cannot be mixed with columns from the Multi-Column Approach in a CSV file for the Payments group.

The following columns may be included:

Multi-Row Approach
Column Name
Multi-Column Approach
Column Name
DescriptionType
Payment IDPayment N IDIdentification string for a paymentstring
Payment AmountPayment N AmountAmount of this payment (4 decimal places)number
Payment TypePayment N TypePhysical method used to pay (Credit, Debit, Cash, Remote)string
Payment TokenPayment N TokenToken representing the paymentstring
Payment VendorPayment N VendorVendor used to process this paymentstring

Where N is some positive integer.

Custom Attributes

There are two ways that custom attributes can be formatted in your CSV file: A Multi-Row Approach or Multi-Column Approach.

Multi-Row Approach

In this approach, one set of column headers is used alongside multiple rows of data. To allow for multiple rows of data, additional rows must include the same Required Headers fields.

Multi-Column Approach

In this approach, multiple sets of column headers may be used alongside one row (the first row) of a customer instance. To use these columns multiple times, an identifying number must exist for N and be unique for every new set of columns.

Columns from the Multi-Row Approach cannot be mixed with columns from the Multi-Column Approach in a CSV file for the Custom Attributes group.

The following columns may be included:

Multi-Row Approach
Column Name
Multi-Column Approach
Column Name
DescriptionType
Custom Attribute ID (Required)*Custom Attribute N IDIdentifier of the custom attributestring
Custom Attribute Value (Required)*Custom Attribute N ValueValue of the attributestring
Custom Attribute Language ID (Required)*Custom Attribute N Language IDLanguage of the attribute.
Integers will be resolved to internal identifiers
integer, string

Where N is some positive integer.

Order History CSV Example

See the following Order History CSV sample file.

Order History Sample 1