About NetSuite Services

When you create a layout, you'll need to provide an appropriate NetSuite URL for the service metadata document. You'll also need to provide a config file with OAuth 2.0 settings for your account since NetSuite services require OAuth 2.0 to authenticate.

To support OAuth 2.0 authentication with the add-in, you'll also need to create a NetSuite integration record to use with your integrated workbook.

Review this topic for information about NetSuite service metadata, OAuth2 authentication, and integration records.

NetSuite Concepts

Here are some key NetSuite concepts you should be familiar with:

  • Record: The NetSuite concept of a "Record" is roughly equivalent to the concept of "Business Object" used in this document.
  • Reference Field: NetSuite records support a concept known as a "Reference Field" where a field in one business object can reference a row in a different business object. For example, the NetSuite "contact" record has a field called "company". The company field can refer to a customer, partner, vendor, and so on.

For more information on NetSuite services, see SuiteTalk REST Web Services Overview and Setup in the NetSuite Applications Suite documentation.

NetSuite Service Metadata

NetSuite provides support for retrieving OpenAPI service metadata for NetSuite records available via REST. For example, to obtain the service metadata for "contact", use a URL similar to:

https://<YOURACCOUNT>.suitetalk.api.netsuite.com/services/rest/record/v1/metadata-catalog?select=contact

Note:

The add-in can retrieve and process the entire NetSuite catalog using ...services/rest/record/v1/metadata-catalog (without ?select). However, it is very large and takes a long time. So, selecting a specific record is recommended.

For information on OpenAPI metadata with NetSuite services, see Working with OpenAPI 3.0 Metadata.

OAuth2 Authentication

NetSuite services require OAuth 2.0 authentication. When you import a catalog or create a layout, you'll select OAuth 2.0 Authorization Code (PKCE) from the first screen of the wizard. The add-in then displays a screen for entering the required authentication properties. This screen includes an Import icon (Import icon) you can use to import a JSON configuration file with the required values for your workbook. See Configure OAuth 2.0 Authorization for a Catalog.

Here is a sample OAuth2 config file for NetSuite:

{
  "type": "oauth2",
  "authorizationCode": {
    "clientId": "<value provided by your account admin>",
    "authorizationEndpoint": "https://<YOUR_ACCOUNT>.suitetalk.api.netsuite.com/app/login/oauth2/authorize.nl",
    "redirectionEndpoint": "<value provided by your account admin>",
    "accessTokenScope": "rest_webservices",
    "tokenEndpoint": "https://<YOUR_ACCOUNT>.suitetalk.api.netsuite.com/services/rest/auth/oauth2/v1/token"
  }
}

Copy this sample, paste it into a plain text file, then save it with a file name such as NetSuite-OAuth2-Config.json. You can then ask your NetSuite account admin to fill in the missing values and return it to you.

Note:

If your NetSuite account admin needs some pointers on the missing values, see #GUID-1FDF1442-3A22-462B-8FFE-12B072995DAC/GUID-1390C97B-5BE9-4E69-9523-67BA8802F2A1.

Integration Records

If you have not yet created an appropriate NetSuite Integration Record to use with your integrated workbook, refer to Integration Record Overview and Create Integration Records for Applications to Use OAuth 2.0 in the NetSuite Applications Suite documentation.

To support OAuth 2.0 authentication with the add-in, the integration record must have these configuration settings enabled:

  • Public Client check box. This is required since the add-in is considered a public client.
  • REST Web Services check box

Note:

Make sure to capture the client ID during this process.

Once you have an appropriate integration record, it can be used with multiple different integrated workbooks that are integrated with NetSuite services that use this account.

For more information on how the add-in supports OAuth2, see OAuth 2.0 Authorization Code Flow with PKCE.