> For the complete documentation index, see [llms.txt](https://docs.decisionrules.io/doc/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.decisionrules.io/doc/v1/scripting-rules/import-and-export-rule/import-scripting-rule.md).

# Import Scripting Rule

## Importing a Rule

First, make sure you're logged in and navigate to the **Bussiness 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 **Bussiness 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/bRnBpyt0OOjA4XqlKSHx" alt=""><figcaption></figcaption></figure>

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

<figure><img src="/files/jwuZwuF6kmABRifyueal" 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/n8EB1NP1WHSNoVSA0GSW" 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/59H1QnOc1Ty23kvLEtYe" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/XPL9FhHNIpuqQZJU7UZi" 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 Scripting Rules, the rule file can only have the format of JSON.

<figure><img src="/files/GEMwUAhlrsUZtjz9yQc3" alt=""><figcaption></figcaption></figure>

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


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.decisionrules.io/doc/v1/scripting-rules/import-and-export-rule/import-scripting-rule.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
