NetSuite connection settings

Connection dialog

Devart Excel Add-in for NetSuite supports API Version1 and Version2 (the default). Select a version in API Version and an authentication method in Authentication Type:

  • Version2 - OAuth2, OAuth2Interactive, or TokenBased.
  • Version1 - Basic or TokenBased.

For OAuth2 and OAuth2Interactive, the dialog box displays Client Id, Client Secret, Refresh Token, and Sign In. For TokenBased, enter Consumer Key, Consumer Secret, Token Id, and Token Secret. See the following section for instructions on obtaining these credentials.

NetSuite requires two-factor authentication for highly privileged roles. Accounts with these roles cannot use Basic authentication.

Account Id is required for all authentication methods. Basic authentication also requires the following parameters:

1. Account Id - NetSuite account id. You can get the account id value in NetSuite Web Services Preferences. To open it, sign in to your NetSuite account. Then point to Setup, then to Integrations, and then click Web Services Preferences.

2. Application Id - The NetSuite CRM application ID created by using the integration record.

3. User Id - The NetSuite account email to login with.

4. Password - NetSuite account password.

To generate an Application Id, create an integration record in NetSuite:

1. Sign in to your NetSuite account.

2. Point to Setup, then to Integrations, then Manage Integrations, and then click New.

3. Enter an application name, such as Excel Add-in.

4. Make sure the Token Based Authentication checkbox is cleared and the User Authentication checkbox is selected.

5. Click Save.

6. Copy the generated Application ID. You can reuse it for multiple connections to the same NetSuite account.

Note

Devart Excel Add-in for NetSuite does not support fields containing arrays. Such fields are neither imported into Excel nor displayed in the add-in. If an array field is required to create a record, the affected object is read-only in the add-in.

The list of such objects, for example, includes all the transactions objects, because Excel Add-in for NetSuite cannot import their items. Here is the list of such objects: BinWorksheet, CashRefund, CashSale, Check, CreditMemo, Estimate, Invoice, Opportunity, PurchaseOrder, ReturnAuthorization, SalesOrder, TransferOrder, VendorBill, VendorCredit, VendorReturnAuthorization, WorkOrder, Deposit, InventoryAdjustment, InventoryTransfer, ItemSupplyPlan, JournalEntry, VendorPayment, SerializedAssemblyItem, ExpenseReport, ManufacturingRouting, PaycheckJournal, ManufacturingOperationTask, CustomerRefund, InventoryAdjustment, InventoryCostRevaluation, ManufacturingCostTemplate.

The add-in cannot write to these objects and cannot read some of their data.

Signing in again

If you need to sign in again, for example, because the refresh token is missing or has expired, Devart Excel Add-in for NetSuite automatically opens the sign-in window when testing the connection, such as when you click Test Connection. Sign in to continue. If you cancel, the connection is not established.

Advanced connection options

To open Advanced connection options, click the Advanced button in the Connection dialog box. Here you can set parameters for Token-based authentication and additional parameters to control connection behavior. For Token-based authentication, you need to set the Authentication parameter to TokenBased and specify values for the following parameters: Consumer Key, Consumer Secret, Token, Token Secret.

The following table describes the options that you can include in the Connection String using the Advanced Connection Editor dialog box:

Option Description
Account Date Format Specifies the date format configured in your NetSuite account, so that date values are correctly interpreted when reading and writing data.
Account Id Specifies the NetSuite account id.
Account Time Zone Specifies the time zone configured in your NetSuite account, which is used to correctly interpret date and time values.
API Version Determines the version of the NetSuite API to use.
Application Id Specifies the NetSuite CRM application ID created by using the integration record. Required for Basic authentication.
Authentication Type Determines authentication kind to use. It can be Basic or TokenBased. Note that highly privileged user accounts cannot be used for Basic authentication.
Client Id Specifies the client ID of the NetSuite integration record. The value is used for OAuth 2.0 authentication.
Client Secret Specifies the client secret of the NetSuite integration record. The value is used for OAuth 2.0 authentication.
Connection Lifetime Specifies the time span (in seconds), compared against a connection’s creation time when it is returned to the pool; the connection is destroyed if this span is exceeded. The default value is 0 (connection always returns to pool).
Connection Timeout Specifies the length of time (in seconds) to wait for a connection to the server before terminating the attempt and generating an error. The default value is 60.
Consumer Key Specifies the NetSuite consumer key from an integration record. It is required only for Token-Based authentication. Read how to obtain it below.
Consumer Key Secret Specifies the NetSuite consumer secret from an integration record. It is required only for Token-Based authentication. Read how to obtain it below.
Default Command Timeout Specifies the time in seconds to wait while trying to execute a command before terminating the attempt and generating an error.
Failover Retries Specifies the number of retry attempts to automatically re-run a command before displaying an error message in case when the command failed because of an error that may be temporary.
Initialization Command Specifies a database-specific command to execute after establishing the connection.
Language Specifies the language used to retrieve translatable NetSuite field and record labels.
Local SQL Engine Determines whether to use local SQL engine for SELECT queries, that are too complex to translate them directly to NetSuite API calls or to show an error message.
Max Pool Size Specifies the maximum number of connections allowed in the pool. Setting the Max Pool Size value in the connection string can affect performance. The default value is 100.
Min Pool Size Specifies the minimum number of connections allowed in the pool. The default value is 0.
NormalizeDbNames Determines whether database object names are normalized when retrieved from the database.
Password Specifies the NetSuite account password. Required for Basic authentication.
Persist Security Info Indicates if security-sensitive information, such as the password, is not returned as part of the connection if the connection is open or has ever been in an open state.
Pooling Draws the connection from the appropriate pool, or creates and adds it to the appropriate pool, when set to true. This is the default behavior.
Proxy Host Specifies the host name or IP address of the proxy server.
Proxy Password Specifies the password for the proxy server account.
Proxy Port Specifies the port number of the proxy server. The default value is 3128.
Proxy User Specifies the proxy server account name.
Readonly Indicates whether the connection is read-only (allows only SELECT statements).
Refresh Token Stores the OAuth 2.0 refresh token for NetSuite. The value is obtained automatically when you click Sign In.
Role Id Specifies the InternalId of the role for basic authentication that will be used to log in the user with limited permissions. If it is not specified, the user’s default role will be used.
Run Once Command Specifies a database-specific command to execute after establishing the connection. Unlike Initialization Command, it is not executed for connections obtained from the connection pool.
Token Id Specifies the authentication token, generated by a NetSuite user. It is required only for Token-Based authentication. Read how to obtain it below.
Token Secret Specifies the authentication token secret, generated by a NetSuite user. It is required only for Token-Based authentication. Read how to obtain it below.
Token Server Is not used for NetSuite.
Use Custom Fields Set this parameter to True if you need to work with custom fields of predefined NetSuite objects. However, please note that processing custom fields may take a substantial amount of time, and it’s better to leave the default False value if you don’t need to work with custom fields.
Use Custom Tables Set this parameter to True if you need to work with custom NetSuite objects. However, please note that processing custom objects may take a substantial amount of time, and it’s better to leave the default False value if you don’t need to work with custom NetSuite objects.
Use Custom Lists Set this parameter to True if you need to work with custom NetSuite lists. However, please note that processing them may take a substantial amount of time, and it’s better to leave the default False value if you don’t need to work with NetSuite custom lists.
Use Display Names Determines whether to use NetSuite field display names instead of internal names as column names.
User Id Specifies the NetSuite account email to login with. Required for Basic authentication.
UTC Dates Converts dates to UTC format during import when set to True; the date values entered by the user (in SELECT statements, etc.) are then considered UTC dates when sending them to the data source.

Obtaining parameters for token-based authentication

To use token-based authentication in NetSuite, you need to perform the following actions:

1. Enable token-based authentication in NetSuite. For this, perform the following actions:

1. Create a role with the necessary privileges for token-based authentication and access to the necessary objects and assign it to the user that will be used for authentication. You need to assign at least the “Web Services” and “User Access Tokens” privileges.

2. Create an integration record with Token-Based authentication enabled. For this:

1. Create Access Token.