NetSuite v2 (Beta) Execute RESTlet activity in Jitterbit Studio
Introduction
A NetSuite v2 (Beta) Execute RESTlet activity, using its NetSuite v2 (Beta) connection, calls a deployed NetSuite RESTlet script and is intended to be used as a source or target in an operation.
This activity calls a RESTlet script deployed in the NetSuite account directly, using the HTTP method, query parameters, and JSON request body you provide. The request body is passed to the script as is.
Note
To run a SuiteQL query with functionality beyond what the Query activity supports by default, create a RESTlet script that executes the query, then call the script with this activity as a source.
This connector is currently in beta. To provide feedback, contact the Jitterbit Product Team.
Prerequisites
A RESTlet script must already be deployed in the NetSuite account before it can be selected or called by this activity.
Create a NetSuite v2 (Beta) Execute RESTlet activity
An instance of a NetSuite v2 (Beta) Execute RESTlet activity is created from a NetSuite v2 (Beta) connection using its Execute RESTlet activity type.
To create an instance of an activity, drag the activity type to the design canvas or copy the activity type and paste it on the design canvas. For details, see Creating an activity instance in Component reuse.
An existing NetSuite v2 (Beta) Execute RESTlet activity can be edited from these locations:
- The design canvas (see Component actions menu in Design canvas).
- The project pane's Components tab (see Component actions menu in Project pane Components tab).
Configure a NetSuite v2 (Beta) Execute RESTlet activity
Follow these steps to configure a NetSuite v2 (Beta) Execute RESTlet activity:
-
Step 1: Specify the RESTlet and settings
Provide a name for the activity, specify the RESTlet script to call, and specify optional settings. -
Step 2: Provide a request schema
Optionally provide a custom request schema. -
Step 3: Provide a response schema
Optionally provide a custom response schema. -
Step 4: Review the data schemas
Any request or response schemas are displayed.
Step 1: Specify the RESTlet and settings
In this step, provide a name for the activity, specify the RESTlet script to call, and specify optional settings. Each user interface element of this step is described below.
Tip
Fields with a variable icon support using global variables, project variables, and Jitterbit variables. Begin either by typing an open square bracket [ into the field or by clicking the variable icon to display a menu listing existing variables to choose from.
-
Endpoint menu: If you have multiple endpoints of the same connector type configured, a menu at the top of the screen displays the current endpoint name. Click the menu to switch to a different endpoint. For more information, see Change the assigned endpoint in Configuration screens.
- Edit endpoint: Appears when you hover over the current endpoint name. Click to edit the currently selected endpoint's connection configuration.
-
Name: Enter a name to identify the activity. The name must be unique for each NetSuite v2 (Beta) Execute RESTlet activity and must not contain forward slashes
/or colons:. -
RESTlet: Select how to specify the RESTlet script to call, one of:
-
Select from deployed RESTlets: (Default.) Choose from a list of RESTlet scripts already deployed in the NetSuite account:
- Select a Deployed RESTlet: This table displays RESTlet scripts already deployed in the NetSuite account, with Script Name, Script ID, and Script Deployment ID columns.
Tip
This list is limited to the first 1,000 deployed RESTlets returned by NetSuite. If an expected RESTlet doesn't appear, use the Provide URL option instead.
-
Provide URL: Select this option to manually enter the RESTlet's script path:
- Script Path: Enter the RESTlet script path (for example,
/app/site/hosting/restlet.nl?script=166&deploy=1).
- Script Path: Enter the RESTlet script path (for example,
-
-
HTTP Method: Select the HTTP method to call the RESTlet with: GET (Default.), POST, PUT, or DELETE. Use GET to fetch data from a RESTlet, such as when the activity serves as a source.
-
Query Parameters: Visible when HTTP Method is GET or DELETE. Add one or more query parameter name/value pairs to send with the request.
-
Save & Exit: If enabled, click to save the configuration for this step and close the activity configuration.
-
Next: Click to temporarily store the configuration for this step and continue to the next step. The configuration will not be saved until you click the Finished button on the last step.
-
Discard changes: After making changes, click to close the configuration without saving changes made to any step. A message asks you to confirm that you want to discard changes.
Step 2: Provide a request schema
In this step, you can provide a custom request schema. If you do not provide a custom request schema, the connector's default request schema will be used. Each user interface element of this step is described below.
-
Provide Request Schema: The request schema defines the structure of request data that is used by the NetSuite v2 (Beta) Execute RESTlet activity. For instructions on completing this section of activity configuration, refer to Schemas defined in an activity.
-
Back: Click to temporarily store the configuration for this step and return to the previous step.
-
Next: Click to temporarily store the configuration for this step and continue to the next step. The configuration will not be saved until you click the Finished button on the last step.
-
Discard changes: After making changes, click to close the configuration without saving changes made to any step. A message asks you to confirm that you want to discard changes.
Step 3: Provide a response schema
In this step, you can provide a custom response schema. If you do not provide a custom response schema, the connector's default response schema will be used. Each user interface element of this step is described below.
-
Provide Response Schema: The response schema defines the structure of response data that is used by the NetSuite v2 (Beta) Execute RESTlet activity. For instructions on completing this section of activity configuration, refer to Schemas defined in an activity.
-
Back: Click to temporarily store the configuration for this step and return to the previous step.
-
Next: Click to temporarily store the configuration for this step and continue to the next step. The configuration will not be saved until you click the Finished button on the last step.
-
Discard changes: After making changes, click to close the configuration without saving changes made to any step. A message asks you to confirm that you want to discard changes.
Step 4: Review the data schemas
Any request or response schemas are displayed. Each user interface element of this step is described below.
-
Data schema: These data schemas are inherited by adjacent transformations and are displayed again during transformation mapping.
Note
Data supplied in a transformation takes precedence over the activity configuration.
The default request schema consists of a single field:
Parameter Type Required Description bodyString No The data to send to the RESTlet script. This field is presented as a typed, mappable field in the transformation, but its JSON value is passed to the RESTlet script as-is, with no fixed structure enforced. If you provide a custom request schema in Step 2, that schema replaces this default.
The response schema returns these fields:
isSuccess: Whether the call succeeded.statusCode: The HTTP status code returned by the RESTlet script.body: The RESTlet script's raw response.errors: Any errors returned by the call.
The NetSuite v2 (Beta) connector uses NetSuite's SuiteTalk REST Web Services. Refer to the API documentation for additional information.
-
Back: Click to temporarily store the configuration for this step and return to the previous step.
-
Finished: Click to save the configuration for all steps and close the activity configuration.
-
Discard changes: After making changes, click to close the configuration without saving changes made to any step. A message asks you to confirm that you want to discard changes.
Next steps
After configuring a NetSuite v2 (Beta) Execute RESTlet activity, complete the configuration of the operation by adding and configuring other activities, transformations, or scripts as operation steps. You can also configure the operation settings, which include the ability to chain operations together that are in the same or different workflows.
Menu actions for an activity are accessible from the project pane and the design canvas. For details, see Activity actions menu in Connector basics.
A NetSuite v2 (Beta) Execute RESTlet activity can be used as a source or a target, depending on how you use it in the operation:
- Source: Use the activity to fetch data from a RESTlet script, typically with the GET HTTP method, and send that data to another endpoint.
- Target: Use the activity to send data to a RESTlet script, for example to insert into NetSuite data that was retrieved from another system.
NetSuite v2 (Beta) Execute RESTlet activities that are used as a source can be used with these operation patterns:
- Transformation pattern
- Two-target archive pattern (as the first source only)
- Two-target HTTP archive pattern (as the first source only)
- Two-transformation pattern (as the first or second source)
NetSuite v2 (Beta) Execute RESTlet activities that are used as a target can be used with these operation patterns:
- Transformation pattern
- Two-transformation pattern (as the first or second target)
To use the activity with scripting functions, write the data to a temporary location and then use that temporary location in the scripting function.
When ready, deploy and run the operation and validate behavior by checking the operation logs.