NetSuite

NetSuite is Oracle's cloud-based ERP system for business management.

Overview

The NetSuite connector lets Spojit workflows read and write NetSuite records (customers, sales orders, invoices, items, item fulfillments) and run ad-hoc SuiteQL queries against any table you have permission to read. It uses the SuiteTalk REST Record service and the SuiteQL query endpoint, with a raw-request escape hatch for anything not covered by a dedicated tool.

Spojit users typically use NetSuite as the source-of-truth ERP downstream of one or more e-commerce stores and POS systems - syncing orders, customers, and invoices in, and pulling inventory, item, and financial data out for reporting and other channels.

What You Can Do

The NetSuite connector exposes these tools:

  • verify-connection - Verify the token works against your account.
  • run-suiteql - Run a SuiteQL query for arbitrary read access.
  • list-record-types - List record types available on your account.
  • get-record-metadata - Inspect the field schema for a given record type.
  • list-records - List records of any type with filters.
  • get-record - Fetch a single record by ID and type.
  • create-record - Create a record of any type.
  • update-record - Update fields on a record.
  • upsert-record - Insert or update a record by external ID.
  • delete-record - Delete a record by ID.
  • list-customers / get-customer / create-customer / update-customer - Customer-specific shortcuts.
  • list-sales-orders / get-sales-order - Sales order reads.
  • list-invoices / get-invoice - Invoice reads.
  • list-items / get-item - Item reads.
  • list-item-fulfillments / get-item-fulfillment / create-item-fulfillment - Fulfillment lifecycle.
  • get-sublist / add-sublist-item - Read and append to record sublists (e.g. item lines on a sales order).
  • raw-request - Call any NetSuite REST endpoint not covered by a dedicated tool.

Authentication

NetSuite uses Token-Based Authentication (TBA). Set up an integration and access token in NetSuite admin under Setup -> Integrations -> Manage Integrations -> New (enable Token-Based Authentication, save, then copy the Consumer Key and Consumer Secret), then under Setup -> Users/Roles -> Access Tokens -> New create a token tied to the integration and a role with the right permissions (REST Web Services, Lists -> Customers/Orders/Items/Invoices). Copy the Token ID and Token Secret.

You'll need these five values to authenticate: Account ID, Consumer Key, Consumer Secret, Token ID, Token Secret. The role attached to the access token determines which records the connection can read and write - grant least privilege.

Setting Up Your Connection

  1. In NetSuite, enable Token-Based Authentication and REST Web Services under Setup -> Company -> Enable Features -> SuiteCloud.
  2. Create an integration record (Setup -> Integrations -> Manage Integrations -> New), tick Token-Based Authentication, save, and copy the Consumer Key and Consumer Secret.
  3. Create a role with the permissions your workflows need, assign it to a user, and create an access token (Setup -> Users/Roles -> Access Tokens -> New) against that user, role, and integration. Copy the Token ID and Token Secret.
  4. Note your Account ID (visible under Setup -> Company -> Company Information, e.g. 1234567 or 1234567_SB1 for sandboxes).
  5. In Spojit, go to Connections and click + Add Connection.
  6. Search for NetSuite and select it.
  7. Paste the Account ID, Consumer Key/Secret, and Token ID/Secret. Name the connection something descriptive (e.g. NetSuite - Production).
  8. Click Save. Spojit calls verify-connection and marks the connection Active when it succeeds.

Using in a Workflow

Add a Connector node, select your NetSuite connection, and pick a mode:

  • Direct Mode - Best for high-volume syncs (order ingestion, nightly invoice creation, inventory pulls). Tool sequences are deterministic and inputs are bound from the upstream step.
  • Agent Mode - Best for ad-hoc lookups and reporting agents ("find recent invoices for this customer and summarise the overdue balance").

For large reads, prefer run-suiteql over list-records - SuiteQL pages efficiently with cursor pagination and lets you join and filter server-side instead of post-filtering in your workflow.

Tips

  • Use external IDs for idempotent syncs. upsert-record by external ID makes order-sync workflows safe to rerun without duplicates.
  • Inspect schema before writing. Call get-record-metadata for an unfamiliar record type to discover required fields, sublists, and field types before crafting a create-record payload.
  • Page SuiteQL with LIMIT + OFFSET. Large result sets need server-side pagination; 1000 rows per page is a safe default.
  • Cache record-type metadata. Schema rarely changes - fetch once per workflow run rather than per row.
  • Test in a sandbox account first. Sandbox account IDs have a _SB1 suffix; create a separate Spojit connection so workflows can run end-to-end against sandbox before production.

Common Pitfalls

  • Role permissions. The most common cause of 403s is the role attached to the access token missing a permission. Edit the role, add the permission, save - the token does not need re-issuing.
  • Custom fields require explicit IDs. Custom fields are exposed as custbody_*, custitem_*, etc. Always reference them by their internal ID, not their label.
  • Sublist edits. Editing an item line on a sales order isn't a flat field update - use get-sublist and add-sublist-item, or use the dedicated update-record with the sublist payload structure.
  • Subsidiary scoping. In OneWorld accounts, almost every record requires a subsidiary - omitting it returns confusing validation errors.
  • Concurrent write limits. NetSuite throttles concurrent writes per account; running large parallel create-record batches will trip rate limits. Run sequentially or in small parallel branches.

Common Use Cases

Related Articles

For technical API details and field specifications, see the NetSuite connector documentation.

Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.