Documentation/Import Export Suite for WooCommerce/How to import and export WooCommerce Orders

How to import and export WooCommerce Orders

Export Orders

The orders can be exported in few easy steps:

Step 1: Select a post type

Export and download the respective post type into a CSV or XML. This file can also be used to import data related to the specific post type back into your WooCommerce shop. As a first step you need to choose the post type as orders to start the export.
Order Export-Step 1

Step 2: Select an export method

Choose from the options below to continue with your export: quick export from DB, based on a pre-saved template or a new export with advanced options.
Order Export-Step 2

  • Quick Export: Quick export only exports all the basic/standard fields of the respective post type. You do not get to selectively filter the columns with this option except for the groups based on taxonomies/attributes/meta/hidden meta.
  • From pre-saved template: Using a pre-saved template retains the previous filter criteria and other column specifications as per the chosen file and exports data accordingly. You can also edit this file in the process and export accordingly or export straightaway.
  • New Export: A new export will take you through the entire process of filtering/column selection/advanced options that may be required for your export. You can also save this file for future use.

Step 3: Filter data

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

Order Export-Step 3
  • Offset – Specify the number of orders that should be skipped from the beginning. e.g. An offset of 10 skips the first 10 orders.
  • Limit – The actual number of orders you want to export. e.g. A limit of 500 with an offset 10 will export orders from 11th to 510th position.
  • Order Statuses – Filter orders by their status type. You can specify more than one type for export.
  • Products – 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 coupons codes separated by comma to export orders on which these coupons have been applied.
  • Date from – Date on which the order was placed. Export orders placed on and after the specified date.
  • Date to – Date on which the order was placed. Export orders placed upto the specified date.

Step 4: Map and reorder export columns

The default export column names can be seen in the screen below. You can edit these if required. If you have chosen a pre-saved template you can see the preferred names and choices that were last saved. You may also drag the columns accordingly to reorder them within the output file.
Order Export-Step 4

  • Default fields
  • Meta(Custom fields)
  • Hidden meta

Step 5: Advanced Options/Batch Export/Scheduling

Use advanced options from below to decide on the batch export count, schedule an export and/or export images separately. You can also save the template file for future exports.

  • Exclude already exported – Option ‘Yes’ excludes the previously exported orders.
  • Export line items into separate columns – Option ‘Yes’ exports the line items within the order into separate columns in the exported file.
  • Download file format: You can either select CSV or XML from the drop-down.
  • Delimiter – Separator for differentiating the columns in the CSV file. Assumes ‘,’ by default.
  • Enable FTP export: On opting ‘Yes’, choose an FTP profile and specify the export path.
  • Convert shortcodes to HTML – Option ‘Yes’ converts the shortcode to HTML within the exported CSV.
  • Export in batches of – The number of records that the server will process for every iteration within the configured timeout interval. If the export fails you can lower this number accordingly and try again. Defaulted to 0 records.

Now if you wish to save the configured settings for export, you can click the Save template button. It opens a popup to add a name for the template.

After naming the template click the Save button. Now the saved template will be visible on the previous templates list for you to choose from.

Alternatively, you can click on Export to directly get the file downloaded into your system.

You can click on Export and then Download the file to get the file downloaded into your system.

Schedule the Export

  • WordPress Cron – This type of scheduler depends on WordPress for scheduling your job at the specified time. However, this model is dependent on your website visitors. 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.
  • Server Cron – You can use this option if you have a separate system to trigger the scheduled events. This method will generate a unique URL that can be added to your system in order to trigger the events. You may need to trigger the URL every minute depending on the volume of data to be processed.
  • File name Specify a filename for the exported file(the contents of this file will be overwritten for every export). If left blank the system generates a default name(a new filename is generated for every export).

Import Orders

Step 1: Select post type

Import the respective post type from a CSV/XML. As a first step you need to choose the post type to start the import.
Order Import-Step 1

Step 2: Select import method

Import Method

Choose from the options below to continue with your import: quick import, based on a pre-saved template or a new import with advanced options.

  • Quick Import: Quick import only imports the fields from the input file that conforms to the specific column headers as required by the plugin. You do not get to selectively filter the columns with this option except for the groups based on taxonomies/attributes/meta/hidden meta. Use this option primarily when your input file was exported using the same plugin.
  • From pre-saved template: Using a pre-saved template retains the previous filter criteria and other column specifications as per the chosen file and imports data accordingly. You can also edit this file in the process and import accordingly or import straightaway.
  • New import: A new import will take you through the entire process of filtering/column selection/advanced options that may be required for your import. You can also save this file as a template for future use.

Order Import-Step 2

Import Source (CSV/XML)

  • Import from Local
  • Import from URL
  • Import from FTP

Step 3: Map and reorder import columns

Map the standard/meta/attributes/taxonomies and hidden meta columns with your CSV/XML column names.

Columns are mapped automatically only if a matching header name is found in the input file. If not the value is left blank.
If your input file header does not have exact names or if you need to edit the existing mapping you can simply click on the respective value fields corresponding to each row. Furthermore you can also assign expressions based on the existing input file columns.

The columns are grouped into categories:

  • Default fields
  • Meta(Custom fields)
  • Hidden meta

Step 4: Advanced Options/Batch Export/Scheduling

Use advanced options from below to decide on the delimiter options, updates to existing orders, batch import count or schedule an import. You can also save the template file for future imports.

Order Import-Step 4
  • Update Only
    • Yes – The store is updated with the data from the input file only for matching/existing records from the file. If the post ID of the order being imported exists already(for any of the other post types like coupon, product, user, pages, media etc) skip the order from being inserted into the store.
    • No – The entire data from the input file is processed for an update or insert as the case maybe.
  • If order exists in the store – Orders are matched by their order IDs.
    • Skip – Retains the order in the store as is and skips the matching order from the input file.
    • Update – Update order as per data from the input file
      • Update even if empty values – Updates the order data respectively even if some of the columns in the input file contains empty value.
  • If conflict with an existing Post ID – All the items within woocommerce/wordpress are treated as posts and assigned a unique ID as and when they are created in the store. The post ID uniquely identifies an item irrespective of the post type be it order/product/pages/attachments/revisions etc.
  • Skip – If the post ID of the order being imported exists already(for any of the other post types like coupon, product, user, pages, media etc) skip the order from being inserted into the store.
  • Import as new item – Insert the order into the store with a new order ID(next available post ID) different from the value in the input file.
  • Email customer on order status change – Select ‘Yes’ if an email is to be sent to the customer of the corresponding order when the status is changed during import.
  • Create user – Select ‘Yes’ if you want the application to create the customer associated with the order being imported if the customer does not exist in the store. Only the username(extracted from the email id), email id and address( shipping address) is added to the profile.
  • Notify the customer – Notify the customer by email when created successfully. Customer will have to use the forgot password link to access the account.
  • Link products using SKU instead of Product ID
    • Yes – Link the products associated with the imported orders by their SKU.
    • No – Link the products associated with the imported orders by their Product ID. In case of a conflict with IDs of other existing post types the link cannot be established.
  • Delete non-matching orders from store- Select ‘Yes’ if you need to remove the orders from your store which are not present in the input file. For e.g, if you have an order #123 in your store and your import file has orders #234, #345; the order #123 is deleted from the store prior to importing orders #234, #345.
  • Advanced options
    • Import in batches of – The number of records that the server will process for every iteration within the configured timeout interval. If the import fails you can lower this number accordingly and try again. Defaulted to 100 records.

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

To schedule the import, hit the schedule option, you will be taken to the cron schedule window as shown below:

The plugin supports two different schedule types:

  • WordPress Cron: This type of scheduler depends on WordPress for scheduling your job at the specified time. However, this model is dependent on your website visitors. 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.
  • Server Cron: You can use this option if you have a separate system to trigger the scheduled events.

The server cron method will generate a unique URL that can be added to your system in order to trigger the events. You may need to trigger the URL every minute depending on the volume of data to be processed.

In addition, the import/export can be scheduled on a daily, weekly, monthly, or on a custom basis. The time at which the import has to be scheduled can also be configured.

Alternatively, to straightaway proceed with the import, hit on the import option. You can see the progress of the import. 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).

  • Was this article helpful?
  • YesNo