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

# Business Rules

Business rules are typically used by rule handlers such as [Drools](/configuration/business-rules/drools-rules.md).

## Rule Domains

![Rule Domain UI](/files/v7r7RQN1SDXR6Pm1est5)

Opening the **Rule Domain** screen from **Configuration** app menu or navigation bar, you will come across a specialized editor, allowing design of new rule domains.

Rules are grouped under "Rule Domains", which specify a set of rules which are evaluated together (such as discounts for a product or promotions for a basket). Rule domains share the following attributes:

* **Name:** Descriptive name of the rule domain
* **Description:** Detailed description of the rule domain
* **Platform:** Target execution platform for the rules in a domain
* **Command:** Complete command, representing rule domain functions and all the rules in a domain
* **Functions:** List of functions and their definitions which can be used across all rules in a domain
* **Parameters:** Additional platform specific parameters

## Rules

![Rule UI](/files/YcXjDlY00DCCD1oXhJaM)

Rules inside a domain have the following common attributes:

* **Name:** Descriptive name of the rule
* **Description:** Detailed description of the rule
* **Status:** Whether the rule is currently applied or not
* **Condition:** Condition for qualifying for the rule
* **Actions:** List of actions to apply if the rule conditions are met
* **Command:** Full command body for the rule (to use instead of condition and actions)
* **Parameters:** Additional platform specific parameters


---

# 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.rierino.com/configuration/business-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.
