NetSuite icon

NetSuite

NetSuite REST API

Overview

This node integrates with the NetSuite REST API to update existing records in a NetSuite account. It allows users to specify the type of record and the internal identifier of the record they want to update, along with the data changes. This is useful for automating updates to various business entities such as sales orders, customers, invoices, or custom records within NetSuite.

Common scenarios include:

  • Automatically updating customer information after receiving new data from another system.
  • Modifying sales order details based on external triggers.
  • Updating custom records that track specialized business processes.
  • Replacing or appending sublist data within records to keep them synchronized.

Practical example:

  • A workflow that listens for changes in an e-commerce platform and updates corresponding sales orders in NetSuite with shipping status or payment confirmation.

Properties

Name Meaning
Record Type The type of NetSuite record to update. Options include many standard record types like Assembly Item, Billing Account, Calendar Event, Cash Sale, Contact, Customer, Invoice, Sales Order, Vendor, and also Custom Records (requires script ID).
Custom Record Script ID Required if "Custom Record (*)" is selected as Record Type. This is the internal script ID identifying the custom record type in NetSuite.
ID The internal identifier of the record to update. Can be prefixed with eid: to use an external identifier instead.
Replace Sublists Comma-separated names of sublists on the record where all lines will be replaced by those specified in the update request. Sublists not listed will have lines added instead of replaced.
Replace Selected Fields Boolean flag indicating whether all fields that should be deleted must be included in the replace query parameter. If true, fields to delete must be explicitly specified.
API Version The version of the NetSuite REST API to use. Currently only "v1" is supported.
Options Additional options including:
- Concurrency: Maximum number of simultaneous REST requests sent to NetSuite (default 1).
- Full Response: Whether to return the full response data instead of just the body.

Output

The output consists of JSON objects representing the response from the NetSuite API for each updated record. The structure typically includes:

  • Success indicators and metadata such as operation IDs and job IDs.
  • Updated record data reflecting the changes made.
  • In case of errors, an error message describing what went wrong.

No binary data output is produced by this node.

Dependencies

  • Requires valid NetSuite API credentials with appropriate permissions to update records.
  • Uses the NetSuite REST API endpoint configured via these credentials.
  • Supports concurrency control to limit simultaneous API calls.
  • Requires n8n environment to provide credentials securely.

Troubleshooting

  • Common issues:

    • Invalid or missing record ID (internalId) will cause the update to fail.
    • Using incorrect or unsupported record types may result in errors.
    • Insufficient permissions in the NetSuite account can block updates.
    • Incorrectly formatted sublist replacement strings can lead to partial updates or failures.
    • Network or API rate limiting issues may cause timeouts or throttling errors.
  • Error messages:

    • Errors returned from NetSuite are captured and presented with descriptive messages.
    • If the node is set to stop on failure, it throws an error immediately; otherwise, it returns an error object in the output.
    • Common error hints include invalid identifiers, permission denied, or malformed request payloads.
  • Resolution tips:

    • Verify the record type and internal ID are correct.
    • Ensure the API credentials have update permissions.
    • Check the format of any sublist replacements.
    • Use the concurrency option to reduce request load if hitting rate limits.
    • Enable full response option to get detailed API feedback for debugging.

Links and References

Discussion