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

# ETL: NetSuite Source

> How to configure the NetSuite source components to read data in your Integrate.io ETL pipeline, including the REST component and its RESTlet access mode.

The NetSuite source reads data from NetSuite into an Integrate.io ETL pipeline. Integrate.io ETL offers three separate NetSuite source components: **NetSuite** (JDBC, over SuiteAnalytics Connect), **NetSuite SOAP**, and **NetSuite REST**. They are distinct components with their own connection types, so pick the one that matches the data you need.

This page covers connection setup for each, the configuration for the JDBC source, and the NetSuite REST source's three access modes: Object, Query (SuiteQL), and RESTlet.

## Connection Setup: NetSuite

## To create a NetSuite JDBC(Source) connection in Integrate.io ETL

**Step 1**

Click the Connections icon (lightning bolt) on the top left menu.

**Step 2**

To create a connection, click **New connection**.

![Connections page with New connection button](https://mintcdn.com/integrateio/K1OxIkBgHF64pvnH/images/connectivity-and-security/image-45.webp?fit=max\&auto=format\&n=K1OxIkBgHF64pvnH\&q=85\&s=44272da9d72aaf84241f141f09a490ed)

**Step 3**

Select **NetSuite JDBC(Source)**.

![Selecting NetSuite JDBC Source from the connection type list](https://mintcdn.com/integrateio/K1OxIkBgHF64pvnH/images/connectivity-and-security/image-46.webp?fit=max\&auto=format\&n=K1OxIkBgHF64pvnH\&q=85\&s=6044fca42cc6bf41ef02b9a0009e7282)

**Step 4**

In the new NetSuite JDBC(Source) connection window, name the connection and enter the connection information.

* **Name** - name for the new connection
* **Hostname** - copy from SuiteAnalytics Connect configuration (see image below)
* **Port** - copy from SuiteAnalytics Connect configuration (see image below)
* **User name** - your NetSuite user name.
* **Password** - your NetSuite password.
* **Service data source** - copy from SuiteAnalytics Connect configuration (see image below).
* **Account ID** - copy from SuiteAnalytics Connect configuration (see image below).
* **Role ID** - copy from SuiteAnalytics Connect configuration (see image below).

**Step 5**

Then, test the NetSuite connection by clicking **Test connection**. Once the connection tests successful, click **Create connection**.

![NetSuite JDBC connection form with hostname, port, and credentials](https://mintcdn.com/integrateio/K1OxIkBgHF64pvnH/images/connectivity-and-security/image-47.webp?fit=max\&auto=format\&n=K1OxIkBgHF64pvnH\&q=85\&s=49b4331863005b9d59ccc50d500955e7)

![NetSuite JDBC connection test and Create connection button](https://mintcdn.com/integrateio/K1OxIkBgHF64pvnH/images/connectivity-and-security/image-48.webp?fit=max\&auto=format\&n=K1OxIkBgHF64pvnH\&q=85\&s=177ae83b0eb36493cbaec635e5602eda)

You can find the connection information needed above in the SuiteAnalytics Connect configuration panel shown here:

![SuiteAnalytics Connect configuration panel with connection details](https://mintcdn.com/integrateio/K1OxIkBgHF64pvnH/images/connectivity-and-security/image-49.webp?fit=max\&auto=format\&n=K1OxIkBgHF64pvnH\&q=85\&s=a87d3d4abc2ac6621551ab50003fe258)

## To setup Netsuite2.com as data source

**Step 1**

Create a new role. Go to **Setup** > **Users/Roles** > **Manage Roles** > **New**.

![Creating a new role in NetSuite Setup](https://mintcdn.com/integrateio/K1OxIkBgHF64pvnH/images/connectivity-and-security/image-50.webp?fit=max\&auto=format\&n=K1OxIkBgHF64pvnH\&q=85\&s=374f66584b0e82e61a594ca2e8d9ad28)

**Step 2**

Enter a name for this role. Select **Permissions** tab and then click **Setup** tab and assign following permissions:

* Log in using Access Tokens
* SuiteAnalytics Connect

![Assigning SuiteAnalytics Connect permission to the role](https://mintcdn.com/integrateio/K1OxIkBgHF64pvnH/images/connectivity-and-security/image-51.webp?fit=max\&auto=format\&n=K1OxIkBgHF64pvnH\&q=85\&s=f94f3be13ff99f6ff6ab3ed5d5fc49fe)

> [!NOTE]
>
> **Note:**
>
> The 'Subsidiary Restriction' section may limit access to certain records you wish to retrieve. Depending on the type of subsidiary structure your organization operates under, you should carefully select these options to ensure you obtain the desired data.

![Subsidiary restriction options on the role configuration](https://mintcdn.com/integrateio/K1OxIkBgHF64pvnH/images/connectivity-and-security/image-52.webp?fit=max\&auto=format\&n=K1OxIkBgHF64pvnH\&q=85\&s=798b2fd988afb837321be79d98055f92)

**Step 3**

Grant an access to the selected tables. On the same role creation page, go to **Lists** tab and select tables.

> [!NOTE]
>
> **Note:**
>
> The screenshot below is demonstrating how to enable access to the Account table. Before proceeding, we recommend coordinating with your business team to determine the complete list of NetSuite tables required for your integration. Once the list is finalized, please contact your NetSuite Account Manager for assistance in configuring the appropriate permissions to ensure all relevant tables are both visible and accessible for integration purposes.

![Granting table access permissions in the Lists tab](https://mintcdn.com/integrateio/K1OxIkBgHF64pvnH/images/connectivity-and-security/image-53.webp?fit=max\&auto=format\&n=K1OxIkBgHF64pvnH\&q=85\&s=49f6e932164cb3e6c4eff7dee038e6b9)

**Step 4**

Assign the Roles to the selected User. Select **Access** tab and then add following roles under **Roles** tab:

* The role that has just been created from previous step
* **Data Warehouse Integrator** role

![Assigning roles to a user in the Access tab](https://mintcdn.com/integrateio/K1OxIkBgHF64pvnH/images/connectivity-and-security/image-54.webp?fit=max\&auto=format\&n=K1OxIkBgHF64pvnH\&q=85\&s=777a56a9c49dd92a2a3d1c15df624b43)

**Step 5**

Configure DB connection in Integrate.io ETL. Enter connection information (see steps "To create a Netsuite connection in Integrate.io ETL" from above) along with **Netsuite2.com** as Service data source and Role ID from the role that we just created from step 2.

![Connection form with Netsuite2.com as service data source](https://mintcdn.com/integrateio/K1OxIkBgHF64pvnH/images/connectivity-and-security/image-55.webp?fit=max\&auto=format\&n=K1OxIkBgHF64pvnH\&q=85\&s=9dcfe14d90f371db9662a36ae5611619)

## Connection Setup: NetSuite (SOAP)

## Setting up on NetSuite dashboard

To enable SOAP Web Services and Token Based Authentication, you need to log in to your Netsuite dashboard with admin roles and please follow these steps:

**Step 1**

Go to Setup > Company > Enable Features > SuiteTalk (Web Services) and enable both "SOAP Web Services" and "Token-based Authentication".

![Enabling SOAP Web Services and Token-based Authentication](https://mintcdn.com/integrateio/K1OxIkBgHF64pvnH/images/connectivity-and-security/image-56.webp?fit=max\&auto=format\&n=K1OxIkBgHF64pvnH\&q=85\&s=7f79107373bc2aed2b333d54151d3701)

**Step 2**

Create a new Integration. Navigate to Setup > Integrations > Manage Integrations > New. Please note that "Token-based Authentication" must be checked.

![Creating a new integration with Token-based Authentication checked](https://mintcdn.com/integrateio/K1OxIkBgHF64pvnH/images/connectivity-and-security/image-57.webp?fit=max\&auto=format\&n=K1OxIkBgHF64pvnH\&q=85\&s=dafac18be51f40e12ded83f1cdd0bc72)

**Step 3**

After finished creation integration, save the Consumer Key and Consumer Secret as it will be only shown once and used for connection configuration on Integrate.io ETL.

![Consumer Key and Consumer Secret displayed after integration creation](https://mintcdn.com/integrateio/K1OxIkBgHF64pvnH/images/connectivity-and-security/image-58.webp?fit=max\&auto=format\&n=K1OxIkBgHF64pvnH\&q=85\&s=cad0645fbb4c618e3fed472b675f7c74)

**Step 4**

Create a new role. Go to Setup > User Management > Manage Roles > New. Check "Web Services Only Roles" and add following permissions on Permissions > Setup tab:

![Role creation with Web Services Only Roles and permissions](https://mintcdn.com/integrateio/K1OxIkBgHF64pvnH/images/connectivity-and-security/image-59.webp?fit=max\&auto=format\&n=K1OxIkBgHF64pvnH\&q=85\&s=3d9484a7be4e1c0453f7740797293d85)

* SOAP Web Services
* Log in using Access Tokens
* Custom Body Fields
* Custom Item Fields
* Custom Fields

> [!NOTE]
>
> **Note:**
>
> The 'Subsidiary Restriction' section may limit access to certain records you wish to retrieve. Depending on the type of subsidiary structure your organization operates under, you should carefully select these options to ensure you obtain the desired data.

![Subsidiary restriction settings on the SOAP role](https://mintcdn.com/integrateio/K1OxIkBgHF64pvnH/images/connectivity-and-security/image-60.webp?fit=max\&auto=format\&n=K1OxIkBgHF64pvnH\&q=85\&s=2ac98eabdb0e6be0090de365215a1c35)

1. Assign the role from previous step to existing or a new user. Navigate to Setup > User Management > Manage Users.

   ![Assigning the SOAP role to a user in Manage Users](https://mintcdn.com/integrateio/K1OxIkBgHF64pvnH/images/connectivity-and-security/image-61.webp?fit=max\&auto=format\&n=K1OxIkBgHF64pvnH\&q=85\&s=2a7f19590f02844e40b9814ff9f59128)
2. Create a new access token. Go to Setup > User Management > Access Tokens. Select the name of Integration, User and Role from previous steps. After saving it, Token ID and Token Secret will be shown and keep those values securely.

   ![Creating a new access token with Token ID and Token Secret](https://mintcdn.com/integrateio/K1OxIkBgHF64pvnH/images/connectivity-and-security/image-62.webp?fit=max\&auto=format\&n=K1OxIkBgHF64pvnH\&q=85\&s=f73f2173aaeb7a1a61b9dc35f80c2128)

## To create a NetSuite SOAP connection in Integrate.io ETL

**Step 1**

Click the Connections icon (lightning bolt) on the top left menu.

**Step 2**

To create a connection, click **New connection**.

![Connections page with New connection button for SOAP](https://mintcdn.com/integrateio/K1OxIkBgHF64pvnH/images/connectivity-and-security/image-63.webp?fit=max\&auto=format\&n=K1OxIkBgHF64pvnH\&q=85\&s=d95c6220368def294e0b5b7783324aa7)

**Step 3**

Select **NetSuite SOAP**.

![Selecting NetSuite SOAP from the connection type list](https://mintcdn.com/integrateio/K1OxIkBgHF64pvnH/images/connectivity-and-security/image-64.webp?fit=max\&auto=format\&n=K1OxIkBgHF64pvnH\&q=85\&s=af8f64b264d87ee3e89138ef499b9c74)

**Step 4**

In the new NetSuite connection window, name the connection and enter the connection information.

![NetSuite SOAP connection form with Account ID and token fields](https://mintcdn.com/integrateio/K1OxIkBgHF64pvnH/images/connectivity-and-security/image-65.webp?fit=max\&auto=format\&n=K1OxIkBgHF64pvnH\&q=85\&s=867a33f481be5e75724cac45a80b1153)

* **Name** - name for the new connection
* **Account ID** - need to include the suffix `_SB<number>` for Sandbox account.
* **Consumer Key** - copy from previous step or SuiteAnalytics Connect configuration.
* **Consumer Secret** - copy from previous step or SuiteAnalytics Connect configuration.
* **Token ID** - copy from previous step or SuiteAnalytics Connect configuration.
* **Token Secret Account ID** - copy from previous step or SuiteAnalytics Connect configuration.

**Step 5**

Then, test the NetSuite connection by clicking **Test connection.** Once the connection tests successful, click **Create connection.**

![NetSuite SOAP connection test and Create connection button](https://mintcdn.com/integrateio/K1OxIkBgHF64pvnH/images/connectivity-and-security/image-66.webp?fit=max\&auto=format\&n=K1OxIkBgHF64pvnH\&q=85\&s=e0eeac5bcdd61182b87ca97d613d4319)

***

![NetSuite source component in the pipeline designer](https://mintcdn.com/integrateio/OwEKdS5aIKsEcmhX/images/creating-packages/using-components-netsuite-source/image-1.png?fit=max\&auto=format\&n=OwEKdS5aIKsEcmhX\&q=85\&s=af770a17b06ca2595e03e8dda85a1206)

## Connection

Select an existing NetSuite connection or create a new one (see [Connection Setup: NetSuite](#connection-setup-netsuite) above).

## Source Properties

![NetSuite source properties with table and where clause fields](https://mintcdn.com/integrateio/OwEKdS5aIKsEcmhX/images/creating-packages/using-components-netsuite-source/image-2.png?fit=max\&auto=format\&n=OwEKdS5aIKsEcmhX\&q=85\&s=5a16d51b18cd6c289c2b0ab4e2e30ce3)

* **Source table** - the table name from which the data will be imported. Use the [Suitetalk Connect schema browser](https://www.netsuite.com/portal/developers/resources/suitetalk-documentation.shtml "Link: https://www.netsuite.com/portal/developers/resources/suitetalk-documentation.shtml") to look up standard records and columns.
* **where clause** - optional. You can add predicates clauses to the WHERE clause as part of the SQL query that is built in order to get the data from the database. Make sure to skip the keyword WHERE.
  | Good | `prod_category = 1 AND prod_color = 'red'` |
  | :- | :- |
  | Bad | `WHERE prod_category = 1 AND prod_color = 'red'` |
  | **Notes:** in NetSuite2, the table names for entities such as customers, items, and contacts are singular rather than plural. | |

## Source Schema

After defining the source table/query select the fields to use in the source.

The fields you select are used to build the query that will be executed to read the data.

Define the data type for the field. Use the following table when matching NetSuite data types to Integrate.io ETL data types.

| NetSuite | Integrate.io ETL |
| :- | :- |
| varchar2 | String |
| number | Double |
| timestamp | Datetime |

## NetSuite REST Source

The NetSuite REST source component reads data over NetSuite's REST services. It works with either a **NetSuite SOAP** connection (OAuth 1.0a Token-Based Authentication) or a **NetSuite OAuth** connection (OAuth 2.0), and offers three access modes.

| Access mode | Reads | Use it when |
| :- | :- | :- |
| **Object** | A standard NetSuite record type | You want a whole record type, such as `customer` or `invoice`. |
| **Query (SuiteQL)** | The result of a SuiteQL query | You need joins, filters, or a subset of columns. |
| **RESTlet** | A custom SuiteScript RESTlet | The data has no standard record equivalent, so a developer exposed it through a RESTlet. |

### Object mode

Select the **Record type**. Integrate.io ETL reads the record type in pages, using a default page size of 1000.

### Query (SuiteQL) mode

Enter a **SuiteQL query**. You can set **Page Size** between 5 and 1000 to control how many records are fetched per API call.

#### Column names are returned in lowercase

NetSuite returns every SuiteQL column name in lowercase. This includes aliases, even quoted ones. For example, `SELECT t.id AS internalId FROM term t` returns a column named `internalid`. Integrate.io ETL cannot recover the case you wrote, because NetSuite does not send it back. See Oracle's [SuiteQL Limitations and Exceptions](https://docs.oracle.com/en/cloud/saas/netsuite/ns-online-help/section_156257796125.html).

Import the schema after writing the query, so the field names match what NetSuite sends. If downstream components expect a different case, rename the fields in a [Select](https://www.integrate.io/docs/etl/using-components-select-transformation.md) component. Typing mixed-case names into the source schema yourself does not work: those fields never match a returned column, so they load as null.

#### Checkbox fields

SuiteQL returns a checkbox field as `T` or `F`. When you import the schema, a column that holds only `T`/`F` values is given the **Boolean** data type, and the job loads it as a true Boolean:

| NetSuite value | Field typed Boolean | Field typed String |
| :- | :- | :- |
| `T` | `true` | `true` (text) |
| `F` | `false` | `false` (text) |
| `true` / `false` (text your query produces) | `true` / `false` | unchanged text |
| empty, or any other value | null | unchanged text |
| null | null | null |

Filter a Boolean field with the **Is true** operator, or with **=** against `true` or `false`. Do not use text comparisons. For a field typed String, compare as text with **Text equals** `true` / `false`. That is how packages built before the schema was typed Boolean keep working.

If a checkbox field was imported as String, you can change its data type to **Boolean** in the source schema. This happens if the field was typed by hand, or if your query converts it to text itself, for example with `CASE WHEN t.isinactive = 'T' THEN 'true' ELSE 'false' END`. Update any text comparisons on that field at the same time.

> [!NOTE]
>
> **Note:**
>
> Inside the SuiteQL query itself, NetSuite still compares checkbox fields to `'T'` and `'F'`, for example `WHERE t.isinactive = 'F'`.

### RESTlet mode

A RESTlet is a script your developers write and deploy inside NetSuite, exposed at a URL. Use this mode when the data you need is not available as a standard record type, which is common for custom business objects.

#### Before you start

Your RESTlet must already be deployed in NetSuite, and on the script deployment record:

* **Status** must be **Released**. A deployment left in **Testing** can only be called by the script owner, so Integrate.io ETL cannot reach it.
* **Audience** must include the role attached to the access token your Integrate.io ETL connection uses. This is the most common cause of an authentication failure that otherwise looks like a bad credential.
* The role needs the **Log in using Access Tokens** permission.

#### Configuration

| Field | Description |
| :- | :- |
| **Address the RESTlet by** | Choose **Script & deployment ID** (default) or **Full URL**. |
| **Script ID** | The script ID from the deployment record, for example `1053`. |
| **Deployment ID** | The deployment ID from the same record, for example `1`. |
| **RESTlet URL** | The complete RESTlet URL, used instead of the ID pair. |
| **HTTP method** | **GET** or **POST**. |
| **Request body** | JSON sent as the body of a POST request. Not used for GET. |

With **Script & deployment ID**, Integrate.io ETL builds the URL from the account on your connection, so you do not assemble the host yourself. This is the recommended option because the host is where most mistakes happen, particularly for sandbox accounts. A sandbox account ID such as `1234567_SB1` is converted to the right host (`1234567-sb1.restlets.api.netsuite.com`).

Both IDs appear on the script deployment record in NetSuite. Its URL field reads `?script=<Script ID>&deploy=<Deployment ID>`.

The request body can be up to 65,535 bytes once encoded. Characters outside ASCII count as more than one byte. You can use [package variables](https://www.integrate.io/docs/etl/using-and-setting-variables-in-your-packages.md), such as `$status`, in the URL, the IDs, and the request body. Their values are substituted when the job runs.

> [!WARNING]
>
> Importing the schema and previewing data both call the RESTlet. Only use POST with a script that is safe to run repeatedly.

#### What the RESTlet must return

The response must be JSON, and either:

* an **array of objects**, which produces one row per element, or
* a **single object**, which produces one row.

An array of positional rows such as `[["Alice", 30]]` cannot be mapped to fields and produces no rows.

Field names come from the JSON keys the RESTlet returns. They cannot contain a comma: the component fails validation if a selected field name contains one.

A nested object is kept whole and stored as JSON text. For example, this response:

```json theme={null}
[{ "orderId": "SO123", "department": { "id": "5", "name": "Sales", "region": "west" } }]
```

produces a `department` value of `{"id":"5","name":"Sales","region":"west"}`, with every field preserved. Use [JsonExtractScalar](https://www.integrate.io/docs/etl/jsonextractscalar.md) downstream if you need to pull individual values out, for example `JsonExtractScalar(department, '$.name')`.

#### URL restrictions

RESTlet URLs are checked before the call is made:

* The URL must use **https**.
* The host must be your own account's RESTlet host (`<account>.restlets.api.netsuite.com`) or a legacy data center host (`rest.<dc>.netsuite.com`).
* A URL containing embedded credentials, such as `https://host@other.example.com/`, is rejected.
* Redirects are not followed. If a RESTlet responds with a redirect, the call fails rather than following it.

These rules exist because the request is signed with your NetSuite credentials, and those credentials must not be sent anywhere other than your own account.

> [!NOTE]
>
> **Note:**
>
> On the per-account host, a URL belonging to a different NetSuite account is rejected. The legacy `rest.<dc>.netsuite.com` form is accepted for backward compatibility with older integrations, and that form is not account-scoped. Prefer **Script & deployment ID**, or a per-account URL, so the request is pinned to your own account.

### FAQ

**Q: My RESTlet returns data in NetSuite but Integrate.io ETL gets an authentication error. Why?**

Check the script deployment record first. The **Status** is usually still **Testing**, or the **Audience** does not include the role tied to your access token.

**Q: I get "Invalid data format. You should return text."**

That is NetSuite rejecting the script's return value. A RESTlet that returns an object or an array needs the request to declare a JSON content type, which Integrate.io ETL does. If you see this, the script is most likely returning something other than an object or array.

**Q: Can Integrate.io ETL list the RESTlets in my account?**

No. NetSuite does not expose script or deployment records through SuiteQL or the REST record API, so the IDs have to be entered by hand. Copy them from the script deployment record.

**Q: Which access mode should I use for a standard record?**

Use **Object** or **Query (SuiteQL)**. RESTlet mode is for data that has no standard record equivalent, and it requires a developer to write and deploy a script.

## Related

> [card] [ETL: NetSuite SOAP Destination](https://www.integrate.io/docs/etl/using-components-netsuite-soap-destination.md)

> [card] [ETL: JsonExtractScalar](https://www.integrate.io/docs/etl/jsonextractscalar.md)


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