Articles in this section

Connect to custom NetSuite RESTlets

By default, the integrator.io NetSuite connection communicates via custom RESTlets in the Celigo integration bundle. However, you can route your connection to a different NetSuite RESTlet by specifying HTTP headers in integrator.io API exports or imports, acting as a proxy for requests to your NetSuite connection.

Before you begin

Configure your NetSuite connection

First, create or edit a standard NetSuite connection. Copy the connection ID at the end of the URL to use when configuring your export and import below.

360093332211-ns-restlet-1.png

Configure an integrator.io application connection

Next, set up an API token for integrator.io. After you've configured your API token, create an integrator.io connection.

Retrieve RESTlet parameters

Before interacting with the RESTlet, copy the Script ID and Deployment ID from the NetSuite script record.

360092881691-mceclip0.png

Export (read) from a RESTlet

In Flow Builder, create an export to integrator.io.

360093324271-ns-restlet-2.png

Name: Give the export a name.

Application form view: Choose HTTP. Learn more about the different types of connectors.

HTTP method: Choose POST.

Relative URI: Enter the proxy URI for your NetSuite connection, referencing the NetSuite connection ID you copied above. The format is: /v1/connections/<id>/proxy.

Headers: Add the following headers.

Name

Suggested value

Integrator-NetSuite-ScriptId

Paste in the Script ID.

Integrator-NetSuite-DeployId

Paste in the Deployment ID.

Integrator-Method

The method to use with your RESTlet call (most likely GET for an export).

HTTP request body: Enter an empty JSON object, {}. You can pass query parameters for GET and DELETE methods by adding them to the request body as follows:

{
    "query": {
        "key": "value"
    }
}

Export type: Choose All.

Click Preview to see your RESTlet data.

Import (write) to a RESTlet

In your flow, create an import to integrator.io using the connection you built earlier.

360093351772-ns-restlet-5.png

Name: Give the import a name.

Application form view: Choose HTTP. Learn more about the different types of connectors.

HTTP Method: Choose POST.

Relative URI: Enter the proxy URI for your NetSuite connection, referencing the NetSuite connection ID you copied above. The format is: /v1/connections/<id>/proxy.

Headers: Add the following headers.

Name

Suggested value

Integrator-NetSuite-ScriptId

Paste in the Script ID.

Integrator-NetSuite-DeployId

Past in the Deployment ID.

Integrator-Method

The method to use with your RESTlet call (most likely POST for an import).

Within this import, the integrator.io connection functions like any other HTTP connection. You can specify an HTTP request body or use field mappings. If you go with the latter, you can provide a sample request under Do you have a sample destination record? in the import settings to make mapping easier.

You can pass query parameters for GET and DELETE methods by adding them to the request body:

{
    "query": {
        "key": "value"
    }
}