# NetSuite

To use the **NetSuite Node** in StackAI, use the Custom SuiteQL action. This action allows you to query Netsuite and retrieve any data stored there with a SQL query.

### **Creating a Connection to NetSuite**

StackAI recommends creating connections using a dedicated user account with permissions scoped for the task in question.&#x20;

To create a connection, select **+ NetSuite (OAuth)**. Then, log in with the user account.&#x20;

Here, you will be prompted to enter your Account ID, Client ID, and Client Secret.

#### Permissions

Give your service account user role permissions, and access to the necessary tables that you will be retrieving or writing data to. For access through StackAI, you may need to additionally give the service account permissions for "Analytics and REST" access to the table in question. For access to `Messages` for example, delegate permissions for `Messages` and also for `Messages Analytics and REST`

#### Tips

Always **list the fields explicitly** in your query:

```sql
SELECT id, subject, author, recipient, activitydate
FROM message
WHERE activitydate >= '2025-01-01'
```

You may not be able to use `SELECT *` when querying Netsuite. Your user may not have permissions to all fields, causing an error. NetSuite is also not a traditional relational database; some fields are dynamically defined.


---

# 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.stackai.com/workflow-builder/apps/netsuite.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.
