---
title: "Give a discount code for answering"
description: "Give everyone who finishes a survey their own Shopify discount code, shown on the thank-you screen and optionally emailed."
---

> Documentation Index
> Fetch the complete documentation index at: https://docs.userloop.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Give a discount code for answering

Thank customers for answering with a discount code. Everyone who finishes the survey gets their own code under a Shopify discount you choose, shown on the thank-you screen. The same person always gets the same code.

To send a gift card by email instead, see [Give a gift card for answering](https://docs.userloop.io/surveys/rewards/give-a-gift-card/). One survey can give both.

> **Unlimited plan**
>
> Discount codes come with Unlimited and Plus. On Free you can set one up, but publishing the survey with it on needs an upgrade.

## Before you start

- **Your Shopify store is connected.** Codes are made in your store. Check in **Settings → Store**.
- **The survey doesn't run on your website.** Website surveys can't show rewards yet, so the discount code isn't offered there.
- **An admin is at hand.** Only admins of your organisation can let UserLoop make discounts in Shopify, create a discount, and publish.

## Turn on the discount code

1. **Open the discount code**

   In the survey editor, open the **Questions** stage. Under **End of survey**, below your questions, select **Discount code**.
2. **Turn it on**

   Turn on **Give a discount code**.
3. **Let UserLoop make codes in Shopify**

   The first time, UserLoop asks Shopify for permission to create discount codes. Select **Continue to Shopify**, approve UserLoop in the Shopify window, then come back and select **Continue**. The switch turns on once Shopify allows it.
4. **Choose the store**

   If your organisation has more than one Shopify store, choose the one the codes come from under **Store**.

## Choose the Shopify discount

Codes take their value, minimum spend and end date from one Shopify discount. Choose one you already have, or create one here.

1. **Choose or create**

   Under **Shopify discount**, select **Choose a discount** to pick one of your store's code discounts, or **Create a discount** to make a new one.
2. **To choose one**

   In **Choose a Shopify discount**, search by title and select the discount.
3. **To create one**

   In **Create a Shopify discount**, set the **Discount** type (**Percentage**, **Amount off** or **Free shipping**) and its value, any **Minimum purchase**, what it **Combines with** and an optional **End date**. Leave **Each code works once** on, so a code shared online stops working after its first use. Then select **Create discount**.

   The discount is created in your store straight away, named after the survey. You can change it in Shopify later.

## Set the code and the message

1. **Add a prefix**

   Under **Code format**, type a **Prefix (optional)**, such as `THANKS`, so the codes are easy to spot in your orders. It can be up to 12 letters, numbers or dashes. **Example** shows what a code will look like.
2. **Write what it says**

   Under **What it says**, change the **Heading** and **Subheading** shown above the code on the thank-you screen.
3. **Email the code too**

   On an email survey, turn on **Email the code too**, then select **Design email** to write it. Customers who answer through their survey email can then receive the code by email too. Checkout surveys, store popups, theme blocks and link surveys show the code on the thank-you screen without emailing it.

## Publish it

1. **Save**

   Select **Save** in the top bar.
2. **Publish**

   Select **Publish**, or **Publish changes** if the survey is already live, then confirm in the dialog. Codes are handed out only once the survey is published with the discount code on.

## Check it worked

The discount's card under **Shopify discount** shows **Active**, with how many codes have been handed out (**Issued**). Answer the published survey yourself: the code shows on the thank-you screen.

On a store popup or theme block, only customers signed in to your store get a code.

| You see | What to do |
| --- | --- |
| **Rewards need the Unlimited plan** | Select **View plans** and upgrade, or turn the discount code off to publish without it. |
| **Shopify needs your permission** | Select **Authorise with Shopify** and approve UserLoop in Shopify. If you aren't an admin, ask one. |
| **No Shopify store is connected** | Select **Go to Store** and connect your store. |
| **Choose the Shopify discount** | Select **Choose a discount** or **Create a discount**. |
| **Checking the discount in Shopify…** | Wait a moment. UserLoop checks the discount before the survey can be published. |
| **The Shopify discount has ended** | Extend or reactivate it in Shopify, or select **Choose another discount**. |
| **The Shopify discount hasn't started yet** | Change its start date in Shopify, or select **Choose another discount**. |
| **The Shopify discount was deleted** | Select **Choose another discount**, or create a new one under **Change**. |
| **Codes can be shared** | The discount lets each code be used more than once, so a code posted online would keep working. In Shopify, limit it to one use per code. |
| **Shopify can't be reached for this store** | Select **Go to Store** and reconnect the store. |

## Related pages

- [Edit the thank-you screen](https://docs.userloop.io/surveys/build/edit-the-thank-you-screen/)
- [Connect or reconnect your Shopify store](https://docs.userloop.io/account/connect-your-shopify-store/)
- [Shopify permissions UserLoop asks for](https://docs.userloop.io/account/shopify-permissions/)
- [How publishing works](https://docs.userloop.io/surveys/get-started/how-publishing-works/)

Source: https://docs.userloop.io/surveys/rewards/give-a-discount-code/index.mdx
