NetSuite SuiteApp Credentials Setup

Configure NetSuite to store and use your Graphite API Key

Starting with version 3.4.0, The Graphite SuiteApp will reference the Graphite API Key from an API Secret configured inside of NetSuite. This will serve as a guide with initial setup of the API Secret in NetSuite

Prerequisites

  • The User must have Administrator or the Secrets Management permission in order to create the secret
  • A Graphite API key must be generated by someone with the IT Admin permission from your organization. For instructions, read more here

Configuration

To set up the Secret from the NetSuite Dashboard:

  • Navigate to Setup > Company > API Secrets from the navigation bar.
  • Click the Create New Button
  • In the popup modal, on the details tab, enter the following:
    • Name: A name for the secret that can be any value
    • ID: The value entered must be _graphite_api_key
    • Password & Confirm Password: The Graphite API Key
  • On the Restrictions tab:
    • Available to SuiteApp: Should be checked true
    • SuiteApp ID: Should always have the value com.graphiteconnect.graphiteconnectnetsuite
    • Allow for all Scripts: Should be checked true
    • Restrict to Domains: Should be the domain name of the Graphite environment to connect to.
      • Staging: staging.projectgraphite.com or api-staging.projectgraphite.com
      • POC: poc.projectgraphite.com or api-poc.projectgraphite.com
      • Production: app.graphiteconnect.com or api.graphiteconnect.com
      • Note: Values for this field must match the domain used in the script parameter.

Troubleshooting

  • Graphite API Calls requests returning with status code 403:
    • Status code 403 represents a forbidden resource error. This is likely because the Graphite API Key entered in the secret is invalid. Please double check the validity of the API key, reenter it in the Password fields, and update the secret.
  • INVALID DOMAIN Error:
    • This error from the https module means that the API Secret cannot be used with the domain provided in the script parameter. To resolve, make sure the domain defined in the API Secret entry matches the domain of the URL included in the script parameter.

If in the execution logs the settings from Graphite are visible upon script execution, this means that authentication is working properly. Any other errors past this point may be caused by something else.

Using Script Parameter (Deprecated)

❗️

Keep your API Key Secure!

Setting the API Key using the Script Parameter is now deprecated. It is recommended to use NetSuite API Secrets to store your Graphite API Key instead.

Using the Script Parameter to store your Graphite API Key will leave it in plain-text. Ensure only trusted NetSuite users can access script deployments.

To set the API Key by script parameter, enter the following into the Graphite API Key (Deprecated) Field:

Bearer <apiKey>

Where <apiKey> is your Graphite API Key.

Further Reading