Q:

Is there a way to upload multiple discount counts into CiviDiscount?

We are getting ready to do a Groupon promotion that will discount memberships. Groupon has generated individual "voucher codes" for each person who purchases. I need to enter each of these voucher codes as a single-use discount code. I'd like to be able to enter up to 200 codes at once, all with the same usage limits and rules, but so far, I can't figure out how to do this except to enter each code manually and set all the rules each time. When I try to just copy one code to avoid having to set all the rules each time, the copy shows a randomly-generated code that can't be edited. Has anyone figured this out?

A:

I upvoted Zachary's answer, but I felt conflicted.  I do NOT recommend importing directly to MySQL, because you end up bypassing validation logic and could create corrupt discounts.  However, their suggestion of the API CSV Import GUI is a good one, and the one I'd recommend.
If you're not sure what the values should be for your various columns, go to Support menu » Developer » API Explorer.  Set your entity to DiscountCode and action to Get and press Execute.  You'll get something much like you're seeing below.  In the "Results" screen you can see the values, which you can copy/paste.  If you already had discount codes, you may need to scroll down to find one that matches the ones you want to enter.  You can click "Add Option" to set Limit to 0 if you can't see the full list.

