# Getting started

The Commerce Layer Rules Engine is a *Domain-Specific Language (DSL)* used for defining rules that can support from the simplest to the most complex logic. The [rules](https://docs.commercelayer.io/rules-engine/rules) can be evaluated against a specific payload to check if the requested [conditions](#conditions) are met so that the respective [actions](https://docs.commercelayer.io/rules-engine/actions) will be applied.

{% hint style="success" icon="robot" %}
Commerce Layer documentation is [LLM-ready](https://app.gitbook.com/s/XD42JVYENWrharWaLF3W/#llm-friendly)! To feed the knowledge base into your own LLM, read [this file](https://docs.commercelayer.io/llms.txt).
{% endhint %}

## Core API integration

The Rules Engine is currently [integrated](https://docs.commercelayer.io/rules-engine/core-api-integration) with Commerce Layer [Core API](https://app.gitbook.com/o/-Lfu_B3DKew-kvoEWzTk/s/-LgByaSP8eKjad-MIuHE/) to enable the creation and management of a super-flexible promotional system that covers a wide set of [use cases](https://docs.commercelayer.io/rules-engine/use-cases).

The Rules Engine integration is currently enabled for a subset of [resources](https://docs.commercelayer.io/rules-engine/resources): at the moment [promotions](#order-rules) and [price lists](#price-rules) are available (more to come).

{% hint style="success" %}
When defining fields and selectors for the [conditions](https://docs.commercelayer.io/rules-engine/conditions) and [actions](https://docs.commercelayer.io/rules-engine/actions) of a [rule](https://docs.commercelayer.io/rules-engine/rules), use the [dot notation](https://idratherbewriting.com/learnapidoc/docapis_diving_into_dot_notation.html) to navigate the relationship tree down to the desired attribute or related resource of Commerce Layer Core API. For more information explore the [data model](https://commercelayer.io/docs/data-model) and [API reference](https://app.gitbook.com/o/-Lfu_B3DKew-kvoEWzTk/s/RWJeylueWkzLadK710XZ/), or double-check the public [resources schema](https://core.commercelayer.io/api/public/resources.json).
{% endhint %}

{% hint style="info" %}
Most of the examples and JSON snippets used in the following sections to illustrate how the Rules Engine works refer to [order rules](https://docs.commercelayer.io/rules-engine/core-api-integration/order-rules). You can easily use them as a reference to create [price rules](https://docs.commercelayer.io/rules-engine/core-api-integration/price-rules) or other rules related to any possible future Rule Engine integrations.
{% endhint %}
