api-systems-connext

A NetSuite Quoting API for an External Sales Application

Overview

An industrial supply distributor, part of a group that runs several ERP systems, gave its sales team one external quoting application across all of them. Its NetSuite business had to plug in: quotes created in the app needed to become real NetSuite estimates and sales orders, with items, pricing and status kept in sync. We designed and built the NetSuite side, a secure, documented RESTlet API.

The challenge

  • The quoting app spanned several ERPs, so NetSuite needed a stable, well-defined interface.
  • Quotes created outside NetSuite still had to follow NetSuite's customer, item and pricing rules.
  • Network retries could create duplicate quotes or orders.
  • The app needed to know when quotes and orders changed, but NetSuite has no static outbound IP addresses, so the receiving service couldn't restrict webhooks by IP.

The solution

We built the NetSuite integration layer in SuiteScript 2.1: a RESTlet API backed by a shared library, workflow action scripts for status events, and scheduled maintenance.

One RESTlet API for quotes, orders and items

A single RESTlet routes actions by method: reading and listing quotes and orders, creating, updating and closing quotes, converting a quote to a sales order, and searching items. Requests and responses are JSON, authentication is token-based under a dedicated integration role, and errors come back in a standard format with a code and message.

Built for safe retries

Every write carries a request ID that is stored in a custom integration log. If the same request arrives again, the API returns the original response instead of creating a duplicate. Quote lines are matched by a persistent external line ID, so updates add, change or remove exactly the right lines, and closed quotes and sales orders are protected from edits.

NetSuite pricing and validation

Customers and items are validated before any record is created, and NetSuite recalculates totals. Item search supports partial matching for autocomplete and returns customer-specific pricing from NetSuite price levels, or the list price when no customer is given.

Status updates through an event feed

Instead of outbound webhooks, workflow action scripts write each quote and order lifecycle event to an event feed that the app polls. Fulfillment and invoicing events roll up to their sales order, and each event is configured as its own workflow deployment. The feed keeps 30 days of history so the app can catch up after downtime, and a scheduled script purges old log and feed records.

Paging within NetSuite governance

List and search endpoints return results in pages with a bounded page size and total counts, so large requests stay inside NetSuite's governance limits.

Documented with OpenAPI

The endpoints are documented in an OpenAPI (Swagger) specification, so the app's developers can see every action, field, validation rule and error response.

The outcome

Sales reps quote in one application regardless of which ERP a business runs. For the NetSuite business, those quotes become estimates and sales orders that follow NetSuite's pricing and validation, retries never create duplicates, and the app stays in sync through the event feed.

Conclusion

When an outside application writes to NetSuite, the API has to be as careful as the ERP itself: validated, safe to retry and clearly documented. Building it that way lets a multi-ERP sales tool treat NetSuite as a reliable system of record.