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

How to import and export WooCommerce Coupons

Export Coupons

The coupons 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.
WooCommerce Coupon 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.
WooCommerce Coupon 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.

WooCommerce Coupon Export-Step 3

  • Offset – Specify the number of coupons that should be skipped from the beginning. e.g. An offset of 10 skips the first 10 coupons.
  • Limit – The actual number of coupons you want to export. e.g. A limit of 500 with an offset 10 will export coupons from 11th to 510th position.
  • Coupon Statuses – Filter coupons by their status type. You can specify more than one status for export.
  • Coupon Type – Select the coupon type e.g, fixed cart, recurring etc to export only coupon of a specific type.
  • Coupon Amount From – Export coupons by their discount amount. Coupons equivalent to the specified amount and above will be exported.
  • Coupon Amount To – Export coupons by their discount amount. Coupons equivalent to the specified amount and below will be exported.
  • Order Date from – Date on which the coupon will expire. Export coupons with expiry date within the specified interval.
  • Order Date to – Date on which the coupon will expire. Export coupons with expiry date within the specified interval.
  • Sort Columns: Sort the exported data based on the selected columns in order specified. Defaulted to ascending order.
  • Sort By: Defaulted to Ascending. Applicable to above selected columns in the order specified.

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.
WooCommerce Coupon Export-Step 3

  • 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.

  • 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.
  • Advanced Options:
    • 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.

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

Import Coupons

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.
WooCommerce Coupon 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.
WooCommerce Coupon Import-Step 2

  • 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.

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.
WooCommerce Coupon Import-Step 3

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.
WooCommerce Coupon 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.
    • No – The entire data from the input file is processed for an update or insert as the case maybe.
  • Match coupons by their-IDs – The products are either looked up based on their ID or coupon code as per the selection.
    • ID: If the post ID of the coupon being imported exists already(for any of the other post types like coupon, order, user, pages, media etc) skip the coupon from being inserted into the store.
    • Coupon Code – The products are either looked up based on their ID or coupon code as per the selection.
  • If the coupon exists in the store –
    • Skip: Retains the coupon in the store as is and skips the matching coupon from the input file.
    • Update: Update coupon as per data from the input file.
      • Update even id empty values:Updates the coupon data respectively even if some of the columns in the input file contains empty value.
  • Delete non matching coupons from store: Select ‘Yes’ if you need to remove the coupons from your store which are not present in the input file. For e.g, if you have a coupon A in your store and your import file has coupons B, C; the coupon A is deleted from the store prior to importing B and C.
  • User product SKU for coupon restriction settings:
    • Yes: Link the products by their SKUs under coupon restrictions for the imported coupons.
    • No: Link the products by their product IDs under coupon restrictions for the imported coupons. In case of a conflict with IDs of other existing post types the link will be empty.
  • Import in batches: 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.

Step 5: Import/Schedule

You can either import the orders directly into your store or schedule the import using FTP.
WooCommerce Coupon Import-Import Completed

  • Was this article helpful?
  • YesNo