> 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.md).

# Unified Discount Engine (v2)

Discount engine (v2) is a huge improvement over our initial (v1) implementation, bringing in support for&#x20;

1. Cart groups&#x20;
2. Nested conditional logics
3. Derived variables from cart groups
4. Target cart groups
5. Quantity based discount limit&#x20;
6. Disbursing fixed amount across eligable line items
7. Custom discount presentation

Here's a quick and easy way to visualise how the new engine works, with the logic explained as simple flow charts

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

Here's also an example configuration for better understanding of the concept.

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

***

{% hint style="info" %}
Discount engine v2 is currently stable and will be available on all plans.
{% endhint %}

{% hint style="success" %}
You can also set up a single function to do more than just a single discount type by choosing the necessary discount classes in the function.
{% endhint %}

<figure><img src="/files/7znffF0Qtq5FnIgImfwM" alt=""><figcaption></figcaption></figure>
