About the NetSuite category

Add topics about this connector package here.
Always check the ‘How to use the Alumio connector packages’ topic.

Extra information

System documentation: NetSuite REST API Browser: Record API | API Reference

Connector package documentation

​​Table of Contents

  • 1. Setting up HTTP Client Oracle NetSuite
    • 1.1 Steps
  • 2. Subscribing to entities from Oracle NetSuite
    • 2.1 Steps
    • 2.2 General concept
  • 3. Publishing entity to Oracle NetSuite
    • 3.1 Steps
    • 3.2 General concept

1. Setting up HTTP Client Oracle NetSuite

1.1 Steps

  1. Follow the instructions on the NetSuite Applications Suite - Create Integration Records for Applications to Use OAuth 2.0 page to get the REST API credentials.
  2. In the Alumio Dashboard, go to Clients → HTTP Clients. Create a new HTTP Client and select Oracle NetSuite HTTP Client as the prototype of the HTTP Client.
  3. Fill in these fields:
    • Account ID: you can find it in the URL of your Oracle NetSuite dashboard. For example, the URL to your Oracle NetSuite dashboard is https://1234567.app.netsuite.com/. So,
      your Account ID is 1234567.
    • Client ID
    • Client Secret
    • HTTP Client (optional, default: Default client)
    • Enable logging of requests (optional, set the formatter if you choose to enable logging)
  4. You can optionally set a base HTTP client to use for the connection by selecting an HTTP client configuration or setting your own HTTP client in the Advanced HTTP client field.
  5. Click “Grant Access to the Oracle NetSuite” button to let Alumio get the token to access Oracle NetSuite REST web services.
  6. You’ll be able to save the configuration after Alumio successfully gets the token and the Key field is filled

2. Subscribing to Entities from Oracle NetSuite

2.1 Steps

  1. Go to Connections → Incoming and create a new incoming configuration and select the Oracle NetSuite Subscriber as the subscriber.
  2. Select the Get Record(s) action and select the record you want to subscribe to. Or, you can select SuiteQL Query action and write your own query.
  3. Add any request parameters needed to subscribe to the entity (the path and query parameters should always be present, you can leave them as empty objects if needed).
  4. You can optionally add a transformer to manipulate the request parameters into something you need.
  5. Select the Oracle NetSuite HTTP Client to use.

2.2 General Concept

We support subscribing resources from Oracle NetSuite through record endpoints and SuiteQL. So, whenever you’re unable to get the data you need through record endpoints, you can write your own SuiteQL query to suit your need.

Action

We follow the Oracle NetSuite documentation on building this connector, so you can easily use the connector based on Oracle NetSuite API Reference when using Get Record(s) action. Or, you can write your own query using SuiteQL Query action based on the SuiteQL Syntax and Examples page.

Record
Available when choosing Get Record(s) action.

This is the record you want to subscribe to from Oracle NetSuite. Please refer to the Oracle NetSuite API Reference page.

Query
Available when choosing SuiteQL Query action.

You can write your own query to get the data you need. Please refer to the SuiteQL Syntax and Examples page on how to write the query. You can only write a SELECT statement for your SuiteQL query. For example, you may write SELECT id, name FROM department to fetch a list of departments and only include the id and name properties of each department.

Request Parameters

These are the parameters you can provide to get the needed records based on the Oracle NetSuite API Reference. Please look at the example below on how to fill the Request Parameters field when subscribing to a single department record.

image

  • “Path” is the path parameter of the URL. For example the {id}.
  • “Query” is defined set of parameters attached to the end of a URL.
    Example: www.url.com?type=true&start=0

This means that we want to subscribe to a department with ID 123 and we want to fetch only the id and name properties from the record. We can see in the documentation that a single department record requires the id as a path parameter to define which department we want to fetch.

image

That’s why we need to define the id property inside the path property in the Request Parameters field. The properties inside query parameters (fields in this example) will be parsed as query parameters.
The final URL of the request is /department/123?fields=id,name

Input Transformer

Any transformers set here will be executed after the Request Parameters are loaded. So, you can basically add any transformer to provide and transform the request parameters into anything you need either as path parameters and/or as query parameters of a record.

HTTP Client

This is the HTTP Client configuration or prototype you will use to access Oracle NetSuite.

Follow Pagination

If we want to fetch a list of entities, some systems have pagination to limit the entities returned in one call. Oracle NetSuite is one of these systems and it uses the next links included in every list which still has more page(s). By selecting any pagination type in the Oracle NetSuite subscriber, Alumio will fetch a number of pages according to the number entered in a maximum number of pages to fetch the field, instead of fetching only one page. Of course, such behavior happens if the next link exists in the previous fetch response. For Oracle NetSuite, please set links[?rel == ‘next’].href | [0] to the Pattern to the link for the next page field. One more step to enable the pagination involves selecting the storage to track the process. You can create a new storage and use it here in the incoming configuration.

3. Publishing Entity to Oracle NetSuite

3.1 Steps

  1. Go to Connections → Outgoing, create a new outgoing configuration and select Oracle NetSuite Publisher as the publisher.
  2. Select the method and action you want the publisher to do with the data.
  3. Select the HTTP Client to use.

3.2 General Concept

Like the subscriber, the publisher has similar methods on how to use it. The difference is the payload that will be submitted by the publisher originating from the data (from routes, from transformers in outgoing configuration).

Method

We support creating, updating, upserting (insert or update), and deleting records from/to Oracle NetSuite.

Action

Currently, we support all the actions described in the Oracle NetSuite API Reference page.

For example, we want to replace sales order items in a sales order. Please select the method PATCH and the action Update Sales Order.

image

The documentation says that we need an internal ID as the path parameters. In that case, you need to provide the id property inside the path property in the data, either as an output from Routes or output from Transformers in Outgoing Configuration. Here is an example of the required data:

image

  • “Path” is the path parameter of the URL. For example the {id}.
  • “Query” is a defined set of parameters attached to the end of a URL.
    Example: www.url.com?type=true&start=0
  • “Payload” is the data contained within a request.

Alumio will send an API request to Oracle NetSuite with the URL /salesOrder/123?replace=item with the following request body.

image

HTTP Client

This is the HTTP Client configuration or prototype you will use to access Oracle NetSuite.