Netsuite RESTlets Connection
  • 3 Minutes to read
  • Dark
    Light
  • PDF

Netsuite RESTlets Connection

  • Dark
    Light
  • 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

  1. Under Setup -> Company -> Enable Features

    image.png

  2. Click on SuiteCloud

    image.png

  3. Under SuiteTalk, enable SOAP WEB SERVICES

    image.png

  4. Under Manage Authentication, enable TOKEN-BASED AUTHENTICATION

    image.png

  5. Scroll to the end or start of the page and click on Save

Create an integration record (app) for Rivery

  1. Under Setup -> Integration -> Manage Integrations -> New

image.png

  1. Name your integration "Rivery"

  2. 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:

    For accounts using https://console.rivery.io:
    	https://console.rivery.io/api/oauthcallback/netsuite_restlets
    For accounts using https://eu-west-1.console.rivery.io:
    	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

  1. Create a role
    • Setup -> Users/Roles -> Manage Roles -> New
    • Name your role "Rivery"
    • Under Authentication enable the WEB SERVICES ONLY ROLE option
  2. Set Permission for the role
    There are two options when setting permission:
    1. 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)

    2. 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:
      image.png

      How to add permissions:

      1. Under the permissions tab, find the subtab that corresponds to the entity you wish to extract, e.g lists
      2. Find the record you want to add permission for e.g. Accounts
      3. Set the level of permission for that record e.g. view
      4. Click add
      5. Keep going until all entities have been added
      6. Click on save
    3. image.png

    4. 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.

  1. Go to Lists -> Employees -> Employees -> New.
  2. Enter the name and the email address.
  3. Click the Access subtab
  4. Check Give Access and Send Notification Email.
  5. Check MANUALLY ASSIGN OR CHANGE PASSWORD
  6. Assign a password of your choice.
  7. Select the Role that you need to assign. In this case.. Rivery and click Add.
  8. Save the record.

Create an Access token for Rivery

  1. Under Setup -> Users/Roles ->Access Tokens -> New
    image.png

  2. Select the application (an integrated record) you've previously created

  3. Select the user you've previously created

  4. Select the role you've created for that user

  5. Enter a name for the access token or use the generated name

  6. 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

  1. From the main screen navigate to: Setup -> Integration -> Soap Web Services Preference
  2. Under Primary Information you will find your Account ID

image.png

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

  1. In your Rivery Account, go to Connections
  2. Press on +Create New Connection
  3. Choose NetSuite RESTlets
  4. 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
  5. Click Save and create the connection
  6. 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.



Was this article helpful?