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

# NetSuite Connector: SuiteTalk REST and SuiteQL

> Read and write NetSuite records from your workflows through SuiteTalk REST: customers, sales orders, invoices and fulfillments, plus SuiteQL queries.

The NetSuite connector lets your workflows read and write NetSuite records through the [SuiteTalk REST Web Services API](https://docs.oracle.com/en/cloud/saas/netsuite/ns-online-help/book_1559132836.html "Oracle NetSuite documentation: SuiteTalk REST Web Services API"). It exposes curated tools for the most common records (customers, sales orders, invoices, items, item fulfillments), a powerful `run-suiteql` tool for SQL-like reads, and a `raw-request` passthrough for any other REST endpoint.

> [!NOTE]
>
> A NetSuite connection signs in with **OAuth 2.0** (a certificate you upload to NetSuite) or **Token-Based Authentication (TBA)**. Use OAuth 2.0 for new connections: per Oracle's release notes, no new TBA integrations can be created from NetSuite 2027.1, and existing TBA credentials keep working until Oracle ends TBA.

> [!TIP]
>
> Want Oracle's own MCP tools instead? See [Connect the NetSuite MCP server](https://docs.condotta.ai/connectors/remote-mcp-servers/netsuite.md) for the NetSuite AI Connector Service.

> [!NOTE]
>
> This connector requires a **connection** with valid credentials before it can be used in a workflow. See [Managing Connections](https://docs.condotta.ai/platform/connections.md) for setup instructions.

## Finding record types, fields, and SuiteQL tables

NetSuite accounts are heavily customizable, so record and field names vary between accounts. Use these Oracle-maintained references when writing queries or record payloads:

* **[Records Browser](https://system.netsuite.com/help/helpcenter/en_US/srbrowser/Browser2024_2/script/index.html "NetSuite Help Center: Records Browser")**: every record type, its fields, and sublists.
* **[Analytics Data Source Schema Browser](https://system.netsuite.com/help/helpcenter/en_US/srbrowser/Browser2024_2/analytics/index.html "NetSuite Help Center: Analytics Data Source Schema Browser")**: the tables and columns available to SuiteQL.
* **[SuiteQL reference](https://docs.oracle.com/en/cloud/saas/netsuite/ns-online-help/section_158394344595.html "Oracle NetSuite documentation: SuiteQL reference")**: SuiteQL language syntax and supported functions.

You can also call `list-record-types` and `get-record-metadata` from a workflow to discover what the current NetSuite account exposes.

## Connection setup

> [tab] OAuth 2.0 (recommended)
>
> Condotta signs in with NetSuite's OAuth 2.0 client credentials flow: you upload a certificate Condotta makes, and Condotta uses it to get a fresh access token whenever it needs one. Nobody has to sign in again, and nothing needs renewing for two years. The certificate's private key never leaves Condotta's credential store.
>
> **1. Enable OAuth 2.0 in NetSuite**
>
> Go to **Setup → Company → Enable Features → SuiteCloud**. Under *Manage Authentication*, enable **OAuth 2.0**, and under *SuiteTalk (Web Services)* enable **REST Web Services**.
>
> **2. Prepare a role**
>
> Choose the role Condotta will act as and give it **Log in using OAuth 2.0 Access Tokens** and **REST Web Services**, plus permissions for the records your workflows use. Assign it to the user Condotta will act as. Don't use the Administrator role: NetSuite doesn't let it call the APIs with OAuth 2.0.
>
> **3. Create an integration record**
>
> Go to **Setup → Integration → Manage Integrations → New**. Give it a name (e.g. "Condotta"), tick **Client Credentials (Machine to Machine) Grant** and the **REST Web Services** scope, and save. Copy the **Client ID**.
>
> **4. Add the connection and make the certificate**
>
> Go to **Connections** in Condotta, click **Add Connection**, select **NetSuite**, then **Configure**. Enter your **Account ID** (from **Setup → Company → Company Information**; sandboxes look like `1234567_SB1`), choose **OAuth 2.0 (certificate)**, paste the **Client ID**, click **Make certificate**, and download it.
>
> **5. Upload the certificate to NetSuite**
>
> Go to **Setup → Integration → Manage Authentication → OAuth 2.0 Client Credentials (M2M) Setup** and click **Create New**. Choose the user (entity), the role and the integration, upload the certificate, and save. NetSuite asks an administrator to confirm with two-factor authentication. Copy the **Certificate ID** NetSuite shows.
>
> **6. Finish the connection in Condotta**
>
> Paste the **Certificate ID** into the connection and click **Save**.
>
> > [!NOTE]
> >
> > The certificate is valid for two years. Before it ends, click **Make a new certificate** on the connection, upload the new one in NetSuite and enter its Certificate ID. A sandbox refresh removes the upload from the sandbox, so upload the certificate again after one.

> [tab] Token-Based Authentication (TBA)
>
> For accounts that already use TBA. Connections that use TBA keep working as they are.
>
> **1. Enable TBA in NetSuite**
>
> In NetSuite go to **Setup → Company → Enable Features → SuiteCloud**. Under *Manage Authentication*, enable **Token-Based Authentication** and **REST Web Services**.
>
> **2. Create an integration record**
>
> Go to **Setup → Integration → Manage Integrations → New**. Give it a name (e.g. "Condotta"), enable **Token-Based Authentication**, leave **TBA: Authorization Flow** disabled, and save. Copy the **Consumer Key** and **Consumer Secret** that appear at the bottom of the page. They are shown only once.
>
> **3. Create an access token**
>
> Go to **Setup → Users/Roles → Access Tokens → New**. Select your integration, a user, and a role with the necessary permissions (commonly *SuiteAnalytics Workbook*, *REST Web Services*, and record-type-specific permissions). Save and copy the **Token ID** and **Token Secret**. These are also shown only once.
>
> **4. Add the connection in Condotta**
>
> Go to **Connections** in Condotta, click **Add Connection**, select **NetSuite**, then **Configure**. Enter your **Account ID** (from **Setup → Company → Company Information**), choose **Token-Based Authentication (TBA)**, and enter the **Consumer Key**, **Consumer Secret**, **Token ID** and **Token Secret**.

## Tools

### Utility

> [accordion] verify-connection: Test credentials and account
>
> Fetches the REST metadata catalog root and returns success if credentials are valid.
>
> No parameters required.
>
> **Example response:**
>
> ```json theme={null}
> {
>   "success": true,
>   "status": 200,
>   "data": {
>     "items": [
>       { "name": "customer", "links": [{ "rel": "self", "href": ".../record/v1/metadata-catalog/customer" }] }
>     ]
>   }
> }
> ```

> [accordion] run-suiteql: Execute a SuiteQL query
>
> **query** `string` *required*
>
> SuiteQL query. Example: `SELECT id, companyname FROM customer WHERE isinactive = 'F' FETCH FIRST 10 ROWS ONLY`.
>
> **limit** `number`
>
> Max rows per page (default 100, max 1000).
>
> **offset** `number`
>
> Pagination offset.
>
> **Example request:**
>
> ```json theme={null}
> {
>   "query": "SELECT id, tranid, trandate, entity FROM transaction WHERE type = 'SalesOrd' AND trandate >= '01/01/2025' FETCH FIRST 5 ROWS ONLY"
> }
> ```
>
> **Example response:**
>
> ```json theme={null}
> {
>   "success": true,
>   "status": 200,
>   "data": {
>     "links": [{ "rel": "self", "href": ".../query/v1/suiteql" }],
>     "count": 3,
>     "hasMore": false,
>     "items": [
>       { "id": "4421", "tranid": "SO4421", "trandate": "02/14/2025", "entity": "128" },
>       { "id": "4422", "tranid": "SO4422", "trandate": "02/14/2025", "entity": "129" },
>       { "id": "4423", "tranid": "SO4423", "trandate": "02/15/2025", "entity": "130" }
>     ],
>     "offset": 0,
>     "totalResults": 3
>   }
> }
> ```

### Metadata / discovery

> [accordion] list-record-types: List all record types in this account
>
> Returns the REST metadata catalog root: every record type the account exposes via REST.
>
> No parameters required.

> [accordion] get-record-metadata: Get the schema for one record type
>
> **recordType** `string` *required*
>
> Record type name, e.g. `customer`, `salesOrder`, `invoice`.
>
> **Example request:**
>
> ```json theme={null}
> { "recordType": "customer" }
> ```
>
> The response is a JSON-Schema document listing every field, sublist, and enumeration; use it to discover what payload shape the record expects.

### Customers

> [accordion] list-customers: List customers
>
> **q** `string`
>
> SuiteTalk query filter (e.g. `companyName START_WITH 'Acme'`).
>
> **limit** `number`
>
> Page size (default 100, max 1000).
>
> **offset** `number`
>
> Pagination offset.
>
> **Example request:**
>
> ```json theme={null}
> { "q": "isInactive IS false", "limit": 5 }
> ```
>
> **Example response:**
>
> ```json theme={null}
> {
>   "success": true,
>   "status": 200,
>   "data": {
>     "links": [{ "rel": "self", "href": ".../customer" }],
>     "count": 5,
>     "hasMore": true,
>     "totalResults": 342,
>     "items": [
>       { "links": [{ "rel": "self", "href": ".../customer/128" }], "id": "128" },
>       { "links": [{ "rel": "self", "href": ".../customer/129" }], "id": "129" }
>     ]
>   }
> }
> ```

> [accordion] get-customer: Fetch a customer by ID
>
> **id** `string` *required*
>
> Customer internal ID.
>
> **expandSubResources** `boolean`
>
> Inline sublists (addresses, contacts).
>
> **Example response:**
>
> ```json theme={null}
> {
>   "success": true,
>   "status": 200,
>   "data": {
>     "id": "128",
>     "companyName": "Acme Inc",
>     "email": "ap@acme.example",
>     "phone": "+1-415-555-0123",
>     "isPerson": false,
>     "isInactive": false,
>     "subsidiary": { "id": "1", "refName": "Parent Company" },
>     "terms": { "id": "4", "refName": "Net 30" }
>   }
> }
> ```

> [accordion] create-customer: Create a customer
>
> **body** `object` *required*
>
> Customer payload. Common fields: `companyName`, `email`, `phone`, `subsidiary`, `isPerson`, `firstName`, `lastName`.
>
> **Example request:**
>
> ```json theme={null}
> {
>   "body": {
>     "companyName": "Globex Corporation",
>     "email": "contact@globex.example",
>     "subsidiary": { "id": "1" },
>     "isPerson": false
>   }
> }
> ```
>
> **Example response:**
>
> ```json theme={null}
> { "success": true, "status": 204, "data": null }
> ```
>
> The new customer's internal ID is returned in the `Location` response header (e.g. `/record/v1/customer/512`).

> [accordion] update-customer: Patch an existing customer
>
> **id** `string` *required*
>
> Customer internal ID.
>
> **body** `object` *required*
>
> Fields to update.
>
> **Example request:**
>
> ```json theme={null}
> { "id": "128", "body": { "phone": "+1-415-555-9999" } }
> ```

### Sales orders

> [accordion] list-sales-orders: List sales orders
>
> **q** `string`
>
> SuiteTalk filter (e.g. `tranDate ON_OR_AFTER '01/01/2025'`).
>
> **limit** `number`
>
> Page size.
>
> **offset** `number`
>
> Pagination offset.

> [accordion] get-sales-order: Fetch a sales order by ID
>
> **id** `string` *required*
>
> Sales order internal ID.
>
> **expandSubResources** `boolean`
>
> Inline line items.
>
> **Example response (truncated):**
>
> ```json theme={null}
> {
>   "success": true,
>   "status": 200,
>   "data": {
>     "id": "4421",
>     "tranId": "SO4421",
>     "tranDate": "2025-02-14",
>     "entity": { "id": "128", "refName": "Acme Inc" },
>     "status": { "id": "B", "refName": "Pending Fulfillment" },
>     "total": 1245.50,
>     "item": {
>       "items": [
>         { "line": 1, "item": { "id": "301", "refName": "Widget" }, "quantity": 10, "rate": 120.00, "amount": 1200.00 }
>       ]
>     }
>   }
> }
> ```

### Invoices

> [accordion] list-invoices: List invoices
>
> **q** `string`
>
> SuiteTalk filter (e.g. `status IS "Invoice:A"` for open invoices).
>
> **limit** `number`
>
> Page size.
>
> **offset** `number`
>
> Pagination offset.

> [accordion] get-invoice: Fetch an invoice by ID
>
> **id** `string` *required*
>
> Invoice internal ID.
>
> **expandSubResources** `boolean`
>
> Inline invoice lines.

### Items

> [!NOTE]
>
> NetSuite has several item subtypes (`inventoryItem`, `assemblyItem`, `nonInventorySaleItem`, `serviceSaleItem`, …). The tools below default to `inventoryItem`. To list across all subtypes, use `run-suiteql` with `SELECT id, itemid, itemtype FROM item`.

> [accordion] list-items: List items of a subtype
>
> **recordType** `string` (default: inventoryItem)
>
> Item record type.
>
> **q** `string`
>
> SuiteTalk filter.
>
> **limit** `number`
>
> Page size.
>
> **offset** `number`
>
> Pagination offset.

> [accordion] get-item: Fetch an item by ID
>
> **id** `string` *required*
>
> Item internal ID.
>
> **recordType** `string` (default: inventoryItem)
>
> Item subtype.

### Item fulfillments

> [!NOTE]
>
> Item fulfillment records in NetSuite are normally created by **transforming** a sales order, not by a bare `POST /record/v1/itemFulfillment`. The `create-item-fulfillment` tool wraps the transform endpoint so the LLM doesn't need to know the URL convention.

> [accordion] list-item-fulfillments: List fulfillment records
>
> **q** `string`
>
> SuiteTalk filter (e.g. `createdFrom IS 4421`).
>
> **limit** `number`
>
> Page size.
>
> **offset** `number`
>
> Pagination offset.

> [accordion] get-item-fulfillment: Fetch a fulfillment by ID
>
> **id** `string` *required*
>
> Item fulfillment internal ID.
>
> **expandSubResources** `boolean`
>
> Inline fulfilled line items.

> [accordion] create-item-fulfillment: Fulfill a sales order
>
> **salesOrderId** `string` *required*
>
> Internal ID of the sales order being fulfilled.
>
> **body** `object` *required*
>
> Fulfillment payload. Set `itemReceive: true` and `quantity` on each line you want to ship.
>
> **Example request:**
>
> ```json theme={null}
> {
>   "salesOrderId": "4421",
>   "body": {
>     "shipStatus": "C",
>     "item": {
>       "items": [
>         { "line": 1, "itemReceive": true, "quantity": 10 }
>       ]
>     }
>   }
> }
> ```

### Generic record CRUD

Use these when the record type isn't covered by a domain-specific tool (e.g. `purchaseOrder`, `vendorBill`, `journalEntry`, `employee`).

> [accordion] get-record: Fetch any record by type and ID
>
> **recordType** `string` *required*
>
> Record type (e.g. `purchaseOrder`).
>
> **id** `string` *required*
>
> Internal ID.
>
> **expandSubResources** `boolean`
>
> Inline sublists.
>
> **fields** `string`
>
> Comma-separated list of fields to return.

> [accordion] list-records: List records of a type
>
> **recordType** `string` *required*
>
> Record type.
>
> **q** `string`
>
> SuiteTalk filter.
>
> **limit** `number`
>
> Page size.
>
> **offset** `number`
>
> Pagination offset.

> [accordion] create-record: Create any record
>
> **recordType** `string` *required*
>
> Record type.
>
> **body** `object` *required*
>
> Record payload.

> [accordion] update-record: Patch any record
>
> **recordType** `string` *required*
>
> Record type.
>
> **id** `string` *required*
>
> Internal ID.
>
> **body** `object` *required*
>
> Fields to update.

> [accordion] delete-record: Delete a record
>
> **recordType** `string` *required*
>
> Record type.
>
> **id** `string` *required*
>
> Internal ID.

> [accordion] upsert-record: Create or update by external ID
>
> **recordType** `string` *required*
>
> Record type.
>
> **externalId** `string` *required*
>
> External ID.
>
> **body** `object` *required*
>
> Record payload.

### Sublists

> [accordion] get-sublist: Fetch a sublist from a record
>
> **recordType** `string` *required*
>
> Parent record type.
>
> **id** `string` *required*
>
> Parent record ID.
>
> **sublistId** `string` *required*
>
> Sublist name (e.g. `item`, `addressBook`).

> [accordion] add-sublist-item: Append a line to a sublist
>
> **recordType** `string` *required*
>
> Parent record type.
>
> **id** `string` *required*
>
> Parent record ID.
>
> **sublistId** `string` *required*
>
> Sublist name.
>
> **body** `object` *required*
>
> Line item payload.

### Advanced

> [accordion] raw-request: Make any signed REST request
>
> Execute an arbitrary request against the NetSuite REST API. Authentication (the OAuth 2.0 token or the TBA signature) is applied automatically. `path` is relative to `/services/rest`.
>
> **method** `string` *required*
>
> HTTP method: `GET`, `POST`, `PUT`, `PATCH`, or `DELETE`.
>
> **path** `string` *required*
>
> Path relative to `/services/rest` (e.g. `/record/v1/vendorBill`).
>
> **body** `object`
>
> Request body.
>
> **queryParams** `object`
>
> Query parameters as a key/value map.
>
> **headers** `object`
>
> Extra headers.
>
> **Example request:**
>
> ```json theme={null}
> {
>   "method": "GET",
>   "path": "/record/v1/purchaseOrder",
>   "queryParams": { "limit": "5", "q": "status IS \"PurchOrd:B\"" }
> }
> ```

> [card] [Try this free for 14 days](https://preview.condotta.ai/signup)
>
> Start a 14-day trial on Band 1. At day 14, choose your band, or stop.


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