> 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 provide a standardized form of defining rule engine conditions and actions, which can easily be migrated between systems.

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

## Rule Domains

![Rule Domain UI](https://1659095931-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FcnDk3J1AzTgg2NFrGPlh%2Fuploads%2FeD37sDIcQRIz6zVUufev%2FUI_Rule_Domain.png?alt=media\&token=69ab6afb-53d1-4646-9ad3-acbaa32246d2)

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](https://1659095931-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FcnDk3J1AzTgg2NFrGPlh%2Fuploads%2FUuxQscagsFiqosAheQiM%2FUI_Rule.png?alt=media\&token=4b2bf727-fbfa-43bd-9236-e70d0722e03d)

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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.rierino.com/configuration/business-rules.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
