Support Center

Import Coupons via a CSV File

Follow

import_coupons.png

You can create or import a list of coupons via a single CSV (Comma-separated Values) file for your apps and mobile website.

 

Topics covered in this article:

  1. Create a Coupon CSV file
  2. Upload the CSV file

 

To create a mobile coupon in your Shopgate Admin manually, read Setting up coupons.

 

 

1. Create a Coupon CSV file

Creating a ".csv" file containing the details of your coupons is easy - just make sure to follow the file structures carefully. There are normally 2 ways to do so:

1. Export coupons as a ".csv" file

Many shopping cart systems provide this option.

Check and modify the file to meet the rules and structures explained below.

2. Create a ".csv" file manually

Use a spreadsheet program such as LibreOffice. Here is a sample file to help you get started.

Make sure to use semicolons (;) to separate the columns.

 

1.1 General Rules

There are a few general rules about the Coupon CSV file:

  • The file must be encoded in UTF-8
  • Each row can only contain data on one coupon
  • Rows should be separated with a line feed (\n) (UNIX text format)
  • Use double quotes (") to indicate column boundaries (Text delimiter)
  • All coupon codes must be unique
  • Save your file as in ".csv" format
  • Export your text file using the correct "Field delimiter" (comma, colons, semicolons, space, or tab)

 

1.2 Coupon CSV Structure

To make sure that your coupons can be imported correctly, follow the file structure as explained in the table. Here's a sample file for comparison.

  Column name Description Example
1 code Each coupon must have a unique code. Punctuations or symbols are not allowed - the only exception is the hyphen (-). ABC123
2 item_number An Item number is required for each coupon. You can use the default value "COUPON". COUPON
3 public_name This is the coupon name displayed at checkout and on the receipt. Coupon x
4 description Internal description or comments on the coupon. Comment
5 amount Value of the coupon 50,00
6 currency Currency code USD, EUR, GBP, CHF
7 discount_percent Percentage discount value (not applicable to shipping costs). No decimals. 10
8 is_free_shipping Enter 1 to offer free shipping when this coupon is used. 1 or 0
9 minimum_order_amount Minimum order value to use the coupon.
IMPORTANT: This value must be 0 or higher than the value of the coupon.
50,00
10 valid_from The coupon is valid from this date. Use format yyyy-mm-dd yyyy-mm-dd, e.g. 2012-01-24
11 valid_to The coupon is valid until this date. Use format yyyy-mm-dd yyyy-mm-dd, e.g. 2012-06-24
12 is_valid_iphone_app Enter 1 if you allow the coupon to be used in the iPhone app 1 or 0
13 is_valid_ipad_app Enter 1 if you allow the coupon to be used in the iPad app 1 or 0
14 is_valid_android_app Enter 1 if you allow the coupon to be used in the Android app 1 or 0
15 is_valid_wp_app Enter 1 if you allow the coupon to be used in the Windows app.
No longer in use. Enter either 1 or 0.
1 or 0
16 is_valid_webapp Valid in the mobile website 1 or 0
17 is_valid_marketplace Valid for the Shopgate Marketplace.
No longer in use. Enter either 1 or 0.
1 or 0
18 is_valid_standalone Valid in your iOS or Android app. 1 or 0
19 restricted_item_numbers Restrict your coupon only to the item number(s) listed here. Separate each item number with a "||". Leave empty to apply the coupon to all products. 987654||123456 or empty
20 excluded_item_numbers Exclude your coupon from the item number(s) listed here. Separate each item number with a "||". Leave empty to apply the coupon to all products. 123456red||123456blue or empty 
21 restricted_category_numbers Restrict your coupon only to the category number(s) listed here. Separate each category with a "||". Leave empty to apply the coupon to all products. 159||753 or empty
22 excluded_category_numbers Exclude your coupon from the category number(s) listed here. Separate each category with a "||". Leave empty to apply the coupon to all products. 159men||753men or empty
23 restricted_country_ids Restrict your coupon only to the country code(s) listed here.  Separate each country with a "||". Leave empty to apply the coupon to all countries. us||de||fr or empty
24 redeem_limit Set how you allow your customers to redeem the coupon: the coupon can be used only once (first come first serve), once per customers, or as many times as the customer wants. 'unlimited', 'once_per_user', 'once'
25 is_promote Specifies whether the coupon should be displayed in a public list. 
No longer in use. Enter either 1 or 0.
1 or 0
26 is_active Enter 1 to activate the coupon 1 or 0

 

 

2. Upload the CSV file

To upload the CSV file you created, log into your Shopgate Admin and find the Coupons page.

  1. Navigate to Marketing  Coupons.
  2. On the Coupons page, click the Import button to go to the Import page.
  3. Click "Select file" to upload the CSV file. Click Save.
  4. Now the coupons should appear in the coupons list. Check if the details are correct. To make any changes, simply update your CSV file and upload it again.

 

That's it! Your coupons have been successfully uploaded via the CSV file.

 

 

 

Comments