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.

Spec

The following table shows the accepted CSV columns for the orders entity. Note that any columns including N denote a dynamic integer. A column specified as Field N signifies that you can use columns Field 1, Field 2, …, Field N to allow for multiple values per record of the given field, similar to an array.

CSV HeaderData TypeGroupRequiredDescription
Order IDstringYesExternal identifier of the record
Purchase DatestringNoDate that this Order was placed (Z-normalized RFC3339 format)
Store IDstringNoID of the Store in which this Order was placed (externalId resolvable)
Employee IDstringNoID of the Employee associated with this Order (externalId resolvable)
Customer IDstringNoID of the Customer who placed this Order (externalId resolvable)
CurrencystringNoCurrency used to pay for this Order
Order Status IDintegerORstringNoID of the Order Status of this Order (externalId resolvable). Valid values are:
1(Pending)
2 (Processing)
3 (Completed)
4 (Update)
5 (Waiting for Verification)
6 (Cancelled)
7 (Refunded)
8 (Waiting For Stock)
9 (Partially Shipped)
10 (Ready For Pickup)
11 (Other)
12 (Authenticating)
13 (Void)
14 (PAYMENT_AUTHORIZED)
15 (Deleted)
16 (Pending Acknowledgement)
17 (Send Payment Link)
18 (Failed To Send Payment Link)
19 (PAYMENT_CAPTURED)
1001 (Client controlled order status.)
1002 (Client controlled order status.)
1003 (Client controlled order status.)
1004 (Client controlled order status.)
1005 (Client controlled order status.)
Order TaxnumberNoAmount of tax paid for this Order (decimal precision: 2). This can be negative in a return or exchange order
Order TotalnumberNoTotal cost of this Order (decimal precision: 2). This can be negative in a return or exchange order
Payment MethodstringNoPayment method used to pay for the Order
Payment Module CodestringNoPayment module code used when paying for the Order
Return Reason IDintegerORstringNoReturn reason ID, if any. Refer to https://docs.tulip.com/apidocs/dalv70#tag/RefundReasons
Order TypeintegerORstringNoThe type of the order. Valid values are:
1- for “new”, which is a standard sale
5- for “remote_pay”
6 - for “exchange”, a mixed purchase and return item order
7- for “return”, a return item only order
Parent Order IDintegerORstringNoID of the Order’s parent (externalId resolvable)
Billing NamestringBilling AddressNoName for billing address
Billing AddressstringBilling AddressNoStreet address of this bill
Billing SuburbstringBilling AddressNoSuburb of this billing address
Billing CitystringBilling AddressNoCity of this billing address
Billing ZonestringBilling AddressNoZone (such as state or province) of this billing address
Billing PostcodestringBilling AddressNoPostal code of this billing address
Billing CountrystringBilling AddressNoCountry of this billing address
Delivery NamestringDelivery AddressNoName of the recipient
Delivery AddressstringDelivery AddressNoStreet address of the delivery
Delivery SuburbstringDelivery AddressNoSuburb of this delivery address
Delivery CitystringDelivery AddressNoCity of this delivery address
Delivery ZonestringDelivery AddressNoZone (such as state or province) of this delivery address
Delivery PostcodestringDelivery AddressNoPostal code of this delivery address
Delivery CountrystringDelivery AddressNoCountry of this delivery addres
Customer Email AddressstringNoEmail address of the customer
Customer NamestringCustomer AddressNoName of the customer
Customer AddressstringCustomer AddressNoStreet address of the customer
Customer SuburbstringCustomer AddressNoSuburb of this customer’s address
Customer CitystringCustomer AddressNoCity of this customer’s address
Customer ZonestringCustomer AddressNoZone (such as state or province) of this customer’s address
Customer PostcodestringCustomer AddressNoPostal code of this customer’s address
Customer CountrystringCustomer AddressNoCountry of this customer’s address
Shipping MethodstringShipmentNoShipping method name of this shipment, if any
Shipping Module CodestringShipmentNoCode representing the shipping module of this shipment, if any
Order Discount Reason IDintegerOrder DiscountsNoReason ID for the discount. Refer to https://docs.tulip.com/apidocs/dalv70#tag/DiscountReasons
Order Discount Discount IDintegerOrder DiscountsNoDiscount ID for the discount. Refer to https://docs.tulip.com/apidocs/dalv70#tag/Discounts
Order Discount AmountnumberOrder DiscountsNoOrder discount amount. Can be a currency amount or a percentage amount
Order Discount TypestringOrder DiscountsNoType of order discount. Valid values are:
currency
percentage
Order Discount NamestringOrder DiscountsNoName of the discount, used for display purposes
Order Discount SourcestringOrder DiscountsNoSource of the discount. Valid values are:
manual: for discounts that are added manually by users during checkout.
script: for discounts that are added via Tulip Promo Engine Scripts
extensibility-hook: for discounts that are used by external systems, such as adding logic based or coupon code based applied discounts to a basket or item
Order Discount Ref NumnumberOrder DiscountsNoRef num for discount reason
Order Discount Attribute DescriptionstringOrder DiscountsNoDescription of order discount attributes
Order Discount Attribute Language IDintegerOrder DiscountsNoLanguage ID of order discount attributes
Order Discount Attribute N DescriptionstringOrder DiscountsNo
Order Discount Attribute N Language IDintegerOrder DiscountsNo
Order Discount N Reason IDintegerOrder Discounts NNo
Order Discount N Discount IDintegerOrder Discounts NNo
Order Discount N AmountnumberOrder Discounts NNo
Order Discount N TypestringOrder Discounts NNo
Order Discount N NamestringOrder Discounts NNo
Order Discount N SourcestringOrder Discounts NNo
Order Discount N Ref NumnumberOrder Discounts NNo
Order Discount N Attribute DescriptionstringOrder Discounts NNo
Order Discount N Attribute Language IDintegerOrder Discounts NNo
Order Discount N Attribute N DescriptionstringOrder Discounts NNo
Order Discount N Attribute N Language IDintegerOrder Discounts NNo
Item Product IDstringLine ItemsYesID of the product of this line item. If not provided, lookup via Item Variant ID will be performed
Item Variant IDstringLine ItemsYesVariant ID of this Line Item, if applicable (externalId resolvable)
Item Tax InclusiveintegerLine ItemsNoIndicates if the price included taxes
Item Is Blind ReturnintegerLine ItemsNoWhether or not this item was a blind return
Item Original PricenumberLine ItemsNoOriginal list price of this Line Item prior to reductions (decimal precision: 4)
Item Paid PricenumberLine ItemsNoPrice actually paid for this Line Item after being reduced or discounted (decimal precision: 4). This can be negative in a return or exchange order
Item TaxnumberLine ItemsNoTax paid for this Line Item (decimal precision: 4)
Item QuantitynumberLine ItemsNoQuantity of this Line Item purchased (does not need to be an integer) (decimal precision: float). Always positive, even in return orders
Item Refund QuantityintegerLine ItemsNoQuantity of the line item that have already been refunded
Item Line Sequence NumberintegerORstringLine ItemsNoOrder/sequence of line item in the order
Item Parent Line Sequence NumberintegerORstringLine ItemsNoOrder/sequence of a return or exchange items parent item
Item Parent Order IDstringLine ItemsNoID of the items parent order ID, in return and exchange scenarios (externalId resolvable)
Item Custom Attribute N IDstringLine ItemsNo
Item Custom Attribute N ValuestringLine ItemsNo
Item Custom Attribute N Language IDintegerORstringLine ItemsNo
Item N Product IDstringLine Items NYes
Item N Variant IDstringLine Items NYes
Item N Tax InclusiveintegerLine Items NNo
Item N Is Blind ReturnintegerLine Items NNo
Item N Original PricenumberLine Items NNo
Item N Paid PricenumberLine Items NNo
Item N TaxnumberLine Items NNo
Item N QuantitynumberLine Items NNoQuantity of this Line Item purchased (does not need to be an integer) (decimal precision: float). Always positive, even in return orders
Item N Refund QuantityintegerLine Items NNo
Item N Line Sequence NumberintegerORstringLine Items NNo
Item N Parent Line Sequence NumberintegerORstringLine Items NNo
Item N Parent Order IDstringLine Items NNoID of the Order’s parent (externalId resolvable)
Item N Custom Attribute N IDstringLine Items NNo
Item N Custom Attribute N ValuestringLine Items NNo
Item N Custom Attribute N Language IDintegerORstringLine Items NNo
Total DescriptionstringTotalsNoKind of Total this is (for example,Total or Subtotal)
Total Sort OrderintegerTotalsNoOrder in which this Total is sorted
Total ValuenumberTotalsNoAmount of this Total (decimal precision: 4). This can be negative in a return or exchange order
Total ClassstringTotalsNoClass identification of what type of total this is
Total N DescriptionstringTotals NNo
Total N Sort OrderintegerTotals NNo
Total N ValuenumberTotals NNo
Total N ClassstringTotals NNo
Payment IDstringPaymentsNoExternal identifier of the record
Payment AmountnumberPaymentsNoAmount of this Order Payment (decimal precision: 4)
Payment TokenstringPaymentsNoToken representing the payment
Payment VendorstringPaymentsNoVendor used to process this payment (Deprecated)
Payment CurrencystringPaymentsNoCurrency ID of this Payment (externalId resolvable). Refer to: https://docs.tulip.com/apidocs/dalv70#tag/Currencies
Payment StatusstringPaymentsNoPayment Status ID of this Payment (externalId resolvable). Refer to: https://docs.tulip.com/apidocs/dalv70#tag/OrderPaymentStatuses
Payment Parent IdstringPaymentsNoThe ID of the payments parent in refund scenarios
Payment ScaleintegerPaymentsNoDecimal precision for Amount (currency decimal_places is used if no scale is provided)
Payment Scaled AmountintegerPaymentsNoAmount of this Order Payment without decimal precision (can be null to autocalculate)
Payment Scaled Cash RoundingintegerPaymentsNoAmount added or subtracted on cash payments to satisfy the nearest possible denomination
Payment Cash Drawer External IdstringPaymentsNoThe external ID of the cash drawer used for this payment, if a cash payment was made
Payment Type IdintegerPaymentsNoType of this Order Payment. Valid values are:
1 for purchase
2 for refunds
Payment Custom Attribute N IDstringPaymentsNo
Payment Custom Attribute N ValuestringPaymentsNo
Payment Custom Attribute N Language IDintegerORstringPaymentsNo
Payment N IDstringPayments NNoExternal identifier of the record
Payment N AmountnumberPayments NNo
Payment N TokenstringPayments NNo
Payment N VendorstringPayments NNo
Payment N CurrencystringPaymentsNo
Payment N StatusstringPaymentsNo
Payment N ParentstringPaymentsNo
Payment N ScalenumberPaymentsNo
Payment N Scaled AmountnumberPaymentsNo
Payment N Scaled Cash RoundingnumberPaymentsNo
Payment N Cash Drawer External IdstringPaymentsNo
Payment N Type IdnumberPaymentsNo
Payment N Custom Attribute N IDstringPayments NNo
Payment N Custom Attribute N ValuestringPayments NNo
Payment N Custom Attribute N Language IDintegerORstringPayments NNo
Custom Attribute IDstringAttribute ValuesNoAttribute to be used as key in the key/value pair (externalId resolvable)
Custom Attribute ValuestringAttribute ValuesNoValue to appear in this key/value pair
Custom Attribute Language IDintegerORstringAttribute ValuesNoLanguage ID for the language in which this value appears; use 0 if it is not localized (externalId resolvable)
Custom Attribute N IDstringAttribute Values NNo
Custom Attribute N ValuestringAttribute Values NNo
Custom Attribute N Language IDintegerORstringAttribute Values NNo

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.

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 for billing addressstring
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:

RequiredMulti-Row Approach
Column Name
Multi-Column Approach
Column Name
DescriptionType
NoItem Product IDItem N Product IDID of the product of this line item. If not provided, lookup via variantId will be performed.string
NoItem Variant IDItem N Variant IDID of the variant of this line itemstring
NoItem Original PriceItem N Original PriceOriginal price of this line item (4 decimal places)number
NoItem Paid PriceItem N Paid PricePrice actually paid for this line item (4 decimal places)number
NoItem TaxItem N TaxTax paid for this line item (4 decimal places)number
NoItem QuantityItem N QuantityQuantity of this line item purchased (decimal precision: float)number
NoItem 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:

RequiredMulti-Row Approach
Column Name
Multi-Column Approach
Column Name
DescriptionType
Yes*Total DescriptionTotal N DescriptionKind of total this is (e.g. Total, Subtotal)string
Yes*Total Sort OrderTotal N Sort OrderOrder in which this total is sortedinteger
Yes*Total ValueTotal 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:

RequiredMulti-Row Approach
Column Name
Multi-Column Approach
Column Name
DescriptionType
NoPayment IDPayment N IDIdentification string for a paymentstring
NoPayment AmountPayment N AmountAmount of this payment (4 decimal places)number
NoPayment TypePayment N TypePhysical method used to pay (Credit, Debit, Cash, Remote)string
NoPayment TokenPayment N TokenToken representing the paymentstring
NoPayment 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:

RequiredMulti-Row Approach
Column Name
Multi-Column Approach
Column Name
DescriptionType
Yes*Custom Attribute IDCustom Attribute N IDIdentifier of the custom attributestring
Yes*Custom Attribute ValueCustom Attribute N ValueValue of the attributestring
Yes*Custom Attribute Language IDCustom 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 - Multi row
Order History Sample - Multi column