> For the complete documentation index, see [llms.txt](https://docs.erpbridge.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.erpbridge.io/the-operation/3-decision-rules.md).

# 3 - Decision Rules

In this step you can program the logic behind the decisions made for each record.\
The system is basically a list of if-then conditions based of how many records or object are found in the destination data after searching for a specific property/column.

{% hint style="info" %}
Let's explore a simple example with just 1 decision rule: [**CLICK HERE!**](/the-operation/3-decision-rules/example-with-1-decision-rule.md)
{% endhint %}

When there are more than one decisions, it's important to set the right "**Decision Algorithm**", this setting let you choose from 2 options:

### Decision Algorithm

* **Funnel**: the decision rule will filter the results already filtered from the decision rule before.
* **Isolate**: the decision rule will always filter the results from the total, discarding every prior filter and evaluating every rule as separated/isolated.

{% hint style="info" %}
Let's explore a simple example with just 2 decision rules and the decision algorithm set on "Funnel": [**CLICK HERE!**](/the-operation/3-decision-rules/example-with-2-decision-rules.md)**Let's do another example**:
{% endhint %}

### The difference between NEXT and STOP

When you have just one decision rule, there is no difference between one and other.

When you have more than one decision rule, the NEXT rule will skip the current decision rule and bring the software to the next decision, so if we say that we are on the first rule of three, the NEXT rule will skip the current decision and jump to the second rule. With the STOP rule the software will skip all the rules for the current record and will go to the next record starting again from the first rule.

{% embed url="<https://www.youtube.com/watch?v=S6QBV1eVon4&t=350s>" %}
Decision Rules
{% endembed %}


---

# 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, and the optional `goal` query parameter:

```
GET https://docs.erpbridge.io/the-operation/3-decision-rules.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
