How to Import Orders to WooCommerce Store

When you have a smaller number of orders in your WooCommerce store, say tens or even a hundred, they are quite easy to handle. But as your business grows, the amount of the orders that you have becomes large and it becomes harder to handle them. The solution to this is to import the orders and the data related to orders into the WooCommerce store.

In the case of the migration of a WooCommerce store from one to another, importing the orders is crucial. You would want to keep all the records of the earlier orders and retain the recent and pending orders as well. But when the number of orders becomes large, it pretty difficult to keep track of all the orders and the data related to them. Transfering them as it is to a new website becomes all too difficult as well.

Also, when you have a whole lot of orders to deal with, and you need to make changes to all of them, going about making the changes one by one is not really an option.

The common practice of importing data to a store is by creating a CSV or XML file that contains the data. Then all you need to do is find the right plugin that can import the data error-free and effortlessly for you. This article explains how you can import the orders and order data using Order/Coupon/Subscription Export Import Plugin for WooCommerce.

Features of the Import Orders Plugin

Let’s see the features of the plugin and how it can help to import the orders and order metadata.

  • The plugin can import data from an XML file or from a CSV file.
  • Depending on the location of the plugin, there are two methods with which you can upload the CSV/XML file – by selecting the file from the local computer, or by providing the FTP details to fetch the file from a remote server.
  • The columns of the CSV file need not necessarily align with the WooCommerce order data fields. For this, you can easily map the column headers of the files using the plugin. This is especially useful when migrating from other e-commerce platforms.
  • Auto import orders located on a remote server on regular intervals using Cron Job.
  • Import order metadata from different shipping providers using an XML file.

But first things first…

Before importing to the WooCommerce store using the plugin there are a couple of things that need to be taken care of.

1 – The plugin takes a CSV or an XML file as an input. So you should have a CSV file or an XML file prepared and ready beforehand. You can either use a plugin to export the data to a CSV/XML file or prepare the file yourselves.

You can use Order/Coupon/Subscription Export Import Plugin for WooCommerce to export the order details from a WooCommerce store to a CSV or an XML file.

2 – Prior to importing the orders it is important that the data that are linked to the orders, like the users, products, coupons, etc., be present on the website to which the orders are imported to. Otherwise during the import orders will not be associated with the right the right data.

Now let’s see how we can import the order details from a CSV/XML file to a WooCommercer store.

Importing Orders

After you have installed and activated the plugin go to the store’s admin dashboard. From the admin side, go to WooCommerce > Order Imp-Ex > Orders > Import. This will take you to the import page of the plugin as shown below.

Order import page

  1. Method 1: Select a file from your computer. Click Choose File to browse a required CSV file from your computer.
  2. Method 2: Provide FTP Details. If your CSV file is on the server, then to import it,  you need to do FTP settings as given below:
    1. Select the checkbox to enable FTP import/export.
    2. Enter FTP Server Host/IP.
    3. Enter FTP User Name.
    4. Enter FTP Password.
    5. Enter FTP Port number.
    6. Enter FTP Server Path.
    7. Select the checkbox to use FTPS.
  3. You get the mapping file option(s) for auto-mapping only if you save the mapped fields with a user defined file name while Mapping the fields. Select the required mapping file from the Select a mapping file drop-down list as shown below:
    Mapping File

    Mapping File

  4. Update order if exists: check this box if you want to update the existing orders with the information in the CSV/XML file
  5. Create User: By enabling this checkbox, if while importing the orders, the user corresponding to an order is not found, a new user will be created.
  6. Enter the delimiter which separates the mapping values.
  7. Click Upload file and Import. The import window appears as shown below:
    Orders import page

    Orders import page

  8. You can map the fields(Woocommerce fields) with column headings ( CSV file header). Map a particular field of Map to column by using Column header  drop-down list as shown below:
    Mapping the Field

    Mapping the Field

    Select a required option from the drop-down list. Here, Order ID is mapped to order_id .

    Note: Mapping is very helpful if you are importing CSV from some other e-Commerce platform like Magento.

    Evaluation field

    It is used to fix/update the required value for the particular field. The settings to modify the field are as given below:

    Settings for Evaluation fields

    Settings for Evaluation fields

    • Assign any required constant value to field (=)
      For Example: Suppose, you want to assign completed to Order Status. Under Evaluation field, write =completed in Order Status row.
    • Add any required value to the field (+)
      For Example: Suppose, you want to add 5 to Shipping Total. Under Evaluation field, write +5 in Shipping Total row.
    • Reduce any required value from the field (-)
      For Example: Suppose, you want to reduce 5 from Order Total. Under Evaluation field, write -5 in Order Total row.
    • Multiply by any required value to the field (*)
      For Example: Suppose, you want to multiply to Shipping Tax Total by 1.05. Under Evaluation field, write *1.05 in Shipping Tax Total row.
    • Divide by any required value to field (/)
      For Example: Suppose, you want to divide Cart Discount by 2. Under Evaluation field, write /2 in the row.
    • To Convert the order date to WooCommerce format, provide your CSV date format in evaluation field.
      For Example: In CSV,  If you have entered the date in the correct PHP format as @ d/m/yy H:i:s ( @ 13/07/2016 4:24:25) , then under Evaluation field, you must maintain the same date format as @ d/m/yy H:i:s  in the order_date row. Then the plugin internally converts it in WooCommerce format as 2016-07-13 4:24:25.
    • Append any field by the required value
      For Example: Suppose, you want to append Billing Company by Pvt Ltd. Under Evaluation field, write &Pvt Ltd in billing_company row.
    • Prepend any field by the required value
      For Example: Suppose, you want to prepend Billing First Name by Mr/ Mrs. Under Evaluation field, write &Mr/Mrs[VAL] in Billing First Name row.

    Note: Hover the mouse on ‘?’ (Help), you can see the information about Evaluation field. For more information on Evaluation field, See Evaluation field in Order Export Import Plugin for WooCommerce article.

  9. After mapping all the required field, you can save these mapping and evaluation fields in a file (user-defined) by using Mapping file name field.
  10. Click Submit.
  11. According to CSV file, the order(s) gets added to your online store. The import window appears as shown below:
    Order Import Window

    Order Import Window

    While importing orders with the applied coupon, the plugin connects coupon if the same coupon exists in the online store.

Merge Orders

Suppose your existing order got modified. To reflect that modified order into your online store, you can update the current order by importing modified order CSV file. This is called a merging of the order.

Steps to merge orders

  1. Go to the Import section in the Order tab.
  2. Select Merge order if exists checkbox for modifying orders as shown below:
    Import orders merge if exists

    Import order window

  3. Click Proceed to Import Mapping, you will get to the next step to the import mapping window as shown below:
    Order import mapping

    Order import mapping

  4. Map the column headers of the CSV file with the order data fields.
  5. Click Start Import.
  6. According to CSV file, the order gets merged with the existing order. The window appears as shown below:
    Merge Order Window

    Merge Order Window

    Note: If Order ID does not exist, then the order is imported as a new order.



Leave a Reply