# Limitations of Discount engine (v1)

### **Order of Logic (AND/OR)**:

The style of logical modelling supported by the Rule builder is formally defined as  CNF (Conjunctive Normal Form) notation.&#x20;

1. **Limitation**: The rule builder only supports `OR` logic horizontally within the same group and `AND` logic vertically between different condition groups. This means you cannot mix `AND` and `OR` logic vertically.
   1. **Example of Supported Config**:\
      Rule 1 OR Rule  \
      AND\
      Rule 3 OR Rule 4 OR Rule 5\
      AND\
      Rule 6
   2. **Example of Unsupported Config**:\
      Rule 1 AND Rule 2\
      OR\
      Rule 3 AND Rule 4 OR Rule 5\
      AND\
      Rule 6
2. **Solution**: Simplify your expressions by restructuring the rules to fit the supported configuration. If you have a complex condition that mixes AND and OR logic, try to break it down into simpler, nested rule groups that align with the AND/OR structure. \
   \
   This might involve creating additional rules that capture intermediate conditions, or rethinking how you combine rules to achieve the desired outcome.

If you need to express logic that is not using the CNF notation, you can easily convert your logic using a online tool like [dcode.br](https://www.dcode.fr/boolean-expressions-calculator) to convert from any unsupported notation to the standard form ([reference](https://shottr.cc/s/1BGY/SCR-20240719-5x7.png)). If this does not address your problem, feel free to reach out to us with your custom need!

{% hint style="info" %}
We have also released the ability to invert and / or logic ([invert-logical-operation](https://help.dollarlabs.io/dollarlabs-ultimate-discounts/discount-engine-v1/flags/invert-logical-operation "mention")) for higher flexibility when designing your programmes.
{% endhint %}

***


---

# 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/limitations-of-discount-engine-v1.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.
