# Configure discount

The discount settings consist of similar sections to those when you are creating a discount in the Shopify admin panel. In the app you can specify

* Discount code pattern&#x20;
* Options (discount type and value)
* Applies to
* Minimum requirement
* Usage limit
* Expiration date

<figure><img src="/files/FZVjAjVdK4S7N9dGHTLZ" alt="&#x22;Applies to&#x22; section Personal Discount automation settings"><figcaption><p>Personal Discount automation settings</p></figcaption></figure>

### Discount code pattern <a href="#discount-code-pattern" id="discount-code-pattern"></a>

Instead of a fixed code you can compose a pattern to create unique discount codes. A pattern consists of placeholders and fixed characters. Placeholders will be replaced with random characters according to given symbol. You can choose from following symbols:

* **A** - uppercase letters
* **a** - lowercase letters
* **9** - digits
* **X** - uppercase letters and digits
* **x** - lowercase letters and digits
* **#** - uppercase and lowercase letters and digits

Anything else is a fixed character. Fixed characters will stay the same in a generated code as they are in the pattern. If you want to specify a fixed character that is a placeholder symbol you can quote it with single quotes to prevent replacing with random value.

Example patterns:

| PATTERN      | SAMPLE CODES                          |
| ------------ | ------------------------------------- |
| ######       | FdVh8i, pw3gVp, S7MEaD                |
| AAAA-9999    | CDQY-8621, EMPO-8520, QDST-5291       |
| XXX-XXX-XXX  | 7FK-085-4W0, GT4-W6X-UT5, RNQ-A58-XQ6 |
| HELLO-XXXXX  | HELLO-ADA7W, HELLO-VRPZV, HELLO-Y8GSP |
| 'CART'-XXXXX | CART-5VHXN, CART-NAYTM, CART-YO52A    |

### Discount type <a href="#discount-type" id="discount-type"></a>

There are 3 discount types:

* Percentage discount
* Fixed amount
* Free shipping

### Applies to <a href="#applies-to" id="applies-to"></a>

Select what the discount will apply to: **Entire order**, **Selected collections** or **Selected products**.

<figure><img src="/files/AQpwePFSn7dbrSy2pmbg" alt="The section apply to of Personal Discount automation"><figcaption><p><em>Applies to</em> section</p></figcaption></figure>

### Minimum requirement <a href="#minimum-requirement" id="minimum-requirement"></a>

Select **Minimum purchase amount** if you want the customers to spend a minimum amount to qualify for the discount.

<figure><img src="/files/IzV0XUgYnWpKPIUnNaeg" alt="Personal Discount settings Minimum requirements section"><figcaption><p><em>Minimum requirement</em> section</p></figcaption></figure>

### Usage limit <a href="#usage-limit" id="usage-limit"></a>

Define how many times a customer can redeem the discount code.

<figure><img src="/files/CZOzOAe73LdKahvD8eNP" alt="The section usage limit of discount code Personal Discount automation"><figcaption><p><em>Usage limit</em> section</p></figcaption></figure>

### Expiration date <a href="#expiration-date" id="expiration-date"></a>

Discount codes may be not limited in time or they may expire certain number of days after creation.

Select Expires: Never to make the discount codes not limited in time.

<figure><img src="/files/R5bKyMWKeSBdDLsVlWBq" alt="Set that discount code never expires - Personal Discount app for Shopify"><figcaption><p><em>Expiration date</em> section (never)</p></figcaption></figure>

Select Expires: After to make the discount code expired specified number of days after creation.

<figure><img src="/files/N1OU2V0Jcvzen5thMGCo" alt="Set after how many days a code expires - Personal Discount app for Shopify"><figcaption><p><em>Expiration date</em> section (after how many days)</p></figcaption></figure>

**Notice!** The consequence of having relative expiration date is that the generated codes can no longer be grouped. They will appear separately in the Discounts list in your Shopify admin panel.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.personaldiscount.io/personal-discount-for-shopify/configure-discount.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
