# Operator Precedence

When you add multiple Conditions to your Automation Rules using “And” and “Or”, the order in which you define the condition and the Operator determines how the final result is evaluated. Following rules are applied during evaluation :

1. AND has the higher precedence compared to OR meaning AND conditions are always evaluated first
2. For multiple AND conditions, the evaluation is done from the LEFT moving towards the RIGHT
3. For multiple OR conditions, the evaluation is done from the LEFT moving towards the RIGHT

Below is an example which demonstrates this. It is a single rule but it evaluates to different result based on the field values

The rule involves 2 fields where the field “Impact” should be equal to “High” and the field “Priority” should be either “Blocker” or “Critical”

**Scenario 1** :During the evaluation of “Impact = Low” and “Priority = Blocker”, it evaluates to FALSE as below :

**Scenario 2**: During the evaluation of “Impact = Low” and “Priority = Critical”, it evaluates to TRUE as below, **although you may assume it to evaluate to FALSE because Impact is not High**:<br>

**Conclusion:** In such cases, it is always best to split the rule into 2 separate rules.


---

# 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.workdigital.io/custom-database-apps/automation-rules/operator-precedence.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.
