Import and Export of WooCommerce Orders

The Import export Suite for WooCommerce plugin lets you import and export all your WooCommerce orders from one store to another in an efficient manner.

Mapping of WooCommerce Orders

↑ Back to top
Column HeadingExplanationAccepted value or format
order_idIdentification Number of the orderNumerical
order_numberThe sequential order numberNumerical
order_dateDate on which the order was createdMM/DD/YYYY H:i:se.g  9/6/2016  6:29:00
paid_datecompletedMM/DD/YYYY H:i:se.g  9/6/2016  6:29:00
statusStatus of the orderText. Eg:processing, completed, cancelled
shipping_totalTotal cost of shippingNumerical
shipping_tax_totalTotal cost of shipping including taxNumerical
fee_totalTotal fees amountNumerical
fee_tax_totalTotal cost of order including taxNumerical
tax_totalTotal amount of taxNumerical
cart_discountDiscount provided on cartNumerical
order_discountDiscount provided on orderNumerical
discount_totalTotal discount provided Numerical
order_totalTotal cost of orderNumerical
order_subtotaltotal price of itemsNumerical
order_currencyCurrency usedText. Eg: USD, EURO, GBP
payment_methodID of payment methodText. Eg: cheque, COD, Stripe, Paypal
payment_method_titleTitle of the payment methodText. Eg: Stripe, PayPal, Check payments, others
transaction_idTransaction id of the orderAlpha-numeric characters
customer_ip_addressIP address of the customerNumerical. Eg: 201.73.89.201
customer_user_agentName of the used browser Alpha-numeric characters
shipping_methodMethod of shipping the orderAlpha-numeric characters. Eg:Free Shipping (4-8 days via USPS): $30.00, Flat rate
customer_id​​Identification number of the customer.Numerical
customer_userCustomer id of the order’s customer Numerical
customer_emailEmail ID of the customer.Alpha-numeric characters. E.g. test1@gmail.com
billing_first_nameFirst name of the customer in the billing address.Text
billing_last_nameLast name of the customer in the billing address.Text
billing_companyCompany name of the customer in the billing address.Text
billing_emailEmail of the customer in the billing address.Alpha-numeric characters. E.g. test1@gmail.com
billing_phonePhone number of the customer in the billing address.Numerical
billing_address_1First billing address of the orderAlpha-numeric characters. 
billing_address_2Second billing address of the orderAlpha-numeric characters. 
billing_postcode Billing postcode of the orderNumerical
billing_cityBilling city of the orderText
billing_stateBilling state of the orderText
billing_countryBilling country of the orderText
shipping_first_nameFirst name in the Shipping addressText
shipping_last_nameLast name in the Shipping addressText
shipping_companyName of the shipping companyText
shipping_phonePhone number of the shipping companyNumerical
shipping_address_1First address of the shipping companyAlpha-numeric characters. 
shipping_address_2Second address  of the shipping companyAlpha-numeric characters. 
shipping_postcodePostcode of the shipping …Numerical
shipping_citySecond address  of the shipping companyText
shipping_stateState to which the order is shipped. Text
shipping_countryCountry to which the order is shipped.
Text
customer_noteAdditional note added by the customer at time of placing the orderText
wt_import_keyused to link subscriptions and orders(parent and renewal) even if their id changes while migrating.Numerical
shipping_items
All data for each shipping method, just contain at least method ID, total cost
Alpha-numeric characters. Eg: items:Polo × 1|method_id:flat_rate|taxes:a:1:{s:5:”total”;a:0:{}}
fee_itemsall fee items for the orderAlpha-numeric characters
tax_itemsall tax items for the order, must contain tax code and totalAlpha-numeric characters.
coupon_itemsCoupon details of the product orderedAlpha-numeric characters. Eg: code:test|amount:10.00
refund_itemsRefund details of the product orderedAlpha-numeric characters. Eg:amount:110.00|reason:|date:2021-06-08 12:33:04
order_notesupdates in an order. Example: status change, payment info etc.Alpha-numeric characters.
download_permissionsdata that is used to grant download permission for a downloadable product order.
Set this to “1” to grant access to downloadable products in the order
Numerical. Eg: 1 and 0
meta:eh_stripe_intent_id  Payment intent id of stripeAlpha-numeric characters.
meta:is_vat_exempt
Identifies if the tax is paid or notText. Eg: Yes, No
meta:total_salesTotal sales for the productNumerical
meta:wf_invoice_numberInvoice number by Web Toffee pluginNumerical
meta:wf_proforma_invoice_numberProforma invoice number by Web ToffeeAlpha-numeric characters.
line_item_1First line items purchased in the order, such as product, price, quantity, sku, idAlpha-numeric characters.
line_item_2Second line items purchased in the order, such as product, price, quantity, sku, idAlpha-numeric characters.

Steps to import orders

↑ Back to top

If you are migrating the store as a whole, we recommend you to import the data in the following the sequence : User/Customer > Product > Product reviews > Coupons > Order.

To import WooCommerce orders:

  • Navigate through the menu: WooCommerce > Import Export Suite and click on the tab: Import.

Step 1: Select post type

↑ Back to top

As a first step, you need to choose the post type as Order.

Step 2: Select import method

↑ Back to top

Choose from the below options to continue with your import:

  •  Quick import 
  •  Pre-saved template 
  •  Advanced import

Let us have a look at each of these export methods:

Quick Import

  • Imports the basic/standard fields of the respective post type.  
  • To be used when your input file was exported using the same plugin.
  • One can import files from:
    1. Local
    2. URL
    3. FTP
  • Click the Import button to complete the action or proceed to Step 3 for advanced options.

Pre-saved template

This import method will be visible only if you satisfy both of these:
  • imported data using the Advanced import method in any of your previous imports.
  • saved the selections as a template for future use.

This method retains the previous filter criteria and other column specifications as per the chosen file and imports data accordingly. By selecting this option, one can choose a previously saved template from the Import template drop-down.

Note: The template will be listed in the drop down only if you have saved it in previous imports.
If you go through the Advanced import, at Step 4 you will get an option to save the template. Once you save that, next time when you want to import a pre-saved template, it will be populated within the drop down.

Advanced import

This option will take you through a detailed process of filtering/column selection/advanced options that may be required for your import.

Note: You can also save this file as a template for future use.

Step 3: Map import columns

↑ Back to top

Here, one can map the import columns under the following 3 fields:

  • Default fields: The column names appearing in this section can be edited if required. The preferred names and choices that were last saved can be viewed on choosing a pre-saved template.
  • Meta(custom fields)
  • Hidden meta
Evaluate field

Evaluate field can be used to append a value/expression to an existing item while importing. It basically selects/maps any column from the input file and compute the values with expressions and creates output.

  • Expression: Any of the operators +*/-()&@ or string constants can be used along with the attributes to manipulate the respective value. 
  • Input: Select the column from the drop down which has to be modified.
  • Output: Sample value will be created based on the first record from input file.

Note: Columns that have no values in the input file may cause syntax errors if used in an expression.

  • Click on Step 4 to proceed.

Step 4: Advanced Options/Batch Import/Scheduling

↑ Back to top
  • On reaching Step 4, the following window will appear, from where one can:
    1. Update Only: On selecting “Yes”, the store is updated with the data from the input file only for matching/existing records from the file. On selecting “No”, the entire data from the input file is processed for an update or insert as the case maybe.
    2. If order exists in the store: One can either Skip or Update the entry.
    3. If conflict with an existing Post ID: One can either Skip item or Import as new item.
    4. Email customer on order status change: Notify the customers regarding their order status change via an email.
    5. Create User: One can create a customer and notify them if needed.
    6. Link products using SKU instead of Product ID: Link the products associated with the imported orders by their Product ID. Not recommended in cases of conflicting IDs.
    7. Delete non-matching orders from store: Choose ‘Yes’ to remove orders from your store which are not present in the input file.

Note: On expanding Advanced options, one can set the number of records that the server will process for every iteration within the configured timeout interval.
If the import fails due to timeout you can lower this number accordingly and try again.

  • Save the template file for future (if needed).
  • Click on Import/Schedule to finish.

You can either import the orders directly into your store or schedule the import using FTP.

To schedule the import:

  1. Hit the Schedule option, and you will be taken to the cron schedule window as shown below:

The plugin supports two different schedule types:

  1. WordPress Cron: Upon a visit, WordPress Cron will check to see if the time/date is later than the scheduled event/s, and if it is– it will fire those events.
    • schedules your job at the specified time. 
    • is dependent on your website visitors.
  2. Server Cron: You may need to trigger the URL every minute depending on the volume of data to be processed.You can use this option :
    • to generate a unique URL that can be added to your system in order to trigger the events. 
    • if you have a separate system to trigger the scheduled events.

You can also configure the time at which the import is to be scheduled. Click on Schedule now to finish.

To directly import:

  1. Hit on the Import option

Once the import is completed, a pop-up will be displayed showing import status which contains the number of successful imports and failed imports (if any).

Steps to export orders

To export WooCommerce orders:

  • Navigate through the menu: WooCommerce> Import Export Suite and click on the tab: Export.

Step 1: Select a post type

↑ Back to top

As a first step, you need to choose the post type as Order.

Step 2: Select an export method

↑ Back to top

Choose from the below options to continue with your export:

  •  Quick export
  •  Pre-saved template 
  •  Advanced export

Let us have a look at each of these export methods:

Quick Export

  • Exports the basic/standard fields of the respective post type.  
  • To include fields from Custom meta and Hidden meta, select the respective group’s checkboxes.
  • Click the Export button to complete the action or proceed to Step 3 for advanced options.

Pre-saved template

This export method will be visible only if you satisfy both of these:
  • exported data using the Advanced export method in any of your previous exports.
  • saved the selections as a template for future use.

Exports data as per the specifications(filters, selective column, mapping.. etc) from the previously saved file. By selecting this option, one can choose a previously saved template from the Export template drop-down.

Note: The template will be listed in the drop down only if you have saved it in previous exports.
If you go through the Advanced export, at Step 5 you will get an option to save the template. Once you save that, next time when you want to export a pre-saved template, it will be populated within the drop down.

  • Click the Export button to complete the action or proceed to Step 3 to filter data.

Advanced Export

Takes you through a detailed process of filtering/column selection/advanced options that may be required for your export.

Note: You can also save this file as a template for future use.

  • Click on Step 3 to filter data.

Step 3: Filter data

↑ Back to top

Filter data that needs to be exported as per the below criteria.

  • Total number of orders to export: The actual number of orders you want to export. e.g. Entering 500 with a skip count of 10 will export orders from 11th to 510th position.
  • Skip first n orders: Specify the number of orders to be skipped from the beginning. e.g. Enter 10 to skip the first 10 orders from export.
  • Order IDs: Enter order IDs separated by comma to export specific orders.
  • Order Statuses: Filter orders by their status type. You can specify more than one type for export.
  • Product: Export orders containing specific products. Key-in the specific product names to export orders accordingly.
  • Email: Input the customer email to export orders pertaining to only these customers.
  • Coupons: Enter coupon codes separated by comma to export orders on which these coupons have been applied.
  • Date From: Export orders placed on and after the specified date.
  • Date To: Export orders placed upto the specified date.

Step 4: Map and reorder export columns

↑ Back to top

The column names appearing in this section can be edited if required. The preferred names and choices that were last saved can be viewed by choosing a pre-saved template. One can also move the columns to reorder the arrangement.

  • Here, one can map and reorder the export columns under the following 3 fields:
    1. Default fields
    2. Custom meta
    3. Hidden meta
  • Click on Step 5 to proceed.

Step 5: Advanced Options/Batch Export/Scheduling

↑ Back to top
  • On reaching Step 5, the following window will appear, from where one can:
    1. Exclude Already Exported: Option ‘Yes’ excludes the previously exported orders.
    2. Export line items into separate columns: Option ‘Yes’ exports the line items within the order into separate columns in the exported file.
    3. Export file name: To specify a filename for the exported file. If left blank the system generates a default name.
    4. Export File Format: Both CSV and XML file formats are available.
    5. Delimiter: Separator for differentiating the columns in the CSV file. Assumes ‘,’ by default.
    6. Enable FTP export: On opting ‘Yes’, choose an FTP profile and specify the export path.

Note: On expanding Advanced options, one can set the number of records that the server will process for every iteration within the configured timeout interval.
If the export fails due to timeout you can lower this number accordingly and try again.

  • Save the template file for future export as shown below(if needed).
  • Click on Export to export or schedule the export to finish.
Use of your personal data
We and our partners process your personal data (such as browsing data, IP Addresses, cookie information, and other unique identifiers) based on your consent and/or our legitimate interest to optimize our website, marketing activities, and your user experience.