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

# NetSuite

## Introduction

Qobra connects to NetSuite with Token-Based Authentication (TBA), through the
SuiteTalk REST web services.

The integration is used to synchronize your NetSuite records into Qobra data
tables, and optionally to import your users from NetSuite employees. It is
read-only and does not write anything to your NetSuite account.

## Setup

The setup is done by a NetSuite administrator.

### 1. Enable the features

Go to **Setup > Company > Enable Features**:

* **SuiteCloud** subtab: check **REST Web Services** and
  **Token-Based Authentication**.
* **Analytics** subtab: check **SuiteAnalytics Workbook**.

### 2. Create a role for Qobra

Go to **Setup > Users/Roles > Manage Roles > New** and create a role
dedicated to Qobra, with the following permissions:

| **Subtab** | **Permission** | **Level** |
| - | - | - |
| Setup | Log in using Access Tokens | Full |
| Setup | REST Web Services | Full |
| Reports | SuiteAnalytics Workbook | Edit |
| Transactions, Lists | Each record you want to import in Qobra | View |

For instance, add `Sales Order`, `Invoice` or `Customer` with the View level
if you want to import these records.

Do not use the Administrator role: Oracle advises against it for web services
integrations.

See NetSuite's documentation:
[Prerequisites and Setup for REST Web Services](https://docs.oracle.com/en/cloud/saas/netsuite/ns-online-help/article_5085602973.html).

#### User import permissions

These permissions are optional: add them to the role only if you want to
import your users from NetSuite employees.

| **Subtab** | **Permission** | **Level** |
| - | - | - |
| Lists | Employees | View |
| Lists | Employee Record | View |
| Lists | Perform Search | View |

Without them, Qobra cannot read your employees and the user import from
NetSuite stays empty. See NetSuite's documentation:
[Employee record in REST web services](https://docs.oracle.com/en/cloud/saas/netsuite/ns-online-help/section_161886175135.html).

### 3. Create a user for Qobra

Create a user dedicated to Qobra (**Lists > Employees > New**). On its
**Access** subtab, give it access to NetSuite and assign it the role created
at step 2.

### 4. Create an integration record

Go to **Setup > Integration > Manage Integrations > New**, name it `Qobra`,
and under **Authentication** check **Token-Based Authentication**. Save: the
**Consumer Key** and **Consumer Secret** are displayed. See NetSuite's
documentation:
[Create Integration Records for Applications to Use TBA](https://docs.oracle.com/en/cloud/saas/netsuite/ns-online-help/bridgehead_4249032125.html).

### 5. Create an access token

Go to **Setup > Users/Roles > Access Tokens > New**, and select the `Qobra`
application, the user created at step 3 and the role created at step 2. Save:
the **Token ID** and **Token Secret** are displayed. See NetSuite's
documentation:
[Access Token Management – Create and Assign a TBA Token](https://docs.oracle.com/en/cloud/saas/netsuite/ns-online-help/bridgehead_4254081947.html).

<Warning>
  NetSuite displays the consumer and token secrets only once, at creation.
  Copy them right away: if you lose them, you will have to generate new ones.
</Warning>

### 6. Fill in the connection modal in Qobra

The base URL and the account ID are both on
**Setup > Company > Company Information**.

| **Field** | **Where to find it** |
| - | - |
| `Base URL` | **Company URLs** subtab, **SuiteTalk** URL |
| `Account ID` | **Account ID** field |
| `Consumer key` | Integration record, step 4 |
| `Consumer secret` | Integration record, step 4 |
| `Token ID` | Access token, step 5 |
| `Secret token` | Access token, step 5 |

The `Base URL` follows the format
`https://[ACCOUNT-ID].suitetalk.api.netsuite.com`. See NetSuite's
documentation:
[URLs for Account-Specific Domains](https://docs.oracle.com/en/cloud/saas/netsuite/ns-online-help/section_1498251763.html).

<Note>
  For a sandbox, the account ID is written differently in the two fields:

  * `Base URL`: lowercase with a hyphen, e.g.
    `https://1234567-sb1.suitetalk.api.netsuite.com`
  * `Account ID`: uppercase with an underscore, e.g. `1234567_SB1`

  The `Base URL` is never the URL of the NetSuite interface
  (`app.netsuite.com`).
</Note>

[Contact Qobra support](mailto:support@qobra.co) for more information.


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