Skip to content

OrderFlow API Documentation

OrderFlow Ltd.

Document Version: 4.2.4

Document Built: 2024-02-16

This document and its content is copyright of OrderFlow Ltd. All rights reserved.
You may not, except with our express written permission, distribute, publish or commercially exploit the content.
Any reproduction of part or all of the contents in any form is prohibited.

Appendix

Appendix

Import Field Definition Detail

The next section provides detail on the field definitions used in the product, order and other import operations.

Product Import Fields

More detail on the fields which can be imported using the Product Import and Product Update are shown below.

Product fields
Name Mandatory Format Example
externalReference YES VARCHAR(120) DVD-UNSG
description YES VARCHAR(120) Under Siege
type YES VARCHAR(120) The 'logical' type of the product. Products of different types will be used by the system in different ways. Implementation-dependent
quantityType NO Denotes what the quantity means for the product. Defaults to 'unit' if omitted. unit, weight, volume
displayUnits NO The units to be displayed on the user interfaces for this product, if quantity type is not 'unit'. Will be abbreviated where appropriate. kilogram, gram, milligram, litre, millilitre
barcode NO VARCHAR(120) 112112113455
thirdPartyReference NO VARCHAR(100) 654913223164
Name Mandatory Format Example
imageReference NO VARCHAR(120) Used to provide link to an external system holding images of the product. Can be a relative path. images/dvd-unsg.gif
packagingDescription NO VARCHAR(255) Text describing how item is packaged and quantity thereof. Cartons of 12
harmonisedSystemCode NO VARCHAR(255) The harmonized system (HS) customs code. If not set, can be inferred from product category. 8523.49.5100
customsDescription NO VARCHAR(255) The description of the product for customs paperwork. If not set, can be inferred from product category. Media
productComposition NO VARCHAR(255) Typically used for customs purposes.
countryOfOrigin NO VARCHAR(255) Typically for customs declarations. ISO code or full country name. GB
weight NO FLOAT 100
weightUnits NO VARCHAR(10) gram
physicalStorageTypes NO VARCHAR(1024) A comma-separated list of the physical storage types which are used to hold products of this type Implementation-dependent
category NO VARCHAR(10) gram
Name Mandatory Format Example
weightUnits NO VARCHAR(120) Refers to an entry in the product category table DVD
sellable NO BOOLEAN Used to indicate that a product is for sale on one or more channels.
dangerous NO BOOLEAN Used to indicate that a product is considered dangerous, usually w.r.t. couriers.
hazardClass NO VARCHAR(100) flammable_liquids
fragile NO BOOLEAN Used to indicate that a product is fragile, usually w.r.t. couriers.
priceNet NO FLOAT 1.8
priceGross NO FLOAT 1.99
tax NO FLOAT 0.19
taxCode NO FLOAT T1
currency NO One of a predefined list of values (usually based on ISO 4217) which may be used to control the information shown on customer paperwork GBP, USD, CNY, EUR
Name Mandatory Format Example
length NO FLOAT 2.00
width NO FLOAT 1.00
height NO FLOAT 0.5
area NO FLOAT Can be derived from dimensions if not supplied 2.00
volume NO FLOAT Can be derived from dimensions if not supplied 1.00
style NO VARCHAR(50) Used for general purposes, grouping of products that don't match categories
colour NO VARCHAR(50) red
size NO VARCHAR(50) XL
pickingInstruction NO VARCHAR(512)
packingInstruction NO VARCHAR(512)
userDefined1 Project specific VARCHAR(255)
userDefined2 Project specific VARCHAR(255)
userDefined3 Project specific VARCHAR(255)
userDefined4 Project specific VARCHAR(255)
userDefined5 Project specific VARCHAR(255)
Product attribute fields

OrderFlow supports the import of arbitrary product attributes as name value pairs.

Name Mandatory Format Example
name NO VARCHAR(120) card.tx.ref
title YES VARCHAR(120) Card Transaction Reference
value NO, but normally supplied VARCHAR(5000) XYZ-123

Order Import Fields

A more complete list of available order, shipment and order line fields used the Order Import operation are shown below:

Order Fields
Name Mandatory Format Example
externalReference YES VARCHAR(80) ORDREF_123000034
state Project specific One of a predefined list of values which may be used to control how an order is processed. Normally, it is best not to set this value, instead leaving this job to the OrderFlow import mapping script created
partialOrder NO BOOLEAN Flag indicating whether order has been divided upstream of OrderFlow. false
paymentGatewayIdentifier NO VARCHAR(120) Used to pass a payment gateway identifier to OrderFlow, if required google_checkout
paymentTransactionInfo NO VARCHAR(1024) Environment dependent
placed NO TIMESTAMP Time the order was placed by the customer 2014-11-31 13:24:06
authorised NO TIMESTAMP Time the payment was approved (typically by a payment gateway) 2014-11-31 15:24:09
customerComment NO VARCHAR(1024) As discussed, please fix UK plug
totalPriceNet NO FLOAT 10.20
totalPriceGross NO FLOAT 11.99
totalPriceTax NO FLOAT 1.79
totalTaxCode NO One of a list of values which may be used to control the information shown on customer paperwork T0, T1, T2
Name Mandatory Format Example
shippingPriceNet NO FLOAT The net amount for the shipping charge for the order 2.98
shippingPriceGross NO FLOAT 3.50
shippingTaxTotal NO FLOAT 0.52
shippingTaxCode NO One of a list of values which may be used to control the information shown on customer paperwork T0, T1, T2
goodsPriceNet NO FLOAT The price for the goods in the order. Includes the goods portion of the shipping price; excluding the shipping price 10.20
goodsPriceGross NO FLOAT 11.20
goodsTax NO FLOAT 0.52
goodTaxCode NO One of a list of values which may be used to control the information shown on customer paperwork T0, T1, T2
currency NO One of a predefined list of values (usually based on ISO 4217) which may be used to control the information shown on customer paperwork GBP, USD, CNY, EUR
currencyUnits NO One of a predefined list of values which may be used at the point the order is imported pounds
promotionCode NO VARCHAR(80) The promotion code for the order if present summer_2014
promotionDescription NO VARCHAR(120) The description of the promotion
Name Mandatory Format Example
source NO VARCHAR(255) A string which identifies the original source of the order. Can be used within OrderFlow to remap order to a different channel.
deliveryAddressLine1 NO VARCHAR(255)
deliveryAddressLine2 NO VARCHAR(255)
deliveryAddressLine3 NO VARCHAR(255)
deliveryAddressLine4 NO VARCHAR(255)
deliveryAddressLine5 NO VARCHAR(255)
deliveryAddressLine6 NO VARCHAR(255)
deliveryCountryCode NO VARCHAR(2)
deliveryPostCode NO VARCHAR(10)
deliveryContactName NO VARCHAR(255)
deliveryEmailAddress NO VARCHAR(50)
deliveryDayPhoneNumber NO VARCHAR(50)
deliveryEveningPhoneNumber NO VARCHAR(50)
deliveryMobilePhoneNumber NO VARCHAR(50)
deliveryFaxNumber NO VARCHAR(50)
deliveryCompanyName NO VARCHAR(120)
invoiceAddressLine1 NO VARCHAR(255)
invoiceAddressLine2 NO VARCHAR(255)
Name Mandatory Format Example
invoiceAddressLine3 NO VARCHAR(255)
invoiceAddressLine4 NO VARCHAR(255)
invoiceAddressLine5 NO VARCHAR(255)
invoiceAddressLine6 NO VARCHAR(255)
invoiceCountryCode NO VARCHAR(2)
invoicePostCode NO VARCHAR(10)
invoiceContactName NO VARCHAR(255)
invoiceEmailAddress NO VARCHAR(80)
invoiceDayPhoneNumber NO VARCHAR(50)
invoiceEveningPhoneNumber NO VARCHAR(50)
invoiceMobilePhoneNumber NO VARCHAR(50)
invoiceFaxNumber NO VARCHAR(50)
invoiceCompanyName NO VARCHAR(120)
userDefined1 NO VARCHAR(255)
userDefined2 NO VARCHAR(255)
userDefined3 NO VARCHAR(255)
userDefined4 NO VARCHAR(255)
userDefined5 NO VARCHAR(255)
Order attribute fields

OrderFlow supports the import of arbitrary order attributes as name value pairs.

Name Mandatory Format Example
name NO VARCHAR(120) card.tx.ref
title YES VARCHAR(120) Card Transaction Reference
value NO, but normally supplied VARCHAR(5000) XYZ-123
Shipment fields
Name Mandatory Format Example
externalReference NO VARCHAR(100) Can be omitted, in which case, order reference will typically be used to provide implicit value. ORDREF_123000034
paidFor NO BOOLEAN Flag indicating whether shipment payment has been taken. true
earliestShipDate NO DATETIME The earliest date the shipment should be shipped 2014-11-31
site NO VARCHAR(120) Optional field used to explicitly select site or warehouseto be used for fulfilling shipment. Only used for multi-site environments. WAREHOUSE_1
priority NO INTEGER A positive number representing the priority of the shipment 100
priorityName NO VARCHAR(30) A human-readable string representing the priority Urgent
weight NO FLOAT 100
weightUnits NO VARCHAR(10) The weight unit, which defaults to 'gram' gram
addressLine1 NO VARCHAR(255)
addressLine2 NO VARCHAR(255)
addressLine3 NO VARCHAR(255)
addressLine4 NO VARCHAR(255)
addressLine5 NO VARCHAR(255)
addressLine6 NO VARCHAR(255)
Name Mandatory Format Example
countryCode NO VARCHAR(2)
postCode NO VARCHAR(10)
contactName NO VARCHAR(255)
emailAddress NO VARCHAR(80)
dayPhoneNumber NO VARCHAR(50)
eveningPhoneNumber NO VARCHAR(50)
mobilePhoneNumber NO VARCHAR(50)
faxNumber NO VARCHAR(50)
companyName NO VARCHAR(120)
courier NO VARCHAR(120) Allows the courier to be set directly. Not set normally, rather allow it to be determined dynamically via script. royalmail_ppi
deliveryInstruction NO VARCHAR(1024) Any special instruction to be given to courier as part of the delivery. Leave with neighbour
deliverySuggestionCode NO VARCHAR(120) A hint or suggestion to the system which can be used to help determine the actual courier and service. combination to be used express
Name Mandatory Format Example
deliverySuggestionName NO VARCHAR(255) The name associated with the delivery suggestion code. Express
companyName NO VARCHAR(120)
pickingMode NO VARCHAR(120) Not set normally, rather allow it to be determined dynamically via script batch, individual
userDefined1 Project specific VARCHAR(255)
userDefined2 Project specific VARCHAR(255)
userDefined3 Project specific VARCHAR(255)
userDefined4 Project specific VARCHAR(255)
userDefined5 Project specific VARCHAR(255)

Note that if the shipment address fields or contact fields are set, they will override any values set for the delivery address fields in the containing order. This allows multiple shipments within the same order to be directed to different addresses.

Order Line fields
Name Mandatory Format Example
product.externalReference YES VARCHAR(120) DVD-MATR
quantity YES INTEGER 2
description NO VARCHAR(1024) Typically used for a local language order line description. If not set, then product description is used instead
totalPriceNet NO FLOAT 10.20
totalPriceGross NO FLOAT 11.99
totalPriceTax NO FLOAT 1.79
totalTaxCode NO VARCHAR(10) T0
unitPriceNet NO FLOAT 10.20
unitPriceGross NO FLOAT 11.99
Name Mandatory Format Example
unitPriceTax NO FLOAT 1.79
unitTaxCode NO VARCHAR(10) T0
promotionCode NO VARCHAR(80) The promotion code for the order if present summer_2014
promotionPriceDescription NO VARCHAR(150) The description of the promotion price £9.99 (was £12.99)
userDefined1 Project specific VARCHAR(255)
userDefined2 Project specific VARCHAR(255)
userDefined3 Project specific VARCHAR(255)
userDefined4 Project specific VARCHAR(255)
userDefined5 Project specific VARCHAR(255)

Note that either the total price or the unit price should be specified. OrderFlow will not derive order line prices if none are supplied, but it can, for example, derive a total price value from unit prices.

Prices are typically required for despatch note paperwork, and for international shipment, for customs documentation.