Coupons are the best tools to market your store products. With the plugin Import Export Suite for WooCommerce, you can quickly import and export all your WooCommerce coupons from one store to another.
Mapping of WooCommerce Coupons
↑ Back to topColumn Heading | Explanation | Accepted value or format |
---|---|---|
post_title | Coupon code | Alpha-numeric characters. |
ID | Identification Number of the coupons | Numerical |
post_excerpt | Short description | Alpha-numeric characters. |
post_status | Status of the post | Text. Eg: Publish |
post_date | Date on which the post was created. | MM/DD/YYYY H:i:se.g 9/6/2016 6:29:00 |
post_author | Name of the post’s author | Numerical |
discount_type | Type of discount | Text. Eg: percent, fixed_cart |
coupon_amount | Price of coupon | Numerical |
individual_use | Type of use | Text. Eg: yes, no |
product_ids | Identification Number of the product. | Numerical |
product_SKUs | SKU of the product. | Alpha-numerical |
exclude_product_ids | Product ids you want to remove | Numerical |
exclude_product_SKUs | Product SKUs you want to remove | Alpha-numerical |
usage_count | Number of times the coupon has been used | Numerical |
usage_limit | Number of total coupon uses | Numerical |
usage_limit_per_user | Number of times the coupon can be used by an individual user. | Numerical |
limit_usage_to_x_items | Maximum number of individual items the coupon can apply to when using product discounts. | Numerical |
date_expires | Date on which the coupon will expire. | MM/DD/YYYY H:i:se.g 9/6/2016 6:29:00 |
free_shipping | Specify if the coupon grants free shipping or not | Text. Eg: yes, no |
exclude_sale_items | Specify if the items on sale are excluded or not. | Text. Eg: yes, no |
product_categories | Category of products. | Text |
exclude_product_categories | Category of products you want to remove. | Text |
minimum_amount | Minimum amount for coupon | Numerical |
maximum_amount | Maximum amount for coupon | Numerical |
customer_email | Email address of the customer. | Alpha-numeric characters. Eg: test1@gmail.com |
meta:wt_apply_discount_before_tax_calculation | Apply discount before tax calculation. | Text. Eg: Yes, no |
Steps to import coupons
↑ Back to topIf you are migrating the store as a whole, we recommend you to import the data in the following order : User/Customer > Product > Product reviews > Coupons.
Step 1: Select post type
↑ Back to topTo import WooCommerce coupons:
- Navigate through the menu: WooCommerce > Import Export Suite and click on the tab Import.
- As a first step, you need to choose the post type as Coupon.
Step 2: Select import method
↑ Back to topChoose from the options below to continue with your import:
- Quick Import
- Based on a pre-saved template
- Advanced Import
Let us have a look at each of these import methods:
Quick Import
- imports the basic/standard fields of the respective post type.
- Primarily used when your input file was exported using the same plugin
- One can import files from:
- Local
- URL
- FTP
- Click the Import button to complete the action or proceed to Step 3 for advanced options.
Pre-saved template
- 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 dropdown.
Note: The template will be listed in the dropdown 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.
- Click the Import button to complete the action or proceed to Step 3 to map the import columns.
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 topHere, 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 last saved choices can be viewed when choosing a pre-saved template.
- Additional meta
- 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 computes 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 dropdown 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 topOn reaching Step 4, the following window will appear, from where one can:
- 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.
- Match coupons by their: The coupons are matched either based on their ID or Coupon Code.
- If the coupon exists in the store: One can either Skip or Update the entry.
- Update even if 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: Choose ‘Yes’ to remove the coupons from the store which are not present in the input file.
- Use product SKU for coupon restriction settings: Link the products by their product IDs under coupon restrictions for the imported coupons.
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 coupons directly into your store or schedule the import using FTP.
To schedule the import:
- Hit the Schedule option, and you will be taken to the cron schedule window as shown below:
The plugin supports two different schedule types:
- 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.
- 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.
Also, the import/export can be scheduled on a daily, weekly, monthly, or custom basis. The time at which the import has to be scheduled can also be configured.
To directly import:
- 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 coupons
To export WooCommerce coupons:
- Navigate through the menu: WooCommerce > Import Export Suite and click on the tab: Export.
Step 1: Select a post type
↑ Back to topAs a first step, you need to choose the post type as Coupon.
Step 2: Select an export method
↑ Back to topChoose from the below options to continue with your export:
- Quick export
- Based on a 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 Additional 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
- 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 dropdown.
Note: The template will be listed in the dropdown 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 dropdown.
- Click the Export button to complete the action or proceed to Step 3 to filter data.
Advanced Export
This option will take 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.
Step 3: Filter data
↑ Back to topClick on Step 3, to view the following window where one can filter data on the basis of:
- Total number of coupons to export: The actual number of coupons you want to export. e.g. Entering 500 with a skip count of 10 will export users from 11th to 510th position.
- Skip first n users: Specify the number of users to be skipped from the beginning. e.g. Enter 10 to skip first 10 users from export.
- Coupon Statuses: Export coupons with respect to their status.
- Coupon Type: Select the coupon type for export.
- Coupon amount: From: Specify the minimum discount amount for which the coupon was levied.
- Coupon amount: To: Specify the maximum discount amount for which the coupon was levied.
- Coupon Expiry Date: From: Specify the date from which the coupon will expire.
- Coupon Expiry Date: To: Specify the date till which the coupons will remain invalid.
- Sort columns: Sort the columns to get an exported file in a specified order.
- Sort By: Select the order in which you want the sorted columns to appear.
- Click on Step 4 to proceed further.
Step 4: Map and reorder export columns
↑ Back to topThe 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. One can also move the columns to reorder the arrangement.
Here, one can map and reorder the export columns under the following 3 fields:
- Default fields
- Additional Meta
- Hidden meta
- Click on Step 5 to proceed.
Step 5: Advanced Options/Batch Export/Scheduling
↑ Back to topOn reaching Step 5, the following window will appear, from where one can:
- Export File Name: Specify a filename for the export file
- Export File Format: Both CSV and XML file formats are available.
- 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.
On expanding Advanced options, one can:
- Convert shortcodes to HTML
- Export in batches of
- Save the template file for future export (if needed).
- Click on Export to finish