# NetSuite REST

### Overview

The DBSync NetSuite REST Connector empowers organizations to integrate NetSuite with a variety of cloud and on-premise systems using modern REST web services. The connector is designed for real-time, secure, and scalable data automation, allowing users to synchronize, transfer, and manage business-critical information such as transactions, customers, items, and custom records across disparate applications. All integrations are achieved via RESTful methods, adhering to industry best practices for performance and security.

### Key Features

* Enables integration with CRMs, e-commerce platforms, analytics tools, finance systems, and more.​
* Supports CRUD ( Read, Write, Update) for both standard and custom NetSuite records.​
* Utilizes secure OAuth2.​​
* Processes real-time and scheduled data workflows to automate business tasks and reporting.​
* Highly configurable and developer-friendly for robust customizations and extensibility.​
* No specific NetSuite version dependency.

### Prerequisites

* **DBSync Account:** An active DBSync license and valid access to the DBSync cloud platform.​
* **NetSuite Account:** Admin-level NetSuite account.
* **Permissions:** The integration user must be assigned a custom role with all permissions listed in the table below.
* **Token-Based Authentication (TBA):** TBA must be enabled in NetSuite. Obtain the Account ID, Client ID, Client Secret, TBA Access Token, and TBA Access Token Secret from NetSuite's integration and access token management screens.​\
  Required NetSuite Permissions

  Assign the following permissions to the NetSuite user role intended for DBSync REST integration.

  | Permission Name              | Tab/Subtab         | Level | Description                                                        |
  | ---------------------------- | ------------------ | ----- | ------------------------------------------------------------------ |
  | Web Services                 | Setup              | Full  | Enables SuiteTalk API & REST access                                |
  | REST Web Services            | Setup              | Full  | Enables REST API features                                          |
  | Access Token Management      | Setup              | Full  | Needed for TBA configuration                                       |
  | User Access Tokens           | Setup              | Full  | Manage user-specific tokens                                        |
  | Custom Record Types          | Lists/Transactions | Full  | Required for custom record access                                  |
  | (Transaction) Record Types\* | Transactions       | Full  | Enable access to all objects like Bill, Invoice, Sales Order, etc. |

**Note:**

* Expand transaction, item, and Entity permissions to include all record types your integration will access.

### Supported NetSuite Records

The connector supports all standard and custom record types for which the integration user has been granted permissions. Examples include:

* Transactions: Bill, Invoice, Credit Memo, Customer Deposit, Payment, Purchase Order, Sales Order, Work Order, etc.
* Items: Inventory Part, Non-Inventory Part, Discount, etc.\
  \
  **Connector Configuration Parameters**

  | Field Name                  | Description                                            |
  | --------------------------- | ------------------------------------------------------ |
  | **Account ID**              | NetSuite account identifier (from NetSuite admin page) |
  | **Client ID**               | OAuth2 Client ID generated for API integration         |
  | **Client Secret**           | OAuth2 Client Secret from NetSuite integration screen  |
  | **TBA Access Token**        | Token-Based Authentication access token                |
  | **TBA Access Token Secret** | Access token secret for TBA                            |

### Setup Instructions

1. **Create a NetSuite Integration Record**
   * In NetSuite, navigate to Setup > Integrations > Manage Integrations > New.
   * Enable Token-Based Authentication.
   * Note the Consumer Key and Secret (Client ID/Secret).
2. **Assign Required Role and Permissions**
   * Create a custom role.
   * Add all permissions listed previously — especially for Web Services, REST Web Services, and all record types used in sync.
   * Assign this role to the integration user.
3. **Enable Token-Based Authentication (TBA)**
   * In NetSuite, enable TBA globally: Setup > Company > Enable Features > SuiteCloud.
   * Under Manage Users, assign the role to your integration user.
4. **Generate Tokens for the User**
   * In NetSuite: Setup > Users/Roles > Access Tokens > New.
   * Select the integration record and user/role. Save and copy the token ID and secret.
5. **Enter Credentials in DBSync**
   * Log in to DBSync Cloud Workflow.
   * Access the NetSuite REST connector setup page.
   * Enter: Account ID, Client ID, Client Secret, TBA Access Token, and TBA Access Token Secret as shown in the UI.
   * Click “Validate Connection” to confirm successful authentication.
   * Click “Refresh Metadata” to fetch available object definitions and templates.
6. **Save the Connection**
   * Click “Save Connection” to finish the setup.

Operations and Usage

* **CRUD Support:** Perform write, read, and update operations on every permitted NetSuite record. Supports single-record and batch operations.​
* **Record Transformation:** Transform records from one type to another (e.g., Sales Order to Invoice), when supported by NetSuite APIs.​

**Common Issues & Resolutions:**

| Issue                          | Resolution                                                      |
| ------------------------------ | --------------------------------------------------------------- |
| Invalid Credentials/Error 401  | Verify token and keys, ensure TBA settings match NetSuite       |
| Permission Denied/Error 403    | Check role and permissions – add missing types or upgrade role  |
| Metadata Refresh Fails         | Ensure REST Web Services is enabled and user has access         |
| Object Not Found/Field Missing | Confirm record/object type is supported and enabled in NetSuite |

### FAQ

* **Is real-time sync possible?**\
  Yes, the connector supports scheduled workflows depending on your triggers and mapping configuration.​
* **Can custom NetSuite records be synced?**\
  Yes, if they are enabled and mapped in both NetSuite and DBSync, and permissions are granted.
* **Is there a limit to how many records I can process?**\
  Subject to NetSuite API’s service limits and your subscription, design integrations for batch efficiency, where needed.

### Useful Links<br>

* [Salesforce and NetSuite Rest Order to Cash](https://docs.mydbsync.com/cloud-workflow/template-library/salesforce-and-netsuite-rest-order-to-cash)


---

# 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.mydbsync.com/cloud-workflow/connectors/netsuite-rest.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.
