How to integrate with Netsuite
In order to connect to Oracle Netsuite, we recommend the use of the OAuth2 integration coupled with the use of our advanced HTTP Client out. You will then leverage the gateway to use Netsuite's REST API (https://docs.oracle.com/en/cloud/saas/netsuite/ns-online-help/book_157830111504.html).
Configuring Netsuite to support OAuth2 Integration
You will need to configure your Netsuite setup to authorize OAuth2 authentication.
Enable the OAuth2 feature for your environment
Go to Setup > Company > Enable features > Suite cloud.
Make sure OAuth 2.0 is enabled
Make sure REST services are enabled
Configure an OAuth2 integration record
Netsuite documentation: https://docs.oracle.com/en/cloud/saas/netsuite/ns-online-help/section_157771733782.html
You will need to complete the OAuth 2.0 integration record form found at Setup > Integration > Manage Integrations > New.
Complete the form as follows:
- Redirect URI: https://www.babelway.net/SelfService3/CreateGatewayOAuth2Redirect.html
- Authorization code grant: checked
- Rest Web Services & Restlets: checked
Upon saving the page you will receive client credentials which will only be displayed once. Save these values for your gateway configuration.
Configuring your HTTP client gateway authentication
Create a gateway HTTP client gateway IN or OUT depending on the business flow you would like to set up (pushing information into Netsuite - OUT or pulling information from Netsuite - IN). The authentication setup does not vary depending on the direction of the flow.
Note that this setup is an advanced setup so:
- The simple HTTP client will not suffice, opt for the advanced one.
- All fields required to configure this setup will not be available on the form during gateway creation. We recommend creating dummy gateway and going back to the full list of properties of the gateway to be able to adapt it with the values below.
Complete your authentication as follows:
- Authentication type: OAuth 2.0
- OAuth2 Provider: Netsuite
- Subdomain: The subdomain is your application name. It is the subdomain of your Netsuite instance URL: https://{netsuite subdomain}.app.netsuite.com/
- Application (client) ID: use the client ID you saved from the integration record creation step.
- Client secret: use the client secret you saved from the integration record creation step
- Custom scopes: add at the very least rest_webservices, make sure the list of scopes here matches the ones checked when creating your integration record in the list above. Otherwise Netsuite will throw a "conflicting scope" error.
And then click on the "Sign In with Netsuite" button. You will be asked to log into your Netsuite account in order to grant Babelway the right to use OAuth2 on your behalf. You should then see that grant flow succeeded:
Configuring API calls
You should find examples of Netsuite gateways configured to push or pull different document types in our Babelway catalog. This is accessed through the "reuse and save time" button on the gateway creation screen.
The REST API is available here: https://docs.oracle.com/en/cloud/saas/netsuite/ns-online-help/chapter_1558962745.html#Web-Services-Supported-Records
TIPs:
- When troubleshooting your API calls, begin with a NOT DEFINED > NO TRANSFORM > NOT DEFINED channel in order not to be blocked by the possibly varying message format you will receive.
- When troubleshooting your API calls, use as a create message action "Script" and "responseContent" in order to get the full response of your API Call. This will allow you to further narrow down what you wish to extract as actual message data.