# 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 %}

***
