Put 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
- Follow the instructions on NetSuite Applications Suite - Create Integration Records for Applications to Use OAuth 2.0 page to get the REST API credentials.
- In 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.
- 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)
- 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,
- You can optionally set a base HTTP client to use for the connection by selecting a HTTP client configuration or setting your own HTTP client in the Advanced HTTP client field.
- Click Grant access to Oracle NetSuite button to let Alumio gets the token to access Oracle NetSuite REST web services.
- 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
- Go to Connections → Incoming and create a new incoming configuration and select Oracle NetSuite Subscriber as the subscriber.
- Select 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.
- Add any request parameters needed to subscribe to the entity (optional, but path and query properties should exist, you can leave them as empty objects).
- You can optionally add a transformer to transform the request parameters into something you need.
- 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 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 SuiteQL Syntax and Examples page.
Record
Available when choosing Get Record(s) action.
It’s the record you want to subscribe from Oracle NetSuite. Please refer to 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 SuiteQL Syntax and Examples page on how to write the query. You can only write 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 id and name properties of each department.
Request Parameters
It’s the parameters you can provide to get the needed records based on Oracle NetSuite API Reference. Please look at the example below on how to fill Request Parameters field when subscribing a single department record.
It means that we want to subscribe to a department with ID 123 and we want to fetch only id and name properties from the record. We can see in the documentation that single department record requires id as a path parameter to define which department we want to fetch.
That’s why we need to define the id property inside path property in the Request Parameters field. The properties inside query parameters (in this example is fields) will be parsed as query parameters.
The final URL of the request is /department/123?fields=id,name
Input Transformer
Any transformer’s set here will be executed after the Request Parameters loaded. So, you basically can 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
It’s 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 the systems and it uses the next links included in every list which still has more page(s). By selecting any pagination type in Oracle NetSuite subscriber, Alumio will fetch a number of pages according to the number entered in maximum number of pages to fetch 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 is by 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
- Go to Connections → Outgoing, create a new outgoing configuration and select Oracle NetSuite Publisher as the publisher.
- Select the method and action you want the publisher to do with the data.
- 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 method PATCH and action Update sales order.
The documentation says that we need internal ID id as path parameters. In that case, you need to provide 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.
Alumio will send an API request to Oracle NetSuite with URL /salesOrder/123?replace=item with below request body.
HTTP Client
It’s the HTTP Client configuration or prototype you will use to access Oracle NetSuite.