---
title: Codes, edit and delete
description: Give one discount many codes, generate random ones, change a discount, turn it off and on, and delete it.
---

## A discount's codes

One code discount can have many codes that all give the same discount, such as a code for each customer or for each influencer.

Open the discount (press its code on the **Discounts** list) and press **Manage codes**, under **Method**. The **Discount codes** page lists each code with how many times it was **Used** and when it was **Created**.

![The Discount codes page for WINTER10: one code, WINTER10, used 0 times, with the Generate codes and Add codes buttons](/screenshots/growth/08-codes.jpg)

### Add codes you choose

1. Press **Add codes**.
2. In **Codes**, type the codes, separated by commas (up to 1,000 at a time), such as `AYESHA10, BILAL10`.
3. The button counts them: press **Add 2**. The page says **2 codes added.**

![The Add codes window with AYESHA10, BILAL10 typed, and the Add 2 button](/screenshots/growth/09-add-codes.jpg)

### Generate random codes

1. Press **Generate codes**. The window says **Random codes of letters and numbers, each used like any other code of this discount.**
2. Fill in the boxes:

| Box | What to type | Example |
| --- | --- | --- |
| **Number of codes** | How many, up to 1,000 at a time | `5` |
| **Code length** | Characters after the prefix | `8` |
| **Prefix** | Optional, put in front of each code | `SOCK-` |

![The Generate codes window: Number of codes 5, Code length 8, Prefix SOCK-, and the Generate button](/screenshots/growth/10-generate-codes.jpg)

3. Press **Generate**. The page says **5 codes generated.** and lists them.

![The codes list with WINTER10, AYESHA10, BILAL10 and five SOCK- codes, and the message 5 codes generated.](/screenshots/growth/11-codes-generated.jpg)

### Delete codes

1. Tick the box in front of each code to delete, such as **BILAL10**. A **Delete** button appears above the list.
2. Press **Delete**. A window asks **Delete 1 code?** and says **Buyers can no longer use deleted codes. Orders keep the codes they used.**
3. Press **Delete**. The page says **1 code deleted.**

![The Delete 1 code? window with Cancel and Delete](/screenshots/growth/12-delete-code.jpg)

Press **Discount** at the top left to go back to the discount.

## Edit a discount

1. Open the discount from the **Discounts** list.
2. Change any box, such as the **Percentage** from `10` to `15`. The **Method** and the type can't be changed.
3. Press **Save** at the bottom. The **Summary** shows the new value, **15% off**.

![The WINTER10 discount after saving: the Summary says 15% off and 7 codes](/screenshots/growth/13-discount-edited.jpg)

## Turn a discount off and on

- Press **Deactivate** at the top right. The page says **Discount deactivated.**, the label turns grey **Expired** and its end date is set to now. Buyers can no longer use it.
- To turn it back on, press **Activate** (in the same place). The page says **Discount activated.** and the label is **Active** again.

![WINTER10 deactivated: the message Discount deactivated., the Activate button and the grey Expired label](/screenshots/growth/14-discount-deactivated.jpg)

## Delete a discount

1. Open the discount and press the red **Delete** at the top right.
2. A window asks **Delete Free delivery in Pakistan?** (the discount's name) and says **The discount and its codes are deleted and cannot be brought back. Orders keep the discounts they used.**
3. Press **Delete discount**. You are back on the **Discounts** list, and the discount is gone.

![The Delete Free delivery in Pakistan? window with Cancel and Delete discount](/screenshots/growth/34-delete-discount.jpg)

![The Discounts list after deleting: PKR 500 off orders over PKR 5,000 and WINTER10 are left](/screenshots/growth/35-discounts-after-delete.jpg)

## What's next

[The discounts list](/discounts-marketing-analytics-markets/the-discounts-list): find, filter and change many discounts at once.
