Integrating with NetSuite (Role Based Access)
NetSuite setup Step 1: Create a new role Step 2: Assign relevant permissions Step 3: Create a user and assign the above role to that user Step 4: Create an integration Step 5: Generate the token key and token secret Step 6: Get account ID Step 7: Set up NetSuite saved search
Drivetrain setup Step 1: Navigating to the NetSuite connector Step 2: Entering credentials Step 3: Add saved searches (optional)
Prerequisites
To connect NetSuite to Drivetrain, you need:
An active Oracle NetSuite account, and a NetSuite Administrator to do the setup below
Admin access in Drivetrain
This page sets up a dedicated role with only the permissions Drivetrain needs. The main NetSuite guide uses the Administrator role instead.
NetSuite setup
Step 1: Create a new role
Sign in to your NetSuite instance. Make sure you are logged in as an Administrator.
From the menu bar, navigate to Setup > Users/Roles > User Management > Manage Roles > New.
On the Role page, enter a name for the role, make sure Accounting Center is selected as the CENTER TYPE, and click Save.
If you have subsidiaries enabled, select ALL subsidiaries and ALLOW CROSS SUBSIDIARY RECORD VIEWING.

Select ALL Accounting Books.

Step 2: Assign relevant permissions
Now add permissions for the role as per the List of Permissions with Levels given below. The exact list may vary depending on the fields required for metric calculations specific to your use cases.
Transactions and Lists fields require 'View' permission.
Reports fields require 'View' permission. However, Report Customization requires 'Full' access.
Setup fields require 'Full' access.
Go to Setup > Company > Setup Tasks > Enable Features and, on the SuiteCloud subtab, check:
REST Web Services (SuiteTalk (Web Services) section), and SOAP Web Services if you'll import saved searches
Token-based Authentication (Manage Authentication section)
SuiteAnalytics Workbook (on the Analytics subtab)
Client SuiteScript and Server SuiteScript (SuiteScript section), if you'll import saved searches

Step 3: Create a user and assign the above role to that user
From the menu bar, navigate to Lists > Employees > Employees > New.
Enter a name and an email address for the integration user. Use your company's own service-account email where possible (for example,
drivetrain@yourcompany.com); otherwise use the email your customer success manager gives you.

Click the Access subtab.
Check Give Access and Send Notification Email.
Assign a password of your choice.
Select the role you created in Step 1 and click Add.

Click Save.
Step 4: Create an integration
From the menu bar, navigate to Setup → Integration → Manage Integrations → New.
On the Integration page:
Fill in the Name field. We recommend using "DrivetrainIntegration".
On the Authentication subtab, check TOKEN-BASED AUTHENTICATION, and uncheck TBA: AUTHORIZATION FLOW and USER CREDENTIALS.
In the OAuth 2.0 section, uncheck AUTHORIZATION CODE GRANT.

Click Save.
After you've saved the settings above, scroll down to the bottom of the page to get:
Consumer Secret
Consumer Key
Step 5: Generate the token key and token secret
Log in to NetSuite with the user account you set up in Step 3.

Click the Home icon.

Scroll to the bottom.
Click Manage Access Tokens.

Click New My Access Token.

In the dropdown list for APPLICATION NAME, select the integration you created in Step 4.

Click Save. The confirmation page shows, only once:
Token ID (enter it in Drivetrain's Token key field)
Token Secret
Step 6: Get account ID
From the menu bar, navigate to Setup → Company → Company Information.
You will find the Account ID here. Please note it down.
If you won't import saved searches, skip to Drivetrain setup.
Step 7: Set up NetSuite saved search
Only needed if you plan to import NetSuite saved searches as datasets. Drivetrain always syncs the standard NetSuite tables; each saved search is added as an extra dataset.
Download the script from https://highway-cdn.drivetrain.ai/scripts/DrivetrainSavedSearch.zip and unzip it.
To install the script, navigate to Customization > Scripting > Scripts > New. You'll see the Upload Script File form.

Hover over the Script File field, and you'll see a + button appear to the right of the field. Click the button and the File upload form will appear.

By default, the script will be uploaded to the SuiteScripts folder in your File Cabinet (or to the last folder that you uploaded a script to). If you'd like to install the script in an alternative folder, select it from the Folder field.
Next, click the Choose File button in the Select File field. Then navigate to the folder that you unzipped the file to, and select the file.
Then click the Save button. The file will be uploaded, and then the Upload Script File form will reappear, with the Script File field loaded.

Upon saving, the script file will be populated in the Upload Script File form. Click the Create Script Record button. The Script form will appear.

In the script form, enter Name as "Drivetrain Saved Search" and ID as "drivetrainsavedsearch". Click the Deployments tab and enter the Title as "DrivetrainSavedSearch".
Mark the status as Released.

Click Save to finish the installation process.
After saving, click on the Deployment title to view the Script Deployment form.

Make a note of the External URL. You'll enter it in Drivetrain when you add a saved search.
Edit the Script Deployment, update the role for the script to the role you created in Step 1, and click Save.

Go to File Cabinet and select New Folder.


Add a folder named DrivetrainExports in the root of the File Cabinet and click Save.

Drivetrain setup
Step 1: Navigating to the NetSuite connector
Sign in to Drivetrain as an Admin and open the Data page.
Click + next to Data (or Add data source if nothing is connected yet).

In Connect a data source, select NetSuite.

Step 2: Entering credentials
Enter the values from the NetSuite setup and click Connect:
Account ID (starts with a number)
Consumer key and Consumer secret (Step 4)
Token key (the Token ID from Step 5) and Token secret

Drivetrain opens the new NetSuite connection on the Data page. Once the sync is complete, you'll see your NetSuite data.
Drivetrain syncs standard NetSuite tables, including Account, AccountingPeriod, Classification, ConsolidatedExchangeRate, Currency, Customer, DeletedRecord, Department, Location, Subsidiary, Transaction, TransactionAccountingLine, TransactionLine and Vendor.
To replace the keys or token later, use Edit credentials in the connection's menu on the Data page.
Step 3: Add saved searches (optional)
You need the External URL from Step 7. Each saved search must be public, or visible to the role from Step 1.
On the NetSuite connection's page, click + Add data (or Add Saved Search, depending on your version). It's available once the connection has finished syncing.
Check that External URL is filled in (enter it the first time), paste the full Saved search URL (for example,
https://123456.app.netsuite.com/app/common/search/searchresults.nl?searchid=884, not just884), and enter a Display name.Click Create.
Troubleshooting
Account ID must be start with a number
Copy the Account ID from Setup > Company > Company Information.
{field} must be alphanumeric
Keys and secrets contain only letters and numbers. Check for spaces or extra characters from copying.
Invalid login credentials. Please check for any errors or confirm that they are still valid
A key, secret or token is wrong or was revoked, or the role is missing REST Web Services, Log in using Access Tokens or SuiteAnalytics Workbook. Fix it or create a new token, then connect again (or use Edit credentials if the connection is still listed).
An email "Failed to connect with NetSuite", and the connection is gone from the Data page
Same causes as the row above. Fix them, then connect again.
Invalid URL
The External URL needs its script and deploy parts, and the saved search URL needs searchid. Paste the full URLs.
NetSuite could not find this saved search…
Make the saved search public and make sure the role from Step 1 can see it.
The NetSuite role connected to Drivetrain cannot export saved searches…
Give the role Documents and Files at Full.
Drivetrain could not reach the saved search script in NetSuite…
Check that the script from Step 7 is deployed and its status is Released.
This saved search already exists as a dataset
It's already imported. Find it in the connection's datasets.
Last updated
Was this helpful?
