# NetSuite

## **Prerequisites**

* A NetSuite administrative account
* The [SuiteAnalytics Connect Service](https://docs.oracle.com/cloud/latest/netsuitecs_gs/NSALC/NSALC.pdf) enabled
* A NetSuite login email
* A NetSuite password
* A list of permissions required for the NetSuite tables you want to sync

## **Setup Instructions**

### **Task 1: Create a Role**

1. On the menu bar at the top of your NetSuite dashboard, select **Setup** -> **Users/Roles** -> **Manage Roles** -> **New** to create a new role for Daton.

![](https://15515196-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LbJ1eMq5M51cIpU163R%2Fuploads%2FzmI9j7A1StW8DN2WAjFn%2FPicture1.png?alt=media\&token=4d2ea708-310f-4b5e-a8c3-e7366cc953d2)

2\. Enter a memorable name in the **Name** input field for the role. (We recommend "Daton.")

![](https://15515196-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LbJ1eMq5M51cIpU163R%2Fuploads%2F1q4Qc8x4NcojkWJSynHr%2FPicture1.png?alt=media\&token=39c44afe-eed4-497a-8a3f-77d23279f308)

### Task 2: Set system-wide permissions for the role

1. In your NetSuite dashboard, after you have named the role, scroll down to the bottom of the page to set permissions for the role. You must first set system-wide permissions.
2. Select **Permissions** -> **Setup** near the bottom of the page and expand the drop-down menu to set system-wide permissions.

![](https://15515196-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LbJ1eMq5M51cIpU163R%2Fuploads%2FYQQUY3gGXMqEnQ3hEuVv%2FPicture1.png?alt=media\&token=0f4f63aa-4fc6-49d3-880a-dd1c2821bc64)

3\. To add the required system-level permissions, select each of the following permissions from the drop-down menu and click Add:

a. Custom Body Fields\
&#x20;b. Custom Column Fields\
&#x20;c. Custom Entity Fields\
&#x20;d. Custom Event Fields\
&#x20;e. Custom Item Fields\
&#x20;f.  Custom Record Types\
&#x20;g. Deleted Records\
&#x20;h. SOAP Web Services\
&#x20; i. SuiteAnalytics Connect

![](https://15515196-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LbJ1eMq5M51cIpU163R%2Fuploads%2FVl2CNKSxi6tGs8cLYdbq%2FPicture1.png?alt=media\&token=2a626f97-d86f-4dc2-8f77-6d17f15bf4e5)

### Task 3: Set table permissions

1. 1\.    In your NetSuite dashboard, select Setup -> Users/Roles -> Manage Roles, and then click Edit beside the relevant role's name on the Manage Roles page displayed.

![](https://15515196-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LbJ1eMq5M51cIpU163R%2Fuploads%2F0H8cwuAiy1nnugcHQPyM%2FPicture1.png?alt=media\&token=71fa3a8f-6614-4f57-b937-47bdcdf177f6)

2\. Select the permissions for the tables you wish to add. You will find these permissions under either the **Transactions**, **Lists**, **Setup** or **Custom Record** subcategories, depending on the types of tables.

![](https://15515196-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LbJ1eMq5M51cIpU163R%2Fuploads%2F5r1p1W6vPtZyNdCF2Hva%2FPicture1.png?alt=media\&token=6ea8b93d-86ba-4967-9cf2-725022b57aa1)

3\. Select the required permissions and click **Add**. By default, table permissions should have the **View** permission level, that is, be read-only.

![](https://15515196-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LbJ1eMq5M51cIpU163R%2Fuploads%2FmbxmU4uOUmcBZxK7A4tE%2FPicture1.png?alt=media\&token=6e03d8ce-b213-4acc-b14a-38330fc1fd91)

4\. After you have added the permissions, click Save.

![](https://15515196-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LbJ1eMq5M51cIpU163R%2Fuploads%2FnPCJdAbnbFctFYcRpf2C%2FPicture1.png?alt=media\&token=2596a454-a940-4d50-baaf-686e91e5ecf8)

### Task 4: Get the Role ID

![](https://15515196-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LbJ1eMq5M51cIpU163R%2Fuploads%2FX1ZS19ph7Gastoxs9V5F%2FPicture1.png?alt=media\&token=0a88498a-c781-442b-9020-8b08a040cccd)

*NOTE: The **Internal ID** column may be not displayed in the role list table. In this case, you need to customize the table view by clicking **Edit View** and adding the **Internal ID** field to the displayed field set*

### Task 5: Connect the role to the user

1\.    Decide which NetSuite user you want to connect to Daton. It is best to create a dedicated user for the Daton role because only one connection at a time is allowed by a given user. A connection conflict will cause your Daton sync to fail.

2\.    On the menu bar at the top of the NetSuite dashboard, select **Setup** -> **Users/Roles** -> **Manage Users**.

![](https://15515196-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LbJ1eMq5M51cIpU163R%2Fuploads%2F2mLcxKiNjKqehfRVlOhg%2FPicture1.png?alt=media\&token=b121a8c8-6e4a-401f-80a4-7692bca97fc5)

3\. Select the user you would like Daton to use.

![](https://15515196-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LbJ1eMq5M51cIpU163R%2Fuploads%2F8NADNL6D3VuEmySgYOY7%2FPicture1.png?alt=media\&token=91e1b280-6f4e-497d-ab41-0f499985a90f)

4\. Click Edit

![](https://15515196-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LbJ1eMq5M51cIpU163R%2Fuploads%2FfR46VZpIx6Tz9AT0mxuT%2FPicture1.png?alt=media\&token=753c18ce-57be-40e7-999e-d19f10c1feac)

5\. Scroll-down slightly and select the **Access** tab.

6\. Make sure the **Give Access** box is checked.

![](https://15515196-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LbJ1eMq5M51cIpU163R%2Fuploads%2FWOb3TOWKrAniByF7ui5n%2FPicture1.png?alt=media\&token=32759816-48d5-46de-b008-174119a31c97)

7\. Expand the **Role** drop-down list on the **Roles** tab and select the **Daton** role. Then click **Add** and **Save**.

### Task 6: Find your service host, port, and account ID

1. From the homepage of your NetSuite account, find the **Settings** module and select **Set Up SuiteAnalytics Connect**.
2.

![](https://15515196-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LbJ1eMq5M51cIpU163R%2Fuploads%2F3Wm8RCEL13QZYwN5SJkn%2FPicture1.png?alt=media\&token=c190ceb1-fca8-441e-a47f-24b75f99a671)

2\. Click on **Your Configuration**, and your service host, port and account ID information will appear.

![](https://15515196-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LbJ1eMq5M51cIpU163R%2Fuploads%2FsJuDr9sFgsjNLtJyTvJ6%2FPicture1.png?alt=media\&token=9282763e-0d05-454d-b868-592535eff437)

3\. Make a note of your host, port, and account ID. You will need them to configure Daton.

### Task 7: Create Other Authentication Credentials

1. [Client Credentials (Consumer Key and Consumer Secret)](#client-credentials)
2. [User Access Tokens](#user-access-tokens)

#### Client Credentials&#x20;

1. In NetSuite, navigate to **Setup** and click **Integration**. Now under **Manage Integrations**, click **New**. (*Setup > Integration > Manage Integrations > New)*
2. On the Integration page, perform the following:&#x20;

   1. Enter a Name for the integration record.&#x20;
   2. On the **Authentication** tab:
      * Enable Token-Based Authentication by checking the corresponding box.
      * Enable TBA: Authorization Flow by checking its box.
   3. Setup the rest as per requirements.

   <figure><img src="https://15515196-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LbJ1eMq5M51cIpU163R%2Fuploads%2FvuUSe6UClItsdY9nRAT6%2Fnetsuite.png?alt=media&#x26;token=9dc300d2-18c4-435d-b9bf-55bd8864e880" alt=""><figcaption></figcaption></figure>
3. Click **Save** to complete the setup.\
   On the **Confirmation Page**, you will find the Client Credentials, including the **Consumer Key** and **Consumer Secret**.&#x20;

Please note that the system displays the client ID and client secret only the first time you save the integration record. Ensure that you securely record and store these values as you will need them for subsequent steps in the integration process to maintain the security and functionality of your Daton integration with NetSuite.

#### &#x20;User Access Tokens&#x20;

1. Log in with a role that has the User Access Token permission.
2. Navigate to **Settings**, locate, and click **Manage Access Tokens**.&#x20;

   <figure><img src="https://15515196-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LbJ1eMq5M51cIpU163R%2Fuploads%2FaCqvbzld4L6yBGuxRjfb%2FNetSuite%20token.png?alt=media&#x26;token=487226d8-4bcc-4705-951f-30e184d7c3c3" alt="" width="321"><figcaption></figcaption></figure>
3. The My Access Tokens page will appear, where all the tokens associated with the current user and role are listed.
4. Click on **New My Access Token** to create a new token.&#x20;

   <figure><img src="https://15515196-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LbJ1eMq5M51cIpU163R%2Fuploads%2FZOci0pgUjDeR4xY6Ya7g%2FNetSuite%20token1.png?alt=media&#x26;token=4cd7d3ab-08fd-4002-a579-ffcae27afefc" alt=""><figcaption></figcaption></figure>
5. The **Access Token** page will appear. On the Access Token page, perform the following and click **Save**.&#x20;

   * Choose the desired **Application Name**.
   * By default, the **Token Name** is auto-populated with a combination of the Application Name, User, and Role. Optionally, you can provide a custom name for this token.

   <figure><img src="https://15515196-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LbJ1eMq5M51cIpU163R%2Fuploads%2FtPV5BCylsLCs4AMnYBhA%2FNetSuite%20token2.png?alt=media&#x26;token=e2d0cff6-e498-47c6-9bf9-cbaee591fabe" alt="" width="375"><figcaption></figcaption></figure>

Please note that the "Token ID" and "Token Secret" values are only visible on this confirmation page. Once you navigate away from this page, you will not be able to retrieve these credentials from the system. If you lose or forget these credentials, you will need to create a new token to obtain new values.

### Task 8: Finish Daton configuration&#x20;

1. [Log in](https://daton.sarasanalytics.com/login) to your existing Daton account and search for NetSuite in the list of Connectors, then click **Configure**.
2. Enter the following details and click **Authenticate**:&#x20;

   * Integration Name&#x20;
   * Replication Frequency&#x20;
   * Replication Start Date&#x20;

   **Note** that the Integration Name will be used to create the integration tables and cannot be modified later.
3. Provide the following Authentication credentials and click **Next**.

   * Service Host
   * Service Port
   * Service Datasource Name
   * Account ID
   * Role ID
   * Email
   * Password\
     To know where to find these details, see [Find your service host, port, and account ID](#task-6-find-your-service-host-port-and-account-id).

   Optionally, you can click on the Token from the Authentication Type dropdown to enable Token-based Authentication. In that case, provide the following additional details:

   * Client ID
   * Client Secret
   * Token ID&#x20;
   * Token Secret\
     To know where to find these details, see [Create Other Authentication Credentials](#task-7-create-other-authentication-credentials).
4. Post Database Authentication, you will be prompted to choose schemas from the list. **Select** the desired Schemas and click **Next.** &#x20;
5. **Select** all the Tables as per requirement and **Configure** the schema that you wish to create in the destination before clicking the **Next** button. <br>

   Note:&#x20;

   * You will have to check at least one Table from each of the previously selected Schemas to proceed further.&#x20;
   * You can also customize the replication frequency and replication start date of each desired table separately. You may find this functionality under the advanced settings of every selected table.
6. Select all the Columns you require for each table and **Submit** the integration.&#x20;

   It's recommended to select a replication field for each of the tables. Selecting **'None'** will lead to full table replication. Learn more about [Replication Fields](https://daton-sarasanalytics.gitbook.io/daton/platform/features/data/data-replication-in-daton/replication-fields) here.

   <figure><img src="https://15515196-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LbJ1eMq5M51cIpU163R%2Fuploads%2FLKk3uVWN3etl29L1MAk0%2FRedshift%20Source.png?alt=media&#x26;token=09b5d5ed-79d9-4ab8-9d0e-b511e49afe0f" alt="" width="375"><figcaption></figcaption></figure>

   **Note** that you will be prompted to select the destination for your Database.
7. Select the destination for your source and click **Confirm**. An integration successful message will be displayed.

## Important Note

* Integrations would begin in the Pending state and change to the Active state once the first job successfully loaded data into the configured warehouse.&#x20;
* Users can check job status and process logs from the integration details page by clicking on the integration name in the active list.&#x20;
* Users can Re-Authenticate, Edit, Clone, Pause, or Delete the integration at any moment by clicking on settings. You can also adjust the frequency and history of the integration.&#x20;
* On the Sources page, click Integration to access each table in your integration. The page also shows the state of each table, the last replicated time, and the Reload access buttons.&#x20;
