---
description: >-
  To make the app working on the newly received orders you need to create a
  rules engine for it
---

# Rules Engine Configuration

**Open the Rules Engine section in your Linnworks account**

<figure><img src="https://3941504653-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FBJUa4OLV6EVDxwc4IcZ7%2Fuploads%2FynkPWnL9yp70j93MVX1i%2FRules%20engine.png?alt=media&#x26;token=6b29711d-1a6b-43a2-b154-a94703bdc971" alt=""><figcaption><p>Click on Rules engine to start configuring it</p></figcaption></figure>

**Add a new rule on your account for the Allocator**

<figure><img src="https://3941504653-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FBJUa4OLV6EVDxwc4IcZ7%2Fuploads%2FqTrdrdIQo84Y9XHB628a%2FAdd%20New%20Rule.png?alt=media&#x26;token=4f54c98c-d61d-4b51-8278-ee9e3b1250d4" alt=""><figcaption><p>Click on Add new rule button</p></figcaption></figure>

**On the opened screen add the conditions for the orders you would like to be moved to the predefined in the app config locations** &#x20;

<figure><img src="https://3941504653-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FBJUa4OLV6EVDxwc4IcZ7%2Fuploads%2FbI1u6s1DUKnKJddgScb6%2Fcondition.png?alt=media&#x26;token=f9ddefeb-34ac-4686-b9fa-fc19ecf44dd0" alt=""><figcaption><p>Add a condition name and the conditions you prefer. Click on Save condition button</p></figcaption></figure>

{% hint style="info" %}
In case you would like all the orders to be considered by the app, leave the condition empty or add some general one that is true for all the orders.
{% endhint %}

{% hint style="info" %}
You can create multiple app configurations and use them on different orders based on the conditions predefined in the rules engines.
{% endhint %}

**After the condition is predefined, add an action for the rules engine. You need:**

* **to add a friendly action name**
* **to select Action type - Execute a macro**
* **to select Action value - the name of** [**the configuration created for a macro**](macro-configuration)

<figure><img src="https://3941504653-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FBJUa4OLV6EVDxwc4IcZ7%2Fuploads%2FdM8xzIaZvVBrbPyVUbV9%2Faction.png?alt=media&#x26;token=53327b71-659d-477c-8c58-5e7a331f21bb" alt=""><figcaption><p>Configure the action for rules engine and save it</p></figcaption></figure>

**After you save the Rules engine config, you will be redirected to the list of your rules engines. Make sure you enabled the rules engine**

<figure><img src="https://3941504653-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FBJUa4OLV6EVDxwc4IcZ7%2Fuploads%2FgbhpH1UM5t185RtshhNQ%2Frules%20Engine%20enabled.png?alt=media&#x26;token=5d00a190-9fa9-491c-a8d5-2c820d505a19" alt=""><figcaption><p>Enable the rules engine</p></figcaption></figure>

### The application is ready for use. The rules engine will be triggered when the order appears in Linnworks and will move the order to the location with the available stock or will split it between the location with the stock available if this is configured in the app.

