Integrating with NetSuite
You connect NetSuite yourself with token-based authentication (TBA): create an integration and an access token in NetSuite, then enter five values in Drivetrain. Saved searches are optional and need a small script in NetSuite.
Before you start
In Drivetrain: you need to be an admin.
In NetSuite: a NetSuite administrator does the setup below. The connection itself should use a dedicated integration user with its own role. The Administrator role also works, but Oracle advises against it for web services integrations.
Features to enable at Setup > Company > Setup Tasks > Enable Features:
SuiteCloud subtab: REST Web Services and Token-based Authentication (under Manage Authentication). For saved searches, also SOAP Web Services, Client SuiteScript and Server SuiteScript.
Analytics subtab: SuiteAnalytics Workbook.


Permissions for the integration role (Drivetrain only reads data):
Setup
Log in using Access Tokens
Full
All
Setup
REST Web Services
Full
All
Reports
SuiteAnalytics Workbook
Edit
All
Setup
User Access Tokens
Full
Only if the integration user creates its own token
Setup
SOAP Web Services
Full
Saved searches
Lists
Documents and Files
Full
Saved searches
The role also needs view access to every record Drivetrain syncs (see What data comes in), including each transaction type you plan with (for example journal entries, invoices and bills), consolidated exchange rates, accounting periods and deleted records. If you use subsidiaries or multiple accounting books, give the role All subsidiaries with Allow Cross-Subsidiary Record Viewing, and all accounting books. Integrating with NetSuite (Role Based Access) has a complete role sheet you can copy; it grants more than this minimum, which also works.
Step 1: Set up NetSuite
1. Create the integration user
Create the role at Setup > Users/Roles > Manage Roles > New, with the permissions above.
Go to Lists > Employees > Employees > New.

Select the Standard Employee Form, enter the name "Drivetrain Integration" and a service-account email from your own domain (for example
drivetrain@mycompany.com).

On the Access subtab, check Give Access, set a password, add the role you created (the screenshot shows Administrator) and click Save.

2. Create an integration
Go to Setup > Integration > Manage Integrations > New.

Enter a Name (for example "Drivetrain Integration"). Under Authentication, check TOKEN-BASED AUTHENTICATION and uncheck TBA: AUTHORIZATION FLOW. In OAuth 2.0, uncheck AUTHORIZATION CODE GRANT. Click Save.

Under Client Credentials at the bottom of the page, copy the Consumer Key and Consumer Secret. NetSuite shows them only once.

3. Create an access token
Log in to NetSuite as the integration user and click the Home icon.


At the bottom of the Settings list, click Manage Access Tokens, then New My Access Token. The link only appears if Token-based Authentication is enabled and the role has User Access Tokens. An administrator can instead create the token at Setup > Users/Roles > Access Tokens > New.


In APPLICATION NAME, select the integration from step 2 and click Save.

Copy the Token ID and Token Secret. NetSuite shows them only once.

4. Find your account ID
Go to Setup > Company > Company Information and copy the Account ID (for example
1234567, or1234567_SB1for a sandbox).

5. Install the saved search script (only for saved searches)
Download the script from https://highway-cdn.drivetrain.ai/scripts/DrivetrainSavedSearch.zip and unzip it.
Go to Customization > Scripting > Scripts > New. The Upload Script File form opens.

Hover over the Script File field and click the + button that appears. Pick a folder if you don't want the default (SuiteScripts), click Choose File, select the unzipped file and click Save.


Click Create Script Record. Enter Name "Drivetrain Saved Search" and ID "drivetrainsavedsearch". On the Deployments tab, enter Title "DrivetrainSavedSearch" and set the status to Released. Click Save.


Click the deployment title to open the Script Deployment, and copy the External URL.


Edit the deployment, add the integration user's role to its audience (the screenshot shows Administrator) and click Save.

Go to Documents > Files > File Cabinet > New and add a folder named DrivetrainExports at the root. The script writes each export there.


Step 2: Connect NetSuite in Drivetrain
On the Data page, click the + icon at the top of the Data panel (or Add data source if nothing is connected yet).

Select NetSuite.

Enter Account ID, Consumer key, Consumer secret, Token key (NetSuite's Token ID) and Token secret, and click Connect. Connect stays disabled until every field is filled.

Drivetrain tests the credentials, opens the new NetSuite data source and starts the first sync.

Add a saved search (optional)
Add saved searches after the first sync finishes. Each saved search must be visible to the integration role (for example Public), and you need the External URL from Step 1.5.
On the NetSuite data source, click Add data (it may read Add saved search).

Enter the External URL (if it isn't already filled in), paste the full Saved search URL and enter a Display name. For example, paste https://123456.app.netsuite.com/app/common/search/searchresults.nl?searchid=884&whence=, not just the ID 884.

Click Create. The saved search appears as a dataset once it syncs.
What data comes in
Accounts, accounting periods, consolidated exchange rates, currencies, customers, departments, classes, locations, subsidiaries, vendors, items, transactions, transaction lines, transaction accounting lines and deleted records. Drivetrain builds standard NetSuite datasets from them, such as General Ledger and Trial Balance.
The first sync pulls all transactions. Later syncs pull only records changed since the last sync.
Each saved search is exported in full on every sync.
Data syncs daily by default. Use Sync in the data source's menu to sync now, or Sync schedule to change the schedule.
Update credentials or disconnect
NetSuite tokens don't expire, but they stop working if they're revoked or the user, role or integration changes. To enter a new token, open the data source's menu, choose Edit credentials, enter the values and click Update credentials. A full sync starts. You can't edit while a sync is running, or switch to a different NetSuite account.
To disconnect, choose Remove and confirm. To also cut access on the NetSuite side, revoke the token at Setup > Users/Roles > Access Tokens.
Your Drivetrain team may ask for read-only access to the NetSuite UI during onboarding to check numbers. This isn't needed for the connection.
Troubleshooting
Last updated
Was this helpful?
