# 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="/files/VC1tpRU8ctaPmA87YQtt" alt=""><figcaption></figcaption></figure>

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

<figure><img src="/files/BPRMCCjUAWS74eBbgz7L" 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="/files/iynNAV2ZifNSQ304YaSQ" 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="/files/gxbFOODWZzb6zrUUas7N" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/8NAh0uKKYzGKioCnDCvR" alt=""><figcaption></figcaption></figure>

You will be prompted with the following window.

<figure><img src="/files/Ndpl2Z6eIQyj9CE4FLBO" 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="/files/A8drCc3sCIQ2S7nrRP01" alt=""><figcaption></figcaption></figure>

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


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.decisionrules.io/doc/v1/decision-trees/import-and-export-rule/import-decision-tree.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
