NetSuite icon

NetSuite

NetSuite REST API

Overview

This node integrates with the NetSuite REST API to manage records within a NetSuite account. Specifically, the Remove Record operation allows users to delete a record of a specified type by its internal or external identifier.

Typical use cases include:

  • Automating cleanup of obsolete or incorrect data entries in NetSuite.
  • Integrating workflows that require removing records as part of business processes (e.g., deleting canceled sales orders or outdated customer contacts).
  • Batch deletion of multiple records based on input data.

For example, a user might configure this node to remove a Sales Order record by providing its internal ID, automating the removal process without manual intervention in the NetSuite UI.

Properties

Name Meaning
Record Type The type of NetSuite record to remove. Options include many standard record types such as Assembly Item, Billing Account, Calendar Event, Cash Sale, Contact, Customer, Invoice, Sales Order, Vendor, and more.
Custom Record Script ID When "Custom Record (*)" is selected as the Record Type, this string specifies the internal script ID of the custom record type to target for removal. These IDs typically start with customrecord.
ID The internal identifier of the record to remove. Can be prefixed with eid: to indicate an external identifier instead of the internal one.
API Version The version of the NetSuite REST API to use. Currently only "v1" is supported.
Options Additional options:
Concurrency: Maximum number of concurrent REST requests sent to NetSuite (default 1).
Full Response: If true, returns the full HTTP response data instead of just the body content.

Output

The output JSON contains the result of the delete operation:

  • On success, it typically includes a success flag and may contain metadata such as operation ID, job ID, property validation info, and links related to the deleted record.
  • On failure, the output contains error details including error code, message, and possibly detailed error information from NetSuite.

No binary data is produced by this node.

Example successful output snippet:

{
  "success": true,
  "id": "12345",
  "operationId": "abcde",
  "jobId": "fghij"
}

Example error output snippet:

{
  "error": "Record not found"
}

Dependencies

  • Requires valid credentials for authenticating with the NetSuite REST API, including account ID and API authentication tokens.
  • Uses the @fye/netsuite-rest-api package internally to make REST calls.
  • Supports concurrency control via the p-limit package to limit simultaneous requests.
  • Requires proper configuration of the API version (currently v1).

Troubleshooting

  • Common issues:

    • Invalid or missing record ID: Ensure the internal ID or external ID prefix (eid:) is correct.
    • Insufficient permissions: The API credentials must have rights to delete the specified record type.
    • Incorrect custom record script ID: For custom records, verify the script ID matches exactly.
    • API rate limits: If concurrency is set too high, you may hit NetSuite API rate limits; reduce concurrency accordingly.
  • Error messages:

    • "Record not found": The specified record ID does not exist or is inaccessible.
    • "Insufficient permissions": The API user lacks delete privileges for the record type.
    • Network or authentication errors: Check API credentials and network connectivity.
  • To handle errors gracefully, enable "Continue on Fail" in the node settings to prevent workflow interruption.

Links and References

Discussion