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

# How do I create and run CRMScripts?

> An overview of the CRMScript environment and the tools you need to create and run scripts.

<Note>
  This feature requires a license for [Development Tools][1] or the CRM Suite **Core** plan.
</Note>

[1]: /en/admin/license/expander-services

## Creating CRMScripts

### Which editors can I use?

You can use whatever code editor you prefer. For example, Visual Studio Code. You can even use Notepad.

However, we recommend using the built-in editor in the SuperOffice admin client. This will give you coding assistance and **syntax highlighting**. You also have easy access to run and debug the script as you develop it.

## Running CRMScripts

<Danger>
  CRMScript is extremely powerful. Unless you are cautious, scripting could potentially damage the data in your system. Know what you are doing and always test in a closed environment first.
</Danger>

**Pre-requisites:**

* An administrator account for the tenant or installation
* A Development Tools (previously Expander Services) license or the Core plan

### Where does CRMScript run?

You need to run your scripts in an environment that has a CRMScript **interpreter**.
For SuperOffice CRM Online, this is available in the Sales and Service admin clients.

**In Sales:**

1. Open the Admin client by selecting **Settings and maintenance** from the hamburger menu.
2. Select **CRMScript** from the left menu.

**In Service:**

1. Click the cogwheel in the upper-right corner.
2. Click **System design** and then click **CRMScript**.

### How to add a script

<Tip>
  Create a new folder to group your scripts.
</Tip>

1. Click **New script**.
2. At the **Information** tab, name your script, add a description.
3. Enter a label to uniquely identify it when included in other scripts.
4. Select the **Script** tab. Then type or paste your script.
5. Click **OK** to save and **Execute script** to run it.

<Tip>
  If you don't see the **New script** button, you probably lack a Development Tools license or the Core plan.
</Tip>

### How to define which HTTP verbs are allowed

While [adding a script](#how-to-add-a-script) it is possible to set allowed HTTP verbs.

![Options shown in the script editor][img1]

This is relevant, for instance, when creating a [Custom REST endpoint][3] and this property applies only when a script is executed via:

* `blogic.fcgi?action=doScript`
* `customer.fcgi?action=safeParse` or `customer.fcgi?action=printBin`

This gives you finer control over script execution and improves overall security.

<Note>
  When creating scripts through the CRMScript Agent: If the new property is omitted from the payload (as will be the case for most existing integrations), all verbs will be enabled by default.
  When [creating a script via the GUI](#how-to-add-a-script): All verbs will be disabled by default, letting you explicitly choose which ones to allow.
</Note>

### How do I get a sandbox?

You need to [register as a developer][2] to get access to our online development environment.

This signs you up for a developer user account and creates a test tenant in the SuperOffice Online Development (SOD) environment.

[2]: ../../../developer-portal/getting-started/get-access-to-sod

[3]: ../tutorials/build-custom-rest-api-methods

[img1]: /media/loc/en/automation/http-verbs.png


## Related topics

- [Create or edit a script](/en/customization/macros-and-scripts/admin/create-script.md)
- [Define flow actions](/en/marketing/flows/learn/define-flow-actions.md)
- [CRMScript webhooks event handlers](/en/automation/webhook/dev/crmscript-handlers.md)
- [How to create a folder](/en/marketing/learn/create-folder.md)
- [NSQuoteAgent](/en/automation/crmscript/reference/CRMScript.NetServer.NSQuoteAgent.md)
- [Todo list](/en/automation/crmscript/howto/diary/task.md)
