How to add coupon code to Google Forms

"How to create coupon codes to an online website store"- Quora

This is a common question from small food businesses who sell online. For example, getting someone to try your food for the first time is the hard part, so you want to give them a code for money off. A Google Form can check a code with response validation, but it cannot take the money off the total, so you work out every discount by hand. With Neartail, you can add a question for the coupon code and write the discount as a formula. Your customers type the code and see the money come off the total before they submit. Even better, you can offer a percentage or a fixed amount off and the form will have your own branding instead of Google's, so new customers see your business and not a plain Google Form.

Let's start. Create your order form and follow the steps below.

How to configure valid coupon codes?

  • On the page that opens, click "Enter your form name". Type your form's name, click Generate and wait about a minute.
  • Check the outline it suggests and click Proceed.
  • Once you create the form, you will land on the form's "Edit" tab. If it asks "Do you want to preview this form?", click No.
The tabs Edit, Preview, Share and Orders, with Edit marked
  • Your form comes with products, an Order Amount question that adds up by itself and an Order Quantity question. Click on each product and check its name and price, because a generated product can have no name and a price of 0.
  • Click on the Order Quantity question, then click Add field in the toolbar on the right
The form in the editor, with the Add field icon marked in the toolbar on the right
  • New question will be displayed. Enter Apply Coupon as its title
  • Click on the ⚙️ icon at the bottom of the question and select the "Answer" tab
  • Click Configure under Validation. Select Regular expression > Matches and enter the coupon code in the pattern to be matched, such as WELCOME20. For more than one code, enter them like ^(WELCOME20|SAVE10)$. Enter the error message and click Save
The Apply Coupon question selected in the editor, with its title and the gear at the bottom of its card marked
When the user enters a coupon code not added in the form, it will display the error message as shown below.
The Bakery order form with WELCOME10 in Apply Coupon, which is marked, and the error Not a valid coupon code! below it

How to apply discounts based on coupon codes?

Add a Discount price field and then add the formula to calculate the discount. Please follow the instructions below.
  • Click on the Apply Coupon question, then click Add price field in the toolbar on the right
The form in the editor, with the Add price field icon marked in the toolbar on the right
  • Add price field screen will be displayed. Select Discount and click Next
The Add price field list, with Discount selected and Next marked
  • Check that Insert after says Apply Coupon. If it does not, click the pencil and select it or the field will land where you last clicked, which can be in the middle of your products
  • Select Percentage % and click Next
The Discount settings with Insert after Apply Coupon and Percentage % selected, marked with Next
  • Enter 20, check that Of says Order Amount and click Create
The Percentage box with 20, Of Order Amount and the Create button marked

Use IFS function to apply discounts based on coupon

IFS function evaluates multiple conditions and returns a value that corresponds to the first true condition. The syntax for the IFS function is:
IFS(condition1, value1, [condition2, value2, …])
where
  • condition1 - The first condition to be evaluated.
  • value1 - The returned value if condition1 is TRUE.
  • condition2, value2, … - Additional conditions and values if the first one is evaluated to be false.
If the coupon code is WELCOME20, we will apply a 20% discount by multiplying the order amount by 0.20. Otherwise, zero discount.
IFS(Apply Coupon == "WELCOME20", 0.20 * Order Amount, true, 0)
  • Field settings screen will be displayed. Select the "Answer" tab. The Calculate option already holds the Percentage formula, so replace it with the formula as shown below. Type @Apply to pick Apply Coupon and @Order Am to pick Order Amount, because with less than that a product can get picked instead. It shows as Order Amou.. in the box. Click Save
The Answer tab of the field settings with the IFS formula for WELCOME20 in the Calculate box, with the Answer tab and the box marked

Fixed amount discount

Instead of applying a percentage discount for the coupon code, you can offer a fixed dollar amount discount. Let's say you want to offer a $5 discount for WELCOME20 coupon code. So, if the coupon code entered by the user is WELCOME20, the discount will simply be 5. Write this in the Calculate option in place of the other formula.
IFS(Apply Coupon == "WELCOME20", 5, true, 0)

How to show the amount to be paid?

Add a Net Amount price field. It takes the Discount off by itself. Without it, the discount is not taken off what your customers pay.
  • Click on the Discount question, then click Add price field. Select Net Amount and click Next
The Add price field list, with Net Amount selected and Next marked
  • Check that Insert after says Discount. Select Standard calculation using NETTOTAL() and click Next
The Net Amount settings with Insert after Discount and Standard calculation using NETTOTAL() selected, marked with Next
  • Click Create
  • Field settings screen will be displayed. Click Save
The Standard calculation box with NETTOTAL() and the Create button marked
When a customer types WELCOME20, the Discount and the Net Amount change right away. Without the code, the Discount stays at 0. Your customers pay the Net Amount.
The Bakery order form with two cupcakes ordered, an Order Amount of $25.00, WELCOME20 in Apply Coupon, a Discount of $5.00 and a Net Amount of $20.00

Summary

If you want new customers to try your food for less, a Google Form can check a code but cannot take the money off the total. With Neartail, you write the discount in a formula and the right code takes the money off before customers submit. Create your order form and complete the steps above. If you have any questions, write to support.

Last updated: