> ## Documentation Index
> Fetch the complete documentation index at: https://docs.nx1cloud.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Create or edit a draft version

> Create or edit a draft version to add or change a rule's logic.

A rule's logic lives in versions. Each new version starts as a draft. You can edit a draft that you created until you submit it.
After that, create a new version to change it.

You describe the logic as a decision table. The web portal gives you an editor for it. With the API, you can also enter
columns and rows or fill in a spreadsheet.

## Prerequisites

Before starting this task, ensure you have the following:

* Required roles: [`author` or `workspace_admin` in a workspace](https://docs.nx1cloud.com/documentation/data/overview/business-rules#roles-and-permissions)
* An [existing rule](https://docs.nx1cloud.com/documentation/data/tasks/business-rules/rules/create-a-rule.md)
* To edit a draft, a draft version that you created

## Steps

> [tab] Web portal
>
> Perform these steps to create or edit a draft version:
>
> 1. Log in to NexusOne.
>
> 2. On the top navigation bar, hover your mouse over **Data** and then select **Business Rules**.
>
> 3. Select a workspace.
>
> 4. Select a rule.
>
> 5. Click **Edit rules**. The editor opens on the latest version.
>
> 6. Build or change the logic in the editor.
>
> 7. Click one of the following buttons:
>
>    * **Save draft x**: Updates your own draft. Here, x is the version number.
>      This button appears only when the latest version is your own draft.
>    * **Save as new draft**: Keeps the earlier version as it is and adds a new draft.
>
> 8. In the **Notes** field, describe what changed. The approver reads this alongside the comparison.
>
> 9. Click **Save draft**.

> [tab] REST API
>
> Use the following API endpoints to create or edit a draft version:
>
> * [Create a draft version from a rule spreadsheet](https://docs.nx1cloud.com/api-reference/endpoints/decisions/create-a-draft-version-from-a-rule-spreadsheet.md)
> * [Create a draft version from a rule table](https://docs.nx1cloud.com/api-reference/endpoints/decisions/create-a-draft-version-from-a-rule-table.md)
> * [Create a draft version](https://docs.nx1cloud.com/api-reference/endpoints/decisions/create-a-draft-version.md)
> * [Download the rule spreadsheet template](https://docs.nx1cloud.com/api-reference/endpoints/decisions/download-the-rule-spreadsheet-template.md)
> * [Edit a draft in place from a rule table](https://docs.nx1cloud.com/api-reference/endpoints/decisions/edit-a-draft-in-place-from-a-rule-table.md)
> * [Edit a draft in place](https://docs.nx1cloud.com/api-reference/endpoints/decisions/edit-a-draft-in-place.md)
> * [Read a rule spreadsheet without storing anything](https://docs.nx1cloud.com/api-reference/endpoints/decisions/read-a-rule-spreadsheet-without-storing-anything.md)

## Additional resources

To send a draft for review, refer to [Submit a draft version for approval](https://docs.nx1cloud.com/documentation/data/tasks/business-rules/versions/submit-a-version-for-approval.md).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.