NetSuite Call RESTlet
In this article
Overview
You can use the NetSuite Call RESTlet Snap to call RESTlet scripts using token-based authentication. This Snap provides the functionality of the NetSuite RESTlet framework that supports the HTTP methods (GET, DELETE, POST, PUT) and MIME types. You can use any existing NetSuite Token Account for this Snap without making any modifications to the account.
The UI settings for this Snap rely on features that work only with the New Form UI, such as dynamic activation of fields and the use of expressions for Boolean fields.
Prerequisites
Valid client ID.
A valid NetSuite account with the required permissions.
Support for Ultra Pipelines
Works in Ultra Pipelines.
Limitations and Known Issues
None.
Snap Input and Output
Input/Output | Type of View | Number of Views | Examples of Upstream and Downstream Snaps | Description |
|---|---|---|---|---|
Input | Document
|
|
| An HTTP request. |
Output | Document |
|
| An HTTP response. |
Snap Settings
Parameter Name | Data Type | Description | Default Value | Example |
|---|---|---|---|---|
Label | String | Required. The name for the Snap. You can modify the default name to be more specific and meaningful, especially if you have more than one of the same Snaps in your Pipeline. | NetSuite Call RESTlet | RESTlet GET |
HTTP Method | Drop-down list | Required. Select the HTTP method to call the RESTlet. The available options are:
| GET | POST |
Script ID | String/Integer | Required. Specify the ID of the RESTlet script. You should create and configure the RESTlet script in the NetSuite UI. | N/A | customscript8 |
Deploy ID | String/Integer | Required. Specify the ID of the RESTlet deployment. | N/A | customdeploy2 |
Content | String/Suggestion | Activates when you select POST or PUT for HTTP Method. Specify the path of the content for the body of a POST or PUT request. | $ | $update |
Query Parameters | Activates when you select GET or DELETE for HTTP Method. Use this field set to add query parameters to the request URL. This field set contains the following fields:
Query parameters are not supported for POST and PUT methods. | |||
Key | String/Expression | Enter the parameter key. | N/A | City |
Value | String/Expression | Enter the parameter value for the corresponding key. | N/A | Hyderabad |
Has Next | String/Expression | Specify the expression that must be evaluated to true or false on the output document to determine whether more results are available. If the expression evaluates to true, the query parameters for the next request are updated using the values provided in the Query Parameters for Next field. Do not disable the Expression enabler. | N/A | parseInt($response.content.page) < 5 |
Query Parameters for Next | Activates when you provide an expression for Has Next. Use this field set to add query parameters to the request URL. This field set contains the following fields:
When the expression in Has Next evaluates to true, the entries in this field set override the entries in the Query Parameters field set before making a request for the next page. Each value's expression is evaluated against the current output document. | |||
MIME Type | Drop-down list | Choose the MIME type for the content-type header of the request and response. The available options are:
XML MIME type is supported only for the GET method. | application/json | application/xml |
Maximum request attempts | Integer/Expression | Specify the maximum number of requests to attempt in case of failure. | 3 | 4 |
Retry request interval | Integer/Expression | Specify the interval between two successive requests. A retry happens only when the previous attempt resulted in an exception. | 2 | 3 |
Snap Execution | Drop-down list | Select one of the three modes in which the Snap executes:
| Validate & Execute | Execute only |