Order History

There's no limit on how much order history you can import. That said, you may want to think through how far back it's worth going.

This is the most complex part of the data import process, and should only be done after you have completed the precursor steps:

  • the catalog must be set up; if the order import finds a product that has yet to be set up, it will throw an error
  • you must set up at least one Store (Administration->Stores) along with its Inventory locations (Administration->Catalog->Inventory Locations)
    • once you have done so, you can view a table that maps the store name to a store_id, which is required for importing
  • you should have set up your users (Administration->System Users) so that orders can be attributed where possible; again, you can view a table that maps each user to a user_id

You should only import historical orders — those that have been fulfilled and paid. In-process orders should be entered manually into the system to ensure that all the pieces are in place to facilitate processing.

(If you want to import wholesale orders, please contact us for assistance.)

For historical orders, there are four sets of information.

1. Core Information

  • store_id -- the id of the store used by the order, as set up above
  • ship_method -- one of pickup, taken, ground, 3_day, 2_day, next_day
  • order_date -- of the form YYYY-MM-DD or m/d/yy or m/d/yyyy
  • order_id -- the order number (digits only); this is optional
  • internal_note -- (optional) inserts a note into the order
  • amt_goods -- the value of the items in the cart
  • amt_disc_goods -- the value of any cart discount (optional)
  • amt_freight -- the shipping amount charged to the customer
  • amt_disc_freight -- the value of any shipping discount (optional)
  • amt_salestax -- the amount of sales tax collected
  • amt_total -- the total amount of the order (should equal the sum of the amounts above)
  • amt_paid -- the amount paid by the customer (should equal amt_total)
  • terms -- one of cc, cash, check, prepaid, cod (it's generally easiest to use cash)
  • user_id -- the user_id of the salesperson for the order

2. Purchaser

  • bill_email -- (required) the email address for the purchaser
  • bill_name -- the purchaser's full name
  • bill_addr1 -- the person's billing address, including street number
  • bill_addr2 -- additional information, such as company name or apartment number
  • bill_postal -- Zip or Zip+4
  • bill_city and bill_state
  • bill_phone -- 10-digit phone number, or formatted: (800) 555-1212

3. Recipient

  • ship_email -- (optional) the email address for the recipient
  • ship_name -- the recipient's full name
  • ship_addr1 -- their address, including street number
  • ship_addr2 -- additional information, such as company name or apartment number
  • ship_postal -- Zip or Zip+4
  • ship_city and ship_state
  • ship_phone -- 10-digit phone number, or formatted: (800) 555-1212
  • ship_carrier -- (optional) the name of the carrier

4. Cart

The contents of the cart may be imported in two ways, depending on your preference and the nature of the export from your current system. Check with us to see which template to use.

Both require four pieces of data per line item:

  • sku -- the unique SKU from the catalog
  • qty -- the quantity in the cart
  • price -- the list price (each) of the SKU purchased
  • amount -- the total charged for the line item (net of any discounts)