- 3 Minutes to read
- Print
- DarkLight
- PDF
Netsuite RESTlets Connection
- 3 Minutes to read
- Print
- DarkLight
- PDF
Setting up the connection
For the following steps please make sure you are logged in as an Administrator.
Enable web services & token-based authentication
Under Setup -> Company -> Enable Features
Click on SuiteCloud
Under SuiteTalk, enable SOAP WEB SERVICES
Under Manage Authentication, enable TOKEN-BASED AUTHENTICATION
Scroll to the end or start of the page and click on Save
Create an integration record (app) for Rivery
- Under Setup -> Integration -> Manage Integrations -> New
Name your integration "Rivery"
Make sure the TOKEN-BASED AUTHENTICATION (TBA) is enabled, and insert callback URL based on the site you log in to rivery. For US URI:
https://console.rivery.io/api/oauthcallback/netsuite_restlets
https://eu-west-1.console.rivery.io/api/oauthcallback/netsuite_restlets
Click Save. A consumer secret and key will appear. Make sure to write them down as we will be using them later (also, they will only appear once).
Create a role for Rivery and set permission
- Create a role
- Setup -> Users/Roles -> Manage Roles -> New
- Name your role "Rivery"
- Under Authentication enable the WEB SERVICES ONLY ROLE option
- Set Permission for the role
There are two options when setting permission:Set the administrator role:
This is done under the General tab -> issue role -> administrator
If you choose this option, please continue to the "Create a user.." section once the role is set (don't forget to save the role)Set specific permission for the role:
Below, you will find a list of minimum permissions you need to grant to the role to be able to use Rivery with Netsuite:How to add permissions:
- Under the permissions tab, find the subtab that corresponds to the entity you wish to extract, e.g lists
- Find the record you want to add permission for e.g. Accounts
- Set the level of permission for that record e.g. view
- Click add
- Keep going until all entities have been added
- Click on save
In addition you need to add specific permission for each record you want to use Rivery to extract, e.g. Accounts, Invoice etc please follow the stesp 1-5 for each of these records.
Create a user and assign the role you previously created to the user, We suggest using "Rivery" as the name of the user and the role.
- Go to Lists -> Employees -> Employees -> New.
- Enter the name and the email address.
- Click the Access subtab
- Check Give Access and Send Notification Email.
- Check MANUALLY ASSIGN OR CHANGE PASSWORD
- Assign a password of your choice.
- Select the Role that you need to assign. In this case.. Rivery and click Add.
- Save the record.
Create an Access token for Rivery
Under Setup -> Users/Roles ->Access Tokens -> New
Select the application (an integrated record) you've previously created
Select the user you've previously created
Select the role you've created for that user
Enter a name for the access token or use the generated name
Write the token id and secret, you will need them in the connection in Rivery. (also they will only appear once).
Locate your Account ID
- From the main screen navigate to: Setup -> Integration -> Soap Web Services Preference
- Under Primary Information you will find your Account ID
Upload and Deploy Rivery's script
1. Download the javascript file from our repository press right-click on the link here and select Save link as. Otherwise, go into the link and download the raw file there.
(To download the file from gitHub, right click on Raw, and select Save link as..)
2. Log in to your Netsuite account.
3. Go to Customization > Scripting > Scripts > New
4.Select a new file ("+") and upload the downloaded file. Write a suitable name for your script. Once finished click Save.
5. Go back to Customization > Scripting > Scripts.
6. After selecting the js file, press Create Script Record. In the Script title window opening up, press Save and Deploy.
8. In the Script Deployment screen opening up, check the same permissions and status is checked:
- select specific roles (or all) to run the script, status: released, and DEPLOYED.
- Once finished, click Save.
9. In the last window, copy the account id, script id , and deploy id.
- Please note, sandbox account id ends with "-sb2", and production accounts ends without.
Creating a NetSuite RESTlets connection in Rivery
- In your Rivery Account, go to Connections
- Press on +Create New Connection
- Choose NetSuite RESTlets
- Fill in a suitable name under Connection Name and insert the connection details you've located/created to the corresponding fields.
- Consumer Key
- Consumer Secret
- Token ID
- Token Secret
- Account ID - The located Account ID
- Script ID
- Deploy ID
- Click Save and create the connection
- Test the connection if the test is successful you are ready to work with NetSuite RESTlets in Rivery
Troubleshoot connection test
In case of a test-connection failure make sure the credentials are correct. If you are certain these steps are fine, it is probably the script's filename that doesn't end with ".js". You can click edit script filename and add the .js there.