# 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="https://3731721370-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LZdVZovthV0SPlgxS6Y%2Fuploads%2Fn5aR9k0R264tXBr9GgLm%2Fdiscount-settings.png?alt=media&#x26;token=499d40ad-b607-494f-a8f8-ebfbdb1e41e7" 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="https://3731721370-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LZdVZovthV0SPlgxS6Y%2Fuploads%2FJU2zhDszO3KfriAUQ32I%2Fdiscount-settigns-selected-collections.png?alt=media&#x26;token=de0a3765-a8db-4bdd-8228-73232400e8a7" 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="https://3731721370-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LZdVZovthV0SPlgxS6Y%2Fuploads%2FxFTfBLxkK4dx4Uk45URM%2Fdiscount-settings-minimum-purchase-amount.png?alt=media&#x26;token=10f9c0bc-f118-41f7-ad71-2aa47467e77a" 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="https://3731721370-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LZdVZovthV0SPlgxS6Y%2Fuploads%2F7NBgWmjpbFz1yyimkDrx%2Fpersonal-discount-shopify-app-settings-code-usage-limit.png?alt=media&#x26;token=543edf79-f53c-4515-abec-46a3bd950658" 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="https://3731721370-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LZdVZovthV0SPlgxS6Y%2Fuploads%2Fkq7UPJjhlwyGiFzpR5GP%2Fdiscount-options-no-expiration-date.png?alt=media&#x26;token=8da62dd1-41f5-460f-80da-0f3a2612b373" 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="https://3731721370-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LZdVZovthV0SPlgxS6Y%2Fuploads%2FApBJC2tdY6o3MzS4ol1K%2Fdiscount-options-relative-expiration-date.png?alt=media&#x26;token=e73105f4-aeb4-41ab-b3df-4adf01dc0b37" 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.
