# Add codes to a Shopify coupon

> Ask Releva to create extra codes for a Shopify coupon in Data Platform › Dynamic Coupons, ahead of a send to more recipients than the pool holds.

Releva keeps about 1,000 unused codes ready for each Shopify coupon. When fewer than 500 are left it creates more, and at send time it tries for up to about 30 seconds to create codes that are missing. For a send to many more recipients than the pool holds, add codes in advance so that nobody is skipped.

## Before you start

* You know roughly how many recipients the campaign or workflow reaches.
* Your plan includes updating coupons. If **Add Codes** shows a lock icon, ask your account owner to unlock it.

## Steps

1. Go to **Data Platform › Dynamic Coupons** and open the **Shopify Coupons** tab.

2. In the coupon’s row, open the menu on the right and select **Add Codes**.

3. In **Number of codes**, enter how many codes to create, from 1 to 10,000.

   The text under the field names the coupon the codes are added to. To add more than 10,000, repeat the steps once the first codes are created.

4. Select **Add Codes**.

## Check it worked

* The coupon’s **Status** reads **Generating**, and on its edit page you see **Generating N codes…**.
* **Available/Total** grows as Releva creates the codes in Shopify, in batches. When it is done the status is **Live** again.

## Troubleshooting

**Add Codes stays disabled.** The number is empty, not a whole number or outside 1 to 10,000.

**Status shows Error.** Hover over **Error** to read the reason. If the store integration must be re-authorized, follow [Re-authorize Releva in Shopify](https://releva.ai/documentation/guides/dynamic-coupons/re-authorize-releva-in-shopify/). Releva tries again every hour.

**A Low stock: N left badge shows next to the status.** For a Shopify coupon the badge does not count down: it appears when creating codes failed or when the pool is empty. Next to **Error** it can read **Low stock: 300 left** although codes are still available. Check the **Error** reason first, then add codes again. Right after you create a coupon, **Low stock: 0 left** next to **Generating** only means the first codes are not ready yet.

## Next steps

* [How dynamic coupons work](https://releva.ai/documentation/learn/dynamic-coupons/how-dynamic-coupons-work/): Find out what happens to recipients when a pool runs out at send time.
* [Change a Shopify coupon](https://releva.ai/documentation/guides/dynamic-coupons/change-a-shopify-coupon/): Change the discount or dates of the codes Releva creates.
* [Create Shopify coupons](https://releva.ai/documentation/guides/dynamic-coupons/create-shopify-coupons/): Set up another coupon with a different discount.