# My Shopify customer's discount code was applied, but it shouldn't

#### The discount could have been created with previous settings that didn’t include current restrictions

If the discount was generated before the restrictions were changed in your automation, it won't be affected by the changes. This can happen during the automation when you add the **Minimum purchase amount**, for example, or **restrict the discount to the customer who has placed the order**.

<figure><img src="/files/XiXEHAdlTmBT3fQ9Swaf" alt=""><figcaption></figcaption></figure>

The settings of a particular discount code can check in the section **Discounts** from the **Shopify admin panel**.

<figure><img src="/files/PxBwYIvycpec19DZ5kV8" alt=""><figcaption></figcaption></figure>

If you need to change the details of a particular discount code, just click it and modify desired parameters.

<figure><img src="/files/JJfBMJWpVO0nXzqAFvcZ" alt=""><figcaption></figcaption></figure>


---

# 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/troubleshooting/my-shopify-customers-discount-code-was-applied-but-it-shouldnt.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.
