NetSuite

NetSuite is a cloud-based business management software that helps manage customer relations, banking finances and company operations.

Make sure you are using the latest version of Netsuite (NetSuite 2019.2 or higher). You can see the version you are using at the bottom of the Netsuite home page.

Connecting to NetSuite

In order to get the required account tokens and keys to connect to Grow, you need to use an admin role within NetSuite or one with sufficient permissions, specified in Step 2.

To streamline the connection process, you can have the Grow/NetSuite authorization window open, so you can cut and paste the values into the fields as you gather them.

Step 1. Account Settings

Token-Based Authentication must first be enabled in the account.

  1. Go to Setup > Company > Enable Features > SuiteCloud.
    • Client SuiteScript
    • Server SuiteScript
    1. Enable features in the SuiteScript section.
    2. Scroll to the Manage Authentication section and enable Token-based Authentication.
  2. Click Save on this configuration page.

Step 2. User Roles

  1. Go to Setup > Users/Roles > Manage Roles and find the role of the user you are using to connect to Grow.
  2. Under Permissions > Transactions, make sure that Find Transaction has the View access level.
  3. Under Permissions > Lists, make sure that the following permissions are added.
    • Documents and Files: use the Full access level.
    • Persist Search: the only access level is Create.
  4. Under Permissions > Setup, make sure that the following permissions have the Full access level:
    • Access Token Management
    • Log in using Access Tokens
    • User Access Tokens

The easiest way to know that you have sufficient privileges is to let a user with an Administrator role to connect to Grow. Also, verify that the user matches the one on your NetSuite account.

Step 3. Get the Consumer Key and Secret

  1. Go to Setup > Integration > Manage Integrations > New.
  2. Enter a name and check the Token-based Authentication checkbox.
    Be sure that only the boxes are checked for User Credentials and Token-based Authentication, even if there are other checkboxes available.
  3. Click Save and then you will be given a Consumer key / Consumer secret. This will create an integration record that you will use in the next step.

This is the only time you will be able to see the Consumer Key/Secret, so be sure to save them in a secure place to enter into Grow in a later step.

Step 4. Create an Access token

  1. Click the Manage Access Tokens link at the bottom left of the home dashboard under Settings.
  2. Click on New My Access Token and then select the application name you created in Step 3.
  3. You will be given a Token ID and Token Secret to use in Grow.

This is the only time you will be able to see the Token ID/Secret, so be sure to save them in a secure place to enter into Grow in a later step.

Step 5. Get Your NetSuite Account ID Number

  1. Go to Setup > Integration > Web Services Preferences to see your account ID number.

Step 6. Add the script

  1. Download the updated Javascript file linked in this step. Netsuite Warehouse works only when you create new authentication, or reconnect an existing authentication using the new script: Updated Javascript File. After it is downloaded, make sure that the file has the .js extension at the end of the file name.

    Alternatively, you can update the script file in the Netsuite portal.

    To update the script in the Netsuite portal, follow through these steps:

    1. In Netsuite, go to Customizations > Scripting > Script Deployments.

    2. Find the Grow script and select View. Select the hyperlink Grow Saved Search. Note that the name might be different, if you had saved it with a different name earlier.

    3. In the Script File tab, select Edit.

    4. Replace the older content with the content in this file: https://s3.amazonaws.com/grow-files/javascript/grow_savedSearch2.js. It is recommended to delete the older script and then copy the new script.

    5. Then select Save to save the configurations.

  2. In NetSuite, go to Customization > Scripting > Scripts > New in your NetSuite account and click on the gray plus button that appears next to the box labeled Script File.
  3. A window will pop up where you can choose to upload a file from your computer. Select the script file you just downloaded from Grow and click Save. Leave the File Name field blank.
    When you upload the JS script, make sure it has .js at the end of the file name. If it does not have that extension after selecting the file, you can type that in here:
    upload-js-file.png
  4. Click Create Script Record.
  5. Name the script, and press Save.
  6. On the next page, click Deploy Script.
  7. On the next Script Deployment screen, make sure that the Status is set as Released, and under audience select all roles. You could also select just the specific role that you are using for the Grow NetSuite credentials.
  8. Press Save.
  9. In the next screen, copy the URL (not the external URL) and store it to use in Grow.
    The URL will look like this:
    /app/site/hosting/restlet.nl?script=xxx&deploy=x

Step 7. Create the Auth in Grow

  1. In Grow, visit your data sources settings page and click Connect a New Data Source.
  2. Search for NetSuite in the list and click Connect.
  3. In the pop-up window, enter the following:
    1. Give the connection a name.
    2. The Consumer key and Consumer secret created in Step 3.
    3. The Token key and Token secret created in Step 4.
    4. The NetSuite account ID number found in Step 5.
    5. The URL created in Step 6.
  4. Click Connect to complete the authorization.

netsuite-connection-modal.jpg

Endpoints

Below is a list of the endpoints that the NetSuite/Grow integration offers, along with a short description of each.

  • Saved Search Export - (Transaction): Provides details such as date/period, name, account information, amount charged about transactions on generic NetSuite saved searches.
  • Saved Search Export - (Customer): Provides details such as name, account information, and contact information about customers on generic NetSuite saved searches.
  • Saved Search Export: Provides details from your custom saved searches.

Any saved searches that you will use in Grow must be set to Public or you will get an error.

FAQs + Tips and Tricks

Troubleshooting Tips

If your Saved Searches are coming in blank or not appearing in the list seen in Grow, here are some things to check in NetSuite:

  • Saved searches must be set to Public to be able to work in Grow. Any saved searched set to Shared or Private will return an error.
  • From the Results tab of the Saved Search, check the Run Unrestricted option, and uncheck the Show Totals option.
  • From the Audience tab of the Saved Search, check the Select All option for Roles, Employees and Partners.
  • Make sure none of the columns used in a Saved Search are using any uncommon characters in the name (/*&^, etc.).

Differences Between the Three Report Types

When you select the endpoints Saved Search Export - (Transaction) and Saved Search Export - (Customer), another field will open up with a list of saved searches that you created from a NetSuite template. On the other hand, the endpoint Saved Search Export will let you connect to a custom search you have created in NetSuite.

Custom Saved Searches

Using NetSuite's custom Saved Searches is the easiest way to call your NetSuite reports in Grow. In to your NetSuite account find the Saved Search that you want to pull and copy the ID for the search. Sign into Grow and navigate into the NetSuite connection. From the Select NetSuite Report dropdown, choose Saved Search Export. In the field labeled "Enter in your saved search id," go ahead and paste the Saved Search ID.

NetSuite DOES NOT Require a Separate User Anymore

A previous version of our NetSuite integration required you to create a NetSuite user to be used only with your Grow account. Now you can use an admin or another user with sufficient permissions to create the API keys and tokens needed to connect.

Getting the "An unexpected error has occurred" Error Emails

Due to the way NetSuite handles script errors, you might get some emails with the subject line "An unexpected error has occurred" and mention the Grow script you added to your account. These errors don't affect the data coming into Grow from NetSuite, and we are working on improving the error handling for this script. You can stop the error emails from being sent in the settings for that specific script:

  1. In NetSuite, go to Customization > Scripting > Scripts.
    NetSuite-edit-script.png
  2. Find the grow script being use and select Edit.
  3. On the bottom of the page find the Unhandled Errors tab.
  4. Uncheck all the Notify options and save the configuration.
Was this article helpful?