> For the complete documentation index, see [llms.txt](https://brainence.gitbook.io/tax-rate-app/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://brainence.gitbook.io/tax-rate-app/overview/rules-engine-configuration.md).

# Rules Engine Configuration

To make the app working on the newly received orders you need to create a rules engine for each macro

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

<figure><img src="https://1458658891-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6hYIUDbbkR19SjSREZ5n%2Fuploads%2FQtxumFCe8PobLldiEljb%2FRules%20engine.png?alt=media&amp;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 macro**

<figure><img src="https://1458658891-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6hYIUDbbkR19SjSREZ5n%2Fuploads%2FO5eQbvubB163oLDFa9jd%2FAdd%20New%20Rule.png?alt=media&amp;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 updated by macro**

<figure><img src="https://1458658891-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6hYIUDbbkR19SjSREZ5n%2Fuploads%2FdjSMhu3FGIFA02vK4Cm0%2Fcondition.png?alt=media&amp;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 macro, leave the condition empty or add some general one that is true for all the orders.
{% endhint %}

{% hint style="info" %}
You can use the same macro in different rules engine in order to update different types of orders based on different conditions
{% 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**](/tax-rate-app/overview/macro-configuration.md)

**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://1458658891-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6hYIUDbbkR19SjSREZ5n%2Fuploads%2FY37O732XwFvf8eRxSJW6%2Frule%20ship.png?alt=media&amp;token=d9ff9678-168f-4d01-9b7b-745d60ff4731" alt=""><figcaption></figcaption></figure>

<figure><img src="https://1458658891-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6hYIUDbbkR19SjSREZ5n%2Fuploads%2FNPXwki2vYrdGW3oc1bNx%2Fenable%20r%20e.png?alt=media&amp;token=1e666254-8132-4604-8bc1-152182ed014e" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}

#### Follow the same steps for the second macro configuration if required

{% endhint %}

### The macro is ready for use. The rules engine will be triggered when the order appears in Linnworks and will recalculate the shipping cost without VAT based on the highest item tax rate (ShippingTaxRateAdjustment) or set all the items and shipping tax rates to 0% (ZeroOrderTaxRateAdjustment)
