Skip to main content

Netsuite SuiteQL (Beta)

This connector captures data from Oracle NetSuite into Estuary collections using SuiteQL.

To use SuiteAnalytics Connect to sync your data instead, see the Netsuite SuiteAnalytics connector.

Supported data resources

Currently, this connector supports a subset of NetSuite tables, such as:

  • Account
  • Customer
  • DeletedRecord
  • Item
  • Term
  • Transaction
  • TransactionHistory
  • TransactionLine
  • TransactionShippingAddress
  • TransactionStatus

If you need to capture a table that is not yet supported, contact support with the table name(s). Estuary support will be able to confirm availability and, if needed, add the table(s) to the connector.

Prerequisites

  • Oracle NetSuite account
  • Allowed access to all Account permissions options
  • A new integration with token-based authentication
  • A custom role with access to objects you want to capture. See setup.
  • A new user assigned to the custom role
  • Access token generated for the custom role

Setup

1. Create a NetSuite account

  1. Create an account on the Oracle NetSuite portal.

  2. Confirm your email address.

2. Enable SuiteQL

  1. Navigate to Setup > Company > Enable Features.

  2. Click the SuiteCloud tab.

  3. In the Manage Authentication section, check the checkbox labeled TOKEN-BASED AUTHENTICATION.

  4. Save your changes.

  5. Next, in the SuiteTalk (Web Services) section, check the checkbox labeled REST WEB SERVICES.

  6. Save your changes.

3. Find Your Account ID

Find your Realm, or Account ID. You'll use this to connect with Estuary.

  1. In your NetSuite portal, go to Setup > Company > Company Information.

  2. Copy your Account ID.

    If you have a production account, it will look like 2345678. If you're using a sandbox, it'll look like 2345678_SB2.

4. Generate Consumer Tokens

Create a NetSuite integration to obtain a Consumer Key and Consumer Secret.

  1. Navigate to Setup > Integration > Manage Integrations > New.

  2. Give the integration a name, for example, estuary-rest-integration.

  3. Make sure the State option is enabled.

  4. In the Authentication section, check the Token-Based Authentication checkbox.

  5. Save your changes.

Your Consumer Key and Consumer Secret will be shown once. Copy them to a safe place.

5. Set Up a Custom Role

  1. Go to Setup > Users/Roles > Manage Roles > New.

  2. Give the role a name, for example, estuary-integration-role.

  3. Scroll to the Permissions section.

  4. (IMPORTANT) Click Transactions and add all the dropdown entities with either full or view access level.

  5. (IMPORTANT) Click Reports and add all the dropdown entities with either full or view access level.

  6. (IMPORTANT) Click Lists and add all the dropdown entities with either full or view access level.

  7. (IMPORTANT) Click Setup and add all the dropdown entities with either full or view access level.

  8. (IMPORTANT) If you have multiple subsidiaries, make sure to select all of the subsidiaries you want the connector to have access to under the Role > Subsidiary Restrictions configuration.

To allow your custom role to reflect future changes, be sure to edit these parameters again when you rename or customize any NetSuite object.

6. Assign the Role to a User

  1. Go to Setup > Users/Roles > Manage Users.

  2. Find the user you want to give access to use with Estuary. In the Name column, click the user's name. Then, click the Edit button.

  3. Find the Access tab.

  4. From the dropdown list, select the role you created previously; for example, estuary-integration-role.

  5. Save your changes.

7. Generate User Access Tokens

  1. Go to Setup > Users/Roles > Access Tokens > New.

  2. Select an Application Name.

  3. Under User, select the user you assigned the role previously.

  4. Under Role, select the role you assigned to the user previously.

  5. Under Token Name, give a descriptive name to the token you are creating, for example estuary-rest-integration-token.

  6. Save your changes.

Your Token ID and Token Secret will be shown once. Copy them to a safe place.

You now have a properly configured account with the correct permissions and all the information you need to connect with Estuary:

  • Realm (Account ID)
  • Consumer Key
  • Consumer Secret
  • Token ID
  • Token Secret

Configuration

You configure connectors either in Estuary's web app, or by directly editing the catalog specification file. See connectors to learn more about using connectors. The values and specification sample below provide configuration details specific to the NetSuite source connector.

Properties

Endpoint

PropertyTitleDescriptionTypeRequired/Default
/accountNetsuite Account IDNetsuite realm/Account ID e.g. 2344535, as for production or 2344535_SB1, as for sandboxstringRequired
/authenticationAuthentication DetailsCredentials to access your NetSuite accountobjectRequired
/tablesTablesList of tables to capture with their keysarray of objects, each containing a string name and array of keysDefaults to all supported data resources
/advancedAdvancedAny advanced options to use for the connectorobject

Authentication Config

PropertyTitleDescriptionTypeRequired/Default
/authentication/consumer_keyConsumer KeyConsumer key associated with your integration.stringRequired
/authentication/consumer_secretConsumer SecretConsumer secret associated with your integration.stringRequired
/authentication/token_idToken IDAccess token IDstringRequired
/authentication/token_secretToken SecretAccess token secretstringRequired

Advanced Config options

PropertyTitleDescriptionTypeRequired/Default
/advanced/connection_limitConnection LimitThe maximum number of concurrent data streams to NetSuite.int2

Bindings

PropertyTitleDescriptionTypeRequired/Default
/nameNameThe name of the table this binding refers tostringRequired
/intervalIntervalHow frequently to check for incremental changesISO8601 DurationPT1H (1 Hour)
/scheduleScheduleSchedule to automatically rebackfill this binding. Accepts a cron expression.string
/page_cursorPage CursorCursor field for paginated backfillsstringDefaults to first key field
/columnsColumnsList of columns to select. Empty means SELECT * (fails silently if >100 columns).string array[]
/query_limitQuery LimitNumber of rows to fetch per query pageint10000

Sample

captures:
${PREFIX}/${CAPTURE_NAME}:
endpoint:
connector:
image: ghcr.io/estuary/source-netsuite-suiteql:dev
config:
account: "12345678"
authentication:
consumer_key: xxx
consumer_secret_sops: xxx
token_id: xxx
token_secret_sops: xxx
tables:
- name: transaction
keys: [id]
advanced:
connection_limit: 2
bindings:
- resource:
name: transaction
interval: PT1H
page_cursor: id
columns: []
query_limit: 10000
target: ${PREFIX}/${CAPTURE_NAME}/transaction
{...}