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/OutputType of ViewNumber of ViewsExamples of Upstream and Downstream SnapsDescription
Input 

Document


  • Min:0
  • Max:1
  • Mapper Snap
  • Copy Snap
An HTTP request.
Output

Document 

  • Min:1
  • Max:1
  • Mapper Snap

An HTTP response.

Snap Settings

Parameter NameData TypeDescriptionDefault ValueExample 
LabelString
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 RESTletRESTlet GET
HTTP MethodDrop-down list

Required. Select the HTTP method to call the RESTlet. The available options are:

  • GET: The GET method requests data from a specified resource.
  • DELETE: The DELETE method deletes the specified resource.
  • POST: The POST method sends data to a server to create or update a resource. The data that is sent to the server using the POST method is stored in the request body of a HTTP request.
  • PUT: The PUT method sends data to a server to create or update a resource.
GETPOST
Script IDString/Integer

Required. Specify the ID of the RESTlet script.

You should create and configure the RESTlet script in the NetSuite UI.

N/Acustomscript8
8
Deploy IDString/IntegerRequired. Specify the ID of the RESTlet deployment.N/Acustomdeploy2
2
ContentString/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:

  • Key
  • Value

Query parameters are not supported for POST and PUT methods.

KeyString/ExpressionEnter the parameter key.N/ACity
ValueString/ExpressionEnter the parameter value for the corresponding key.N/AHyderabad
Has NextString/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 Decorator.

N/AparseInt($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:

  • Key
  • Value

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 TypeDrop-down list

Choose the MIME type for the content-type header of the request and response. The available options are:

  • application/json
  • application/xml
  • text/plain

XML MIME type is supported only for the GET method.

application/jsonapplication/xml
Maximum request attemptsInteger/ExpressionSpecify the maximum number of requests to attempt in case of failure.34
Retry request intervalInteger/ExpressionSpecify the interval between two successive requestsA retry happens only when the previous attempt resulted in an exception.23
Snap ExecutionDrop-down list

Select one of the three modes in which the Snap executes:

  • Validate & Execute. Performs limited execution of the Snap, and generates a data preview during Pipeline validation. Subsequently, performs full execution of the Snap (unlimited records) during Pipeline runtime.
  • Execute only. Performs full execution of the Snap during Pipeline execution without generating preview data.
  • Disabled. Disables the Snap and all the Snaps that are downstream from it.

Validate & ExecuteExecute only

Troubleshooting

ErrorReasonResolution
HTTP/1.1 407 Proxy Authentication required.

Unable to tunnel through proxy.

Add the following key-value pair values to your Groundplex configuration and restart the plex to reflect the changes.

Key : jcc.jvm_options
Value : -Djdk.http.auth.tunneling.disabledSchemes=""

Examples

Calling a RESTlet Using the GET method

The following example Pipeline demonstrates how you can call a customscriptecho RESTlet using the GET method and query parameters. We use the Mapper and NetSuite Call RESTlet Snaps in this example.

First, we configure the Mapper Snap to pass inputs to the NetSuite Call RESTlet Snap as follows.

Then, we configure the NetSuite Call RESTlet Snap to perform a GET operation and get the desired response in the body.

Upon validation, the output displays the response as follows.

Download this Pipeline.

Calling a RESTlet Using the POST method

The following example Pipeline demonstrates how you can execute a POST request using the POST method. We use the JSON Generator and NetSuite Call RESTlet Snaps in this example.

Snap ConfigurationSnap Output

First, we configure the JSON Generator Snap to pass inputs to the NetSuite Call RESTlet Snap.

Then, we configure the NetSuite Call RESTlet Snap to perform a POST operation. Note that the Content field is activated by default for the POST method to pass the response as a body. We set the Content field to $update to select a subset of the input document.

Upon validation, the output document includes the subset of objects for request, information, response and original.

Download this Pipeline.

Creating a RESTlet using the GET method to perform multiple GET requests to retrieve five pages

The following example Pipeline demonstrates how you can perform multiple GET requests to retrieve five pages. We use the NetSuite Call RESTlet and Mapper Snaps in this example.

First, we configure the NetSuite Call RESTlet Snap to retrieve five pages using the Query ParametersHas Next, and Query Parameters For Next fields.

Then, we configure the Mapper Snap with inputs from the upstream NetSuite Call RESTlet Snap.

Upon validation, the output consists of five documents, (one document per page).

Download this Pipeline.

Downloads

Important Steps to Successfully Reuse Pipelines

  1. Download and import the Pipeline into SnapLogic.
  2. Configure Snap accounts as applicable.
  3. Provide Pipeline parameters as applicable.


Snap Pack History

 Click to view/expand
ReleaseSnap Pack VersionDateTypeUpdates
November 2024main29029 StableUpdated and certified against the current SnapLogic Platform release.
August 2024main27765 StableUpdated and certified against the current Snaplogic Platform release.
May 2024437patches26823 Latest

In a specific scenario where the body is absent in the SOAP request, the NetSuite Search Snap reloads the envelope to prevent the Snap from erroring out.

May 2024437patches26705 Latest

Added NetSuite Get Server Time Snap to the NetSuite SOAP Snap Pack. This Snap returns the NetSuite server time in GMT, regardless of the user's time zone.

May 2024main26341 Stable

Updated the following NetSuite SOAP Snap names for usability based on the functionality of the Snaps:

February 2024436patches25953 Latest

Upgraded Apache CXF from version 3.4.2 to 3.6.3 to prevent vulnerability issues.

February 2024436patches25995 Latest

Updated the default and maximum batch size for NetSuite Add List and NetSuite Async Add List Snaps as follows:
NetSuite Add List:
Default batch size: 100
Maximum batch size: 200

NetSuite Async Add List:
Default batch size: 200
Maximum batch size: 400

February 2024436patches25852 Latest

Added the following Snaps to the NetSuite SOAP Snap Pack:

  • NetSuite Add List: Adds a list of records in bulk to NetSuite.

  • NetSuite Async Add List: Inserts a list of records in NetSuite asynchronously, and the Snap returns a job ID after a successful operation.

February 2024436patches25801 Latest

Fixed an issue with NetSuite Upsert Snap that displayed a null pointer exception when the account had insufficient permissions. Now the Snap displays a configuration exception when the customFieldRecord is null.

February 2024main25112 StableUpdated and certified against the current SnapLogic Platform release.
November 2023main23721 Stable

The existing NetSuite Snap Pack is renamed to NetSuite SOAP due to the introduction of the NetSuite REST Snap Pack.

August 2023

main22460

 


Stable

Updated and certified against the current SnapLogic Platform release.

May 2023433patches21878 Latest

The Snap Pack now supports Customer-Subsidiary and Vendor-Subsidiary relationship Object types.

NetSuite's application requires the Oneworld extension for utilizing these subsidiary relationships, and Snap integration must use WSDL 2019_1 or later versions.

May 2023

main21015 

Stable

Upgraded with the latest SnapLogic Platform release.

February 2023main19844 StableUpgraded with the latest SnapLogic Platform release.
November 2022main18944 Stable

The following Snaps now handle lineage properly when used in an Ultra Pipeline: NetSuite Get Item Availability, NetSuite Delete, and NetSuite GetList.

August 2022main17386 StableUpgraded with the latest SnapLogic Platform release.
4.29 Patch429patches16915 Latest

Fixed an issue with NetSuite Search Snap where the Snap displayed the Could not translate an element declaration element exception intermittently when multiple search Snaps are executed simultaneously.

4.29main15993 StableUpgraded with the latest SnapLogic Platform release.
4.28main14627 StableUpgraded with the latest SnapLogic Platform release.
4.27 Patch427patches13080 LatestFixed an XML parsing issue with stripping empty elements for the NetSuite Snaps.
4.27 Patch427patches13072 Latest

Fixed an issue in the NetSuite Search Snap where the Snap failed when the body is not present in the SOAP request.

4.27main12833 StableUpgraded with the latest SnapLogic Platform release.
4.26main11181 StableUpgraded with the latest SnapLogic Platform release.
4.25main9554
 
StableUpgraded with the latest SnapLogic Platform release.
4.24 Patch424 patches8891 Latest

Introduced the new Snap NetSuite Call RESTlet that enables calling 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.

4.24main8556
StableUpgraded with the latest SnapLogic Platform release.
4.23main7430
 
StableUpgraded with the latest SnapLogic Platform release.
4.22main6403
 
StableUpgraded with the latest SnapLogic Platform release.
4.21snapsmrc542

 

Stable
  • Removed the obsolete Sandbox Account check box from the NetSuite Token Account.

  • Removed the now redundant Custom WSDL URL Domain field from the NetSuite Token Account to support NetSuite's transition to automatic account-specific domain identification.

4.20 Patch netsuite8799 Latest

Updates the NetSuite Create, Update, Upsert, and Async Upsert Snaps to use the Classification type instead of Class, to resolve schema generation issues. While the Class type remains available in the NetSuite Search and Async Search Snaps for backwards compatibility, use of the Classification type is recommended.

4.20

snapsmrc535

 
StableUpgraded with the latest SnapLogic Platform release.
4.19snaprsmrc528
 
Stable

Certified the NetSuite Snap Pack against the NetSuite version 2019.1. This does not impact existing Pipelines.

4.18 Patch netsuite7879 Latest

Fixed the NetSuite Snaps where the Snaps intermittently fail to reach, cache, and view the NetSuite WSDL and XSD files.

4.18 Patch netsuite7779 Latest

Fixed an issue with the NetSuite Update Snap and the NetSuite Create Snap wherein the Snaps are unable to properly handle null values for the standard and the custom fields.

4.18snapsmrc523
 
StableUpgraded with the latest SnapLogic Platform release.
4.17ALL7402
 
Latest

Pushed automatic rebuild of the latest version of each Snap Pack to SnapLogic UAT and Elastic servers.

4.17snapsmrc515
 
Latest
  • Deprecated the NetSuite Credential account type.

  • Added the Snap Execution field to all Standard-mode Snaps. In some Snaps, this field replaces the existing Execute during preview check box.

4.16 Patch netsuite6911 Latest

Fixed an issue with running multiple Pipelines by lazy-fetching custom fields metadata.

4.16snapsmrc508
 
Stable

Custom fields are not displayed in the updated NetSuite Create, Update, Upsert, Search, Async Upsert, or Async Search Snaps. They are visible only for Snaps where you have configured custom fields with SnapLogic 4.15 or earlier releases. With the updated NetSuite Snaps, you must connect a Mapper Snap as an upstream Snap to map custom fields.


4.15snapsmrc500
 
StableUpgraded with the latest SnapLogic Platform release.
4.14snapsmrc490
 
StableUpgraded with the latest SnapLogic Platform release.
4.13

snapsmrc486

 
StableUpgraded with the latest SnapLogic Platform release.
4.12 Patchnetsuite4888 Latest

Increased the maximum timeout to two minutes when parsing the WSDL file to fix an issue where the Netsuite Snap Pack is unable to parse XML schema information from the given WSDL file.

4.12

snapsmrc480

 
StableUpgraded with the latest SnapLogic Platform release.
4.11 Patch netsuite4382 Latest

Resolved an issue with the NetSuite Search, Create and Update Snaps that now show the custom field suggestions in the drop down.

4.11 Patch netsuite4296 Latest

Resolved an issue with NetSuite Update and Search Snaps where Custom fields are not populated on the Snaps.

4.11snapsmrc465
 
StableUpgraded with the latest SnapLogic Platform release.
4.10

snapsmrc414

 
StableUpgraded with the latest SnapLogic Platform release.
4.9.0 Patch netsuite3227 Latest

Addressed an issue with retry disabled if the reason field contains INVALID_KEY_OR_REF

4.9.0 Patch netsuite3112 Latest

Addressed an issue in NetSuite Upsert where List/Record type is sent as MultiSelectCustomFieldRef.

4.9.0 Patch netsuite3015 Latest

Added Thread Safety to the creation of Soap Request Message for the NetSuite Search Snap.

4.9snapsmrc405
 
StableUpgraded with the latest SnapLogic Platform release.
4.8.0 Patch netsuite2839 Latest

Provided a new property for custom WSDL support for NetSuite

4.8.0 Patch netsuite2704 Latest

Fixed performance issue on NetSuite Snap Pack which was caused by the WSDL imports.

4.8

snapsmrc398

 
Stable
  • Route records to appropriate views and Pass through properties added to the Netsuite Upsert, Delete and GetList Snaps.
  • Introduced the NetSuite Get Async Result, NetSuite Check Async Status, NetSuite Async Delete, NetSuite Async Get, NetSuite Async Upsert, NetSuite Async Search Snaps in this release.
  • Info tab added to accounts.
4.7

snapsmrc382

 
StableUpgraded with the latest SnapLogic Platform release.
4.6.0 Patch netsuite1855 
  • Resolved an issue with the NetSuite Search Snap intermittently generating a "The body is not present in the SOAP request" error.
4.6snapsmrc362
 
Stable
  • Maximum request attempts and Retry request interval options added to the NetSuite Upsert, Get, Get List, Create, Search, Delete and Update Snaps.
  • NetSuite Get Item Availability Snap was introduced in this release.
  • Resolved an issue in NetSuite Snap Pack that caused Snaps to fail with read timeout errors.
  • Enhanced the NetSuite Snaps to support custom fields on the following object types: VendorBill, VendorBillItem, VendorBillExpense, ExpenseReportExpense, PurchaseOrderExpense. Additionally, Address on Contact, Customer, Partner, Vendor, Job, & Employee are also supported when using WSDL version 2014.2 or later.
  • Enhanced the NetSuite Search Snap to support the general object types Item and Transaction, rather than just their more specific subtypes.
  • Resolved an issue with the NetSuite Upsert Snap that was incorrectly handling some failed requests as successful requests. Any response containing at least one error status is now written to the error view instead of the output view.
4.5.1

netsuite1565

 
Stable
  • Updated the Search Snap to support advanced search. This enables you to execute a saved search using its ID & search for relevant records in it. 
  • Fixed an error in NetSuite Update Snap that restricted access to a custom field in the addressbook sublist of a contact object.
4.5

snapsmrc344

Stable
  • Item and Inventory Item added as options for the Object property in NetSuite Search.
  • Token Based Authentication for SuiteTalk web services added.
  • Resolved an issue in NetSuite Snaps to ensure appropriate handling and display of error messages during failure.
  • Resolved an issue in NetSuite Snaps that occurred when different values were entered for a custom field.
  • Resolved an issue in NetSuite Search Snap to ensure all records are returned when the input search criteria is empty.
  • NetSuite Snaps are enhanced to support the APIs from 2016 (version 2016). Starting from SnapLogic 4.5 release, only APIs from 2014 or later are supported.
  • MIGRATION IMPACT: Note that the accounts have changed for NetSuite. The existing NetSuite account was renamed to NetSuite Credentials Account; the properties of WSDL Release and WSDL Patch were added and the Testdrive account option was removed. A NetSuite Token Account was also added.
4.4.1
 Stable
  • SnapLogic's pre-assigned NetSuite Application ID is now in every header sent for NetSuite Calls.
  • Resolved an issue with a memory leak in this Snap Pack.
  • Resolved an issue that occurred while collecting JSON schema information.
  • Resolved an issue with setting a custom field to blank in the Update, Create, and Upsert Snaps.
  • Resolved an issue with not being able to clear standard fields that have a value in Update and Upsert Snaps.
  • Resolved an issue with "custom field" suggest showing an error when using a standard type with only one active custom field definition.
  • Resolved an issue with NetSuite Search Snap not producing contact address info as output.
  • In validation/preview mode only, WSDL versions are checked for consistency between the Snap and the Account.
4.4.0
 Stable
  • Resolved an issue with NetSuite Search Snap ignoring criteria from an input document if any custom field criteria was specified in the Snap.
  • Support for Custom Records added.
  • Support for additional object types added.
  • Support for custom fields for all Transaction types added.
  • Support for custom fields of type Checkbox (boolean) added to the Search, Create, and Update Snaps.
  • Support for custom fields of type Date and Decimal added to the Create and Update Snaps.
  • Resolved an issue with the consistency of the output schema when Search returned more than one page.
4.3.2
 Stable
  • Resolved an issue with custom fields not appearing in the Update Snap.
  • Resolved an issue with NetSuite Create with custom field not showing in the output payload.
  • Improved performance of the NetSuite Snap Pack.
4.2.2
 StableSnaps tested against NetSuite server version 2015.2.


See Also