Partager via


How to Create a Coupon File to Import Coupon Data

For the latest version of Commerce Server 2007 Help, see the Microsoft Web site.

To generate coupons from a file, you must create the file that has the required information and import the file into Commerce Server.

To create a coupon file

  1. By using Notepad or another text editor, create a file with the following format.

    Note

    The first non-comment line of the file must be the header. At the start of the file, any lines starting with the number sign (#) are comments. Commerce Server ignores these lines. The next line is the header line. You must separate the column headers by using tabs. Finally, you list the coupon codes and target users, one per line. You must also separate these by using tabs.

    #This is a comment line.
    CouponCode         TargetUser
    <coupon code1>     user1@email.com
    <coupon code2>     user2@email.com
    <coupon code3>     user3@email.com
    <coupon code4>     user4@email.com
    <coupon code5>     user5@email.com
    

    In the format, <coupon code> is the individual code for the coupon, and user@email.com is the e-mail address or profile ID for the user.

    You can omit the fields based on the coupon type that you are importing, as listed in the following table.

    Coupon Definition Type

    Method

    CouponCode Field

    TargetUser Field

    Private

    Import coupons

    Required

    Optional

    Restricted

    Import coupons

    Required

    Required

    Restricted

    Generate coupons for user list

    Ignored

    Required

  2. Save the file.

    You can import this file and use it to add coupons to your discount. For more information about how to add coupons, see How to Create a Coupon Definition.

See Also

Other Resources

How to Add Existing Coupons to a Discount

How to Export Coupons

Searching the Business Management Applications

Deleting Information from the Business Management Applications

Refreshing the Business Management Application Cache