--- title: "Setting Up Code Entry Earning Rules on Shopify" slug: "setting-up-code-entry-earning-rules-on-shopify" tags: ["Loyalty and Referrals", "Earning Rules", "Shopify", "Shopify Plus"] updated: 2025-02-25T16:21:11Z published: 2025-02-25T16:21:11Z canonical: "support.yotpo.com/setting-up-code-entry-earning-rules-on-shopify" --- > ## Documentation Index > Fetch the complete documentation index at: https://support.yotpo.com/llms.txt > Use this file to discover all available pages before exploring further. # Setting Up Code Entry Earning Rules on Shopify Products Loyalty & Referrals ###### Supported plans Premium, Enterprise ###### eCommerce Platform Shopify, Shopify Plus ## Goals and Outcomes The Code Entry [earning rule](https://support.yotpo.com/docs/campaigns-overview) is an advanced feature that allows you to reward customers for entering a code. This rule is ideal for promoting marketing events, driving online engagement, and incentivizing offline purchases. You can use the Code Entry earning rule to: - Reward customers who make purchases in your physical store or through affiliates, thus encouraging them to engage with your rewards program. - Offer incentives for participating in marketing events, promotions, or in-store activities. - Add unique codes to physical products, creating a fun and interactive way for customers to earn rewards. Implementing this rule can help you: - **Increase online traffic & SEO** – By using redeemable codes, you encourage customers to visit your store online, boosting engagement and visibility. - **Strengthen customer participation** – Incentivizing code entries encourages customers to interact with and stay engaged in your loyalty program. In this article, you’ll learn how to create and configure Code Entry earning rules on Shopify. > [!NOTE] > Is this article for me? > > If you’re not using Shopify or Shopify Plus, follow this [Code Entry earning rule guide](https://support.yotpo.com/docs/code-entry-earning-rule) for other e-commerce platforms. ## Creating a Code Entry Earning Rule ![](https://cdn.document360.io/f3c2ab59-fe4c-4f93-9614-2872f40e8aa7/Images/Documentation/create-code-entry-earning-rule.png?sv=2026-02-06&spr=https&st=2026-11-08T13%3A30%3A01Z&se=2026-11-08T14%3A30%3A01Z&sr=c&sp=r&sig=ht6TPBoCRirJ4PxxUzlJ5pSp6GjROUwsNkht9KqUQcA%3D) To create a Code Entry earning rule on Shopify and Shopify Plus, follow these steps: 1. From your Yotpo admin, go to **Manage Program** > **Rewards Program**. 2. Under **Ways to earn**, click **Create earning rule**. 3. Go to the **Advanced** section and select **Code Entry**. 4. Click **Next**. ## Configuring a Code Entry Earning Rule ![](https://cdn.document360.io/f3c2ab59-fe4c-4f93-9614-2872f40e8aa7/Images/Documentation/code-entry-configuration.png?sv=2026-02-06&spr=https&st=2026-11-08T13%3A30%3A01Z&se=2026-11-08T14%3A30%3A01Z&sr=c&sp=r&sig=ht6TPBoCRirJ4PxxUzlJ5pSp6GjROUwsNkht9KqUQcA%3D) ### General Settings #### Earning rule name By default, the rule is named Code Entry. If you want to change it, click the pencil icon and enter a suitable name. #### Reward type Choose the type of reward your customers will receive. You can choose to reward them either with loyalty points or a discount coupon for completing the earning rule: - **Points** – Enter a positive, whole number representing the points customers will earn. - **Discount** – Choose between a fixed amount or percentage discount and add a code prefix. If you want to add discount limitations (e.g., expiration period, minimum spend, or applicable products), open the **Discount settings** modal. ![](https://cdn.document360.io/f3c2ab59-fe4c-4f93-9614-2872f40e8aa7/Images/Documentation/discount-settings.png?sv=2026-02-06&spr=https&st=2026-11-08T13%3A30%3A01Z&se=2026-11-08T14%3A30%3A01Z&sr=c&sp=r&sig=ht6TPBoCRirJ4PxxUzlJ5pSp6GjROUwsNkht9KqUQcA%3D) #### Rewards history text - **Action text** – Describes the action the customer completed to earn the reward. This will also appear in the Rewards History. - **Reward text** – It appears only when the reward type is set to Discount. This text explains what reward the customer will receive for participating in the rule. ### Advanced Settings ![](https://cdn.document360.io/f3c2ab59-fe4c-4f93-9614-2872f40e8aa7/Images/Documentation/code-entry-advanced-settings.png?sv=2026-02-06&spr=https&st=2026-11-08T13%3A30%3A01Z&se=2026-11-08T14%3A30%3A01Z&sr=c&sp=r&sig=ht6TPBoCRirJ4PxxUzlJ5pSp6GjROUwsNkht9KqUQcA%3D) - **Target audience** - From the **Apply this rule to** dropdown, choose which customers the rule will apply to. - Optionally, you can also select customer segments that will be excluded from the rule from the **Do not apply this rule to** dropdown. - **Minimum times completed** – The minimum number of times a customer must perform this action to earn a reward. - If you select a number higher than 1, you can set a waiting period between each action. For example, if you select 2 weeks, the customer will have to wait that long before they can do the action again. - **Maximum times completed** – The maximum number of times each customer can participate in the earning rule. - If you select a number higher than 1, you can set a waiting period between rewards, meaning the customer will have to wait this long (e.g. 1 month) to be able to complete the rule again and earn another reward. If they attempt to complete the rule during the waiting period, they won’t receive a reward. - **Schedule rule** – configure how long the rule will run for. It can be an ongoing campaign or a limited-time promotion. ## Adding Codes to Your Code Entry Earning Rule For customers to redeem their rewards, you must upload a list of valid codes. > [!WARNING] > Notes > > - There is **no limit** to the number of codes you can upload. > - We recommend uploading in **batches of 1,000** per file. > - Large uploads may take time (max **10,000 codes** at a time). To upload a list with the available codes for this rule, follow these steps: 1. Go to the Earning Rules page: **Rewards Program > Ways to earn > Manage earning rules**. 2. Click the **three-dot menu** next to the code entry rule and select **Add codes**. 3. In the modal, **upload a CSV file** or enter the codes as **free text** separated by a comma or a new line. ![](https://cdn.document360.io/f3c2ab59-fe4c-4f93-9614-2872f40e8aa7/Images/Documentation/code-entry-rule-add-codes.png?sv=2026-02-06&spr=https&st=2026-11-08T13%3A30%3A01Z&se=2026-11-08T14%3A30%3A01Z&sr=c&sp=r&sig=ht6TPBoCRirJ4PxxUzlJ5pSp6GjROUwsNkht9KqUQcA%3D) 4. Click **Add codes** to compete the upload. ![](https://cdn.document360.io/f3c2ab59-fe4c-4f93-9614-2872f40e8aa7/Images/Documentation/upload-codes-CSV.png?sv=2026-02-06&spr=https&st=2026-11-08T13%3A30%3A01Z&se=2026-11-08T14%3A30%3A01Z&sr=c&sp=r&sig=ht6TPBoCRirJ4PxxUzlJ5pSp6GjROUwsNkht9KqUQcA%3D) You can check the number of remaining valid codes from the **Earning Rules** table. ![](https://cdn.document360.io/f3c2ab59-fe4c-4f93-9614-2872f40e8aa7/Images/Documentation/remaining-codes.png?sv=2026-02-06&spr=https&st=2026-11-08T13%3A30%3A01Z&se=2026-11-08T14%3A30%3A01Z&sr=c&sp=r&sig=ht6TPBoCRirJ4PxxUzlJ5pSp6GjROUwsNkht9KqUQcA%3D) > [!WARNING] > Note > > Make sure to upload your codes before distributing them. Otherwise, customers may receive an "Invalid Code" error upon redemption. ## What’s Next ### Add the Rule to Your Rewards Page After setting up your Code Entry earning rule and adding codes, make sure it’s [available on your Rewards page](https://support.yotpo.com/docs/creating-a-rewards-page): 1. Go to your **Rewards page** and click **Edit**. 2. Click **Earning Points > Layout.** 3. From the dropdown, **add the Code Entry earning rule** and customize the tile to your preference. 4. **Save & Publish** the changes. ![](https://cdn.document360.io/f3c2ab59-fe4c-4f93-9614-2872f40e8aa7/Images/Documentation/rewards-page-code-entry.png?sv=2026-02-06&spr=https&st=2026-11-08T13%3A30%3A01Z&se=2026-11-08T14%3A30%3A01Z&sr=c&sp=r&sig=ht6TPBoCRirJ4PxxUzlJ5pSp6GjROUwsNkht9KqUQcA%3D) ### How Customers Redeem Code Entry Rewards Customers can redeem rewards by entering their discount code on your store’s Rewards page after logging into their account. **Redemption process:** 1. Customers visit your **Rewards page** and log in to their account. 2. They enter a **valid code** in the provided field. ![](https://cdn.document360.io/f3c2ab59-fe4c-4f93-9614-2872f40e8aa7/Images/Documentation/enter-code-here.png?sv=2026-02-06&spr=https&st=2026-11-08T13%3A30%3A01Z&se=2026-11-08T14%3A30%3A01Z&sr=c&sp=r&sig=ht6TPBoCRirJ4PxxUzlJ5pSp6GjROUwsNkht9KqUQcA%3D) 3. Based on the reward type: ![](https://cdn.document360.io/f3c2ab59-fe4c-4f93-9614-2872f40e8aa7/Images/Documentation/successful-code-entry.png?sv=2026-02-06&spr=https&st=2026-11-08T13%3A30%3A01Z&se=2026-11-08T14%3A30%3A01Z&sr=c&sp=r&sig=ht6TPBoCRirJ4PxxUzlJ5pSp6GjROUwsNkht9KqUQcA%3D) 1. **Points-based reward** – Their points balance will update automatically. 2. **Discount-based reward** – They can copy the discount code from their Rewards history and apply it at checkout.