# Import Decision Tree

### Importing a Rule

First, make sure you're logged in and navigate to the **Business Rules** category on the sidebar. &#x20;

Importing a rule can have one of two meanings:

* [Importing a new Rule](#1.-importing-a-new-rule)
* [Importing a new version of an existing Rule](#2.-importing-a-new-version-of-an-existing-rule)&#x20;

#### 1. Importing a new Rule

To import a new Rule navigate to the **Business Rules** category through the sidebar or select a folder you want the rule imported into in the **Folders** manager.

Click the **Import Rule** button on the top right. Shown in the image below.

<figure><img src="https://content.gitbook.com/content/dv9UprVu3KjO5la255ws/blobs/fb33BHJ3fGiEnTqsLDHJ/tree_import.png" alt=""><figcaption></figcaption></figure>

You will be prompted to drop or choose a file on your system containing the rule.

<figure><img src="https://content.gitbook.com/content/dv9UprVu3KjO5la255ws/blobs/DqiApUl93FCxiUiJiCv3/import_prompt.png" alt=""><figcaption></figcaption></figure>

Drag and drop your rule file into the dashed area or click within it to open a File Explorer. For Decision Trees, the rule file can only have the format of JSON.

<figure><img src="https://content.gitbook.com/content/dv9UprVu3KjO5la255ws/blobs/AMcutKCXfoyRfNogps1Z/tree_import_prompt.png" alt=""><figcaption></figcaption></figure>

Once your rule file has been selected, click the **Import** button.

#### 2. Importing a new version of an existing Rule

To import a new version of an existing Rule

<figure><img src="https://content.gitbook.com/content/dv9UprVu3KjO5la255ws/blobs/CmlnSs9NizBVRu1ItoCg/tree_import_v.png" alt=""><figcaption></figcaption></figure>

<figure><img src="https://content.gitbook.com/content/dv9UprVu3KjO5la255ws/blobs/0mLlEa4JH7nnh6fBr2ng/tree_settings_import_v.png" alt=""><figcaption></figcaption></figure>

You will be prompted with the following window.

<figure><img src="https://content.gitbook.com/content/dv9UprVu3KjO5la255ws/blobs/qkZb26XWtgKK5RNbfFnJ/image.png" alt=""><figcaption></figcaption></figure>

First, select whether you would like:

* To import the rule as a new version of the existing rule.

or

* To **overwrite** the latest version of the existing rule.

{% hint style="danger" %}
Overwriting the latest version **cannot be undone**. The overwritten version will be permanently lost.
{% endhint %}

After selecting the method of import, drag and drop your rule file into the dashed area or click within it to open a File Explorer. For Decision Trees, the rule file can only have the format of JSON.

<figure><img src="https://content.gitbook.com/content/dv9UprVu3KjO5la255ws/blobs/RBcHQyYNwJrYbwZVIJHn/tree_version_overwrite.png" alt=""><figcaption></figcaption></figure>

Once your rule file has been selected, click the **Import** button.
