Creating an external connection to NetSuite requires some initial configuration in NetSuite. This article explains the necessary steps in order to connect Trelica to NetSuite.
Enable Token Based Authentication in NetSuite
Log in to NetSuite.
Go to Setup > Company > Enable Features.
Under the SuiteCloud sub-tab:
- In the SuiteTalk (Web Services) field group, ensure that REST Web Services is checked.
- In the Manage Authentication field group, ensure that Token Based Authentication is checked.
- If you want to return purchase order documents, ensure that Server SuiteScript is checked.
Create a role and account for the Trelica integration
Create a Trelica role
Go to Setup > Users/Roles > User Management > Manage Roles > New. (or search for
new role in the global search).
Give the role a descriptive name, such as Trelica Integration Role.
Under the Authentication field group, make sure Web Services Only Role is unchecked, as this does not work with OAuth1a.
Now go to the Permissions sub-tab and select the following permissions:
|Audit Trail (View)
Enter Vendor Credits (View)
Expense Report (View)
Find Transaction (View)
Purchase Order (View)
Make Journal Entry (View)
Account Detail (View)
|REST Web Services (Full)
User Access Tokens (Full)
Log in using Access Tokens (Full)
Access Token Management (Full)
View Login Audit Trail (Full)
NetSuite lets you restrict access to subsidiaries and accounts. Unless you have a specific reason to restrict the data you are requesting, please ensure that:
Subsidiary Restrictions > Accessible Subsidiaries - set to All Under Accounting Books,
Accounting Books > Selected Accounting Books - set to All
Create a Trelica employee record
Go to Lists > Employees > Employees > New (or search for
page:employees in the global search).
Give the Employee a descriptive name and ID, (e.g.
Under the Access sub-tab, assign the newly created Trelica role.
Create a new Integration Record
Go to Setup > Integration > Manage Integrations > New (or search for
page:integrations in the global search)
|Trelica Spend Data Integration
|10 (suggested, or a value under the Max Concurrency Limit)
Now go to the Authentication sub-tab,
Find the Token-based Authentication field group and fill in the following fields:
|TBA Authorization Flow
https://eu.trelica.com and not
https://app.trelica.com in the Callback URL.
Make sure that nothing is checked or entered in the OAuth2.0 and User Credentials field groups.
Click Save. On the confirmation screen, copy the following that you will need to authenticate:
- Consumer Key (or Client ID)
- Consumer Secret (or Client Secret)
Find your NetSuite Account ID
Go to Setup > Integration > Webservice Preferences
Copy your Account ID and keep a note of it as you will need to enter it into Trelica.
Connect Trelica to NetSuite
If you received an email asking you to set up the integration, then just click on the link, otherwise login to Trelica and go to Admin > Integrations to get started.
In the Search... box, just type in NetSuite.
Then click on the NetSuite logo to get started, and on the next screen click Connect:
Now enter the Account ID, Consumer Key and Consumer Secret that you generated in NetSuite.
-) rather than an underscore (
_) for the Account ID, e.g.
You will then need to login to NetSuite.
Once logged in, you will be asked to confirm that Trelica is allowed to access your NetSuite account.
You will be taken back to Trelica and Trelica will start to request data from NetSuite. This may take some time but happens in the background, so you can freely navigate away from the page and come back later to check on progress.
Purchase Order document support
Pre-requisite permissions and features
If you are enabling Purcase Order document support having previously configured the Trelica NetSuite connector, then you may need to enable additional features or permissions. This section describes what you need to check.
Check role permissions
- Go to Setup > Users/Roles > User Management > Manage Roles.
- Click through to the Trelica role.
- Go to the Permissions sub-tab. Under the 'Lists' section ensure that Documents and Files (View) is checked.
- Click Save.
Check Server SuiteScript is enabled
- Go to Setup > Company > Enable Features.
- Under the SuiteCloud sub-tab ensure that Server SuiteScript is checked.
- Click Save and confirm the Terms of Service.
Configuring Purchase Order document support
Upload and deploy the Restlet
- Download and save the Trelica restlet to your computer. You will upload it shortly.
- Go to Netsuite and navigate to Customization > Scripting > Scripts.
- Click New Script.
- Hover over the Script file and click the + icon that appears.
- Under the Select File field, click and upload the file you just downloaded to your computer.
- Do not alter the File Name field. The file must have a .js suffix.
- Click Save. You will be taken back to the Upload Script File.
- Click Create Script Record.
- In the Script record page, enter
Trelicain the Name field.
- Click Save. This will create the script record.
- Click Deploy Script. You will be taken to the Script Deployment page.
- In the Audience tab, make sure the
Trelica Integration Roleis selected.
- Set the Status to Released.
- Click Save
- Copy the External URL to your clipboard.
Configuring in Trelica
- Go to the Netsuite connection in Trelica and click Settings.
- Select the Purchase Order documents feature:
- Scroll down and paste the URL into the Restlet URL field in Trelica.
- Re-enter your Consumer Secret.
- Click Reconnect.
What do I do if I've forgotten my NetSuite Consumer Key and Consumer Secret?
You can regenerate them by editing the integration record: