# Single discount code to apply different discount amounts for different product categories

{% embed url="<https://cln.sh/hk601GBw>" %}

Let's take the following use case as an example, we are running a storewide sale and want to offer different discount offers for different product categories using a single coupon / automatic discount.

We can take an example to illustrate this logic better

1. If the product is part of Category A → It gets a 10% discount
2. If the product is part of Category B → It gets a 20% discount.

You can configure this by creating a product discount on the app with the following configuration to achieve this setup. I've set this up for individual product IDs, but you can set this up using any product identifier (variable) of your choice (e.g. Collection, Product tag)

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

{% hint style="info" %}
Please configure the Discount application strategy to use the \`ALL\` option so that it applies all applicable discounts to the eligable items in the users cart.<br>
{% endhint %}

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

Here's a screengrab of how that config would look like on an actual cart :)

<figure><img src="/files/FZYo5ntg2HXZx6dF0Zt6" 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://help.dollarlabs.io/dollarlabs-ultimate-discounts/discount-engine-v1/examples-v1/product-discount-examples-v1/single-discount-code-to-apply-different-discount-amounts-for-different-product-categories.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.
