> For the complete documentation index, see [llms.txt](https://docs.locoia.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.locoia.com/connectors/connectors/netsuite.md).

# Oracle NetSuite

NetSuite is a cloud business software suite, including accounting, ERP, CRM and e-commerce products.

### Helpful Links

* [NetSuite API Docs](https://system.netsuite.com/help/helpcenter/en_US/APIs/REST_API_Browser/record/v1/2021.1/index.html)
* [Object and field description](https://www.netsuite.com/help/helpcenter/en_US/srbrowser/Browser2016_1/schema/record/salesorder.html) can be found here for e.g. a Sales Order.
* [NetSuite Oracle User Login](https://system.netsuite.com/pages/customerlogin.jsp)

{% hint style="warning" %}
Note: Your account and user needs to be activated (have access to) for REST Webservices in order use the NetSuite API.
{% endhint %}

### **Enabling OAuth2 in NetSuite**

As an admin, do the following:

1\. Setup > Company > Enable Features

2\. Click on the tab "SuiteCloud":&#x20;

![](https://291121471-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-McrRFZHYH27bqKzOVDd%2F-MhzIyUDExJOsICNFrvw%2F-MhzNXCMZezcRxYLqAMd%2Fimage.png?alt=media\&token=95b92082-2ca6-4f43-9c05-1738c2c41f31)

3\. Scroll down to "SuiteTalk (WebServices)" section and check the "Rest Webservices" box. Next, under the section "Authentication", check the Oauth 2.0 box.

4\. Go to Setup > Integration > Manage Integrations > New

Next, Add a name that represents your app as well as add the Locoia redirect url URL, provided by an implementation consultant.

![](https://291121471-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-McrRFZHYH27bqKzOVDd%2F-MhzIyUDExJOsICNFrvw%2F-MhzOe-PgBX2IJI0oj7J%2Fimage.png?alt=media\&token=91843c20-36f8-4778-919e-06c34f0ef1b8)

Next, click "Save" ad the bottom left of the screen and you will be redirected to a new page where you find a `client_id` and `client_secret` on the bottom of the page. This is need to configure the integration.

Note: This is the only time you will see both ids, mentioned above, for security reasons.

### **Raw OAuth2 Configuration**

NetSuite allows Oauth2 for configuration including the account ID in all request. This needs to be added manually in authentication requests as well as the endpoint for regular requests.

#### OAuth2 parameters

To get started, for for calls against authentication as well as regular endpoints, you need to add the `account_id` of your NetSuite account. You can find this in your URL when your work inside NetSuite or under Setup > Company > Company Information in the bottom right "ACCOUNT ID"  (here you need to replace `_` by `-`).

* **Authorization URL**: https\://{{ account\_id }}.app.netsuite.com/app/login/oauth2/authorize.nl
* **Token / Refresh URL**: https\://{{ account\_id }}.suitetalk.api.netsuite.com/services/rest/auth/oauth2/v1/token
* **Scope**: restwebservices restlets

#### Base domain

https\://{{ account\_id }}.suitetalk.api.netsuite.com/services/rest/record/v1/

### Entities explained

#### Invoice

All relevant fields on the invoice can be [found here](https://system.netsuite.com/help/helpcenter/en_US/APIs/REST_API_Browser/record/v1/2021.1/index.html#/definitions/invoice).

### SOAP API

* [SOAP - Endpoint List](https://docs.oracle.com/en/cloud/saas/netsuite/ns-online-help/section_N3478008.html) (generic)
* [Entities (objects) that can be **added, updated** including examples](https://docs.oracle.com/en/cloud/saas/netsuite/ns-online-help/chapter_N3657735.html)
* [Updating Sublists in SOAP](https://docs.oracle.com/en/cloud/saas/netsuite/ns-online-help/section_N3441570.html)


---

# 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.locoia.com/connectors/connectors/netsuite.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.
