NetSuite SuiteTalk REST
This connector captures data from Oracle NetSuite into Flow collections. It connects to the NetSuite Analytics Data Warehouse using the SuiteQL REST endpoint and a custom role.
It is available for use in the Flow web application.
SuiteAnalytics vs SuiteQL via REST API
These two different connection modes have some key differences:
SuiteAnalytics Connect
- Requires the SuiteAnalytics Connect feature to be purchased on your NetSuite account
- Can inspect which tables (standard & custom) exist in your account
- Can inspect the exact data types specified on these table columns
- This means you can connect to any table in your account and all fields (booleans, date, and datetimes) are properly formatted in Estuary
SuiteQL via REST API
- Custom tables are not supported without manual work
- Some standard tables may not yet be supported and will require additional work from the Estuary team
- Datetime values are represented as dates without the time specification (this is a limitation of the REST API)
- Data types on custom columns may not be properly represented
- You are repsonsible for determining the right set of permissions to grant the connector, which can often be complicated and unintuitive
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 or a purchased SuiteAnalytics Module. See setup.
- A new user assigned to the custom role
- Access token generated for the custom role
General Setup
Set up required features on your NetSuite account
-
Find your Account ID (also know as the "Realm"). You'll use this to connect with Flow.
-
In your NetSuite portal, go to Setup > Company > Company Information.
-
Copy your Account ID.
If you have a production account, it will look like
2345678
. If you're using a sandbox, it'll look like2345678_SB2
.
-
-
Enable the required features.
-
Navigate to Setup > Company > Enable Features.
-
Click the SuiteCloud tab.
-
In the Manage Authentication section, check the checkbox labeled TOKEN-BASED AUTHENTICATION.
-
If you are using the SuiteQL connection, in the SuiteTalk (Web Services) section, check the checkbox labeled REST WEB SERVICES.
-
Save your changes.
-
If you are using SuiteAnalytics Connect, navigate to Setup > Company > Analytics > Connectivity and check the checkbox labeled SuiteAnalytics Connect.
-
Save your changes.
-
-
Create a NetSuite integration to obtain a Consumer Key and Consumer Secret.
-
Navigate to Setup > Integration > Manage Integrations > New.
-
Give the integration a name, for example,
estuary-netsuite-integration
. -
Make sure the State option is enabled.
-
In the Authentication section, check the Token-Based Authentication checkbox.
-
Save your changes.
Your Consumer Key and Consumer Secret will be shown once. Copy them to a safe place. They will never show up again and will be key to the integration working properly.
-
-
If you are using the SuiteQL over REST API connection, Set up a role for use with Flow.
-
Go to Setup > Users/Roles > Manage Roles > New.
-
Give the role a name, for example,
estuary-integration-role
. -
The easiest thing to do here is to click "Core Administrative Permissions". If you want to scope down the permissions given to the connector (which you should) you'll have to determine which permissions are necessary. This is challenging because many different settings and configurations can expand the required permissions. Check out this repository for help with determining exactly which permissions are required in your case.
-
Scroll to the Permissions section.
-
(IMPORTANT) Click Transactions and add all the dropdown entities with either full or view access level.
-
Find Transaction
-
(IMPORTANT) Click Setup an add the following entities with either full or view access level.
- Log in using Access Tokens
- REST Web Services
- User Access Tokens
To allow your custom role to reflect future changes, be sure to edit these parameters again when you rename or customize any NetSuite object.
-
-
If you are using SuiteAnalytics Connect you don't need a custom role. Instead, you can use the bundled "Data Warehouse Integrator"
-
Set up user for use with the connector.
-
Go to Setup > Users/Roles > Manage Users.
-
Find the user you want to give access to use with Flow. In the Name column, click the user's name. Then, click the Edit button.
-
Find the Access tab.
-
From the dropdown list, select either role you created previously (e.g.
estuary-integration-role
) or the Data Warehouse Integrator role if you are using SuiteAnalytics Connect. -
Save your changes.
-
-
Generate an access token.
-
Go to Setup > Users/Roles > Access Tokens > New.
-
Select the Application Name you created earlier.
-
Under User, select the user you assigned the role previously.
-
Under Role, select the role you assigned to the user previously.
-
Under Token Name, give a descriptive name to the token you are creating, for example
estuary-rest-integration-token
. -
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 Flow:
- Account ID (Realm)
- Consumer Key
- Consumer Secret
- Token ID
- Token Secret
Configuration
You configure connectors either in the Flow 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
Property | Title | Description | Type | Required/Default |
---|---|---|---|---|
/account_id | Realm | Netsuite realm e.g. 2344535, as for production or 2344535_SB1, as for the sandbox | string | Required |
/start_date | Token Secret | The date to start collecting data from | date | Required |
/consumer_key | Consumer Key | Consumer key associated with your integration. | string | Required |
/consumer_secret | Consumer Secret | Consumer secret associated with your integration. | string | Required |
/token_key | Token Key | Access token key | string | Required |
/token_secret | Token Secret | Access token secret | string | Required |
Bindings
Property | Title | Description | Type | Required/Default |
---|---|---|---|---|
/stream | Stream | Resource of your NetSuite project from which collections are captured. | string | Required |
/syncMode | Sync Mode | Connection method. | string | Required |
Sample
captures:
${PREFIX}/${CAPTURE_NAME}:
endpoint:
connector:
image: ghcr.io/estuary/source-netsuite:dev
config:
account_id: <your account id>
consumer_key: <key>
consumer_secret: <secret>
token_key: <key>
token_secret: <secret>
start_date: "2023-11-01T00:00:00Z"
bindings:
- resource:
stream: Transaction
target: ${PREFIX}/Transaction
{...}