> For the complete documentation index, see [llms.txt](https://help.dollarlabs.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.dollarlabs.io/dollarlabs-ultimate-discounts/unified-discount-engine-v2/rules.md).

# Rules

In the rules section - you can set up conditions that determine when the discount should be applied to the group specified in the target section of the discount config.&#x20;

<figure><img src="/files/9Eas8LN4vGPVcXAI55nA" alt=""><figcaption></figcaption></figure>

All the groups you've created in the groups section are available to select in this section, with the following variables present for each, on which you can set your conditions.&#x20;

{% hint style="info" %}
You can use the following conditions for all of the properties listed below

1. Equal to&#x20;
2. Less than
3. Greater than

\
And the \`Divisble by\` condition is also available for any property who's name ends with "count".&#x20;
{% endhint %}

* Total cart amount → Cart amount for the group, inclusive of discounts
* Subtotal cart amount → Cart amount for the group, exclusive of discounts
* Line count → Count of line items&#x20;
* Quantity sum → Total sum of quantity of items matching cart group rules.
* Unique product count → Unique products in the user's cart matching the group rules.&#x20;
* Unique variant count → Unique variants in the user's cart matching the group rules.&#x20;


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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/unified-discount-engine-v2/rules.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.
