Follow these steps to add a coupon code question and calculate the discount on your calculator:
 In order to create a coupon code you need to first add a "Text question" (
QA
) to your calculator.  Once you have set up your Text question, select the Formula you want to apply the discount too. If you haven't set up one, create a Formula and set up your pricing.

When you are in the Formula Edit screen, add a "Variable". Depending on the type of discount, you would add the following equation:
 5PERCENT:
IF(QX{text} = "5PERCENT", 0.95, 1)
 10USD:
IF(QX{text} = "10USD", 10, 0)
 5PERCENT:

Go back to your formula and change it to subtract the discount:
 5PERCENT: Multiply existing formula with VX (to adjust for discount)
 10USD: Subtract VX from the existing formula.