NetSuite Reference
Build on NetSuite without limits. Sync all your NetSuite data to your Postgres database in real-time. Query your Accounts, Deposits, and Customers with SQL or your ORM. Get all API events in a hosted Kafka cluster. And insert
, update
, or delete
NetSuite records in both NetSuite and your database simultaneously.
Pardon the mess
You are viewing docs related to an older version of Sequin. We’re in the process of updating our provider-specific guides and will be done in a few weeks (May 2024). Please click here to view the latest version of the docs.
If you’re interested in NetSuite and want to learn more about what’s changing, send us a note.
Supported objects
Sequin supports all custom NetSuite objects, as well as all custom NetSuite fields.
Sequin also supports the following standard NetSuite objects:
Communication Records
Collection Name | Read | Write |
---|---|---|
Event | ✅ | |
Message | ✅ | |
Phone Call | ✅ | |
Task | ✅ | ✅ |
Entity Records
Collection Name | Read | Write |
---|---|---|
Contact | ✅ | ✅ |
Contact Category | ✅ | ✅ |
Contact Role | ✅ | ✅ |
Customer | ✅ | ✅ |
Employee | ✅ | ✅ |
Vendor Category | ✅ | ✅ |
List Records
Collection Name | Read | Write |
---|---|---|
Bin | ✅ | ✅ |
Unit of Measure | ✅ |
ERP Records
Collection Name | Read | Write |
---|---|---|
Account | ✅ | ✅ |
Accounting Period | ✅ | |
Advanced Intercompany Journal Entry | ✅ | ✅ |
Bin Transfer | ✅ | ✅ |
Class | ✅ | |
Cost Category | ✅ | |
Customer Category | ✅ | ✅ |
Customer Deposit | ✅ | ✅ |
Customer Payment | ✅ | ✅ |
Customer Refund | ✅ | ✅ |
Customer Subsidiary Relationship | ✅ | ✅ |
Department | ✅ | ✅ |
Deposit | ✅ | |
Deposit Application | ✅ | |
Description Item | ✅ | ✅ |
Discount Item | ✅ | ✅ |
Expense Category | ✅ | ✅ |
Expense Report | ✅ | |
Fulfillment Request | ✅ | |
Inbound Shipment | ✅ | |
Intercompany Journal Entry | ✅ | ✅ |
Intercompany Transfer Order | ✅ | ✅ |
Inventory Adjustment | ✅ | ✅ |
Inventory Cost Revaluation | ✅ | ✅ |
Inventory Count | ✅ | ✅ |
Inventory Item | ✅ | ✅ |
Inventory Number | ✅ | |
Inventory Transfer | ✅ | ✅ |
Item Fulfillment | ✅ | |
Item Group | ✅ | ✅ |
Item Receipt | ✅ | |
Job | ✅ | ✅ |
Job Status | ✅ | |
Job Type | ✅ | ✅ |
Journal Entry | ✅ | ✅ |
Kit Item | ✅ | ✅ |
Location | ✅ | ✅ |
Nexus | ✅ | |
Non-Inventory Purchase Items | ✅ | ✅ |
Non-Inventory Sale Item | ✅ | ✅ |
Non-Inventory Resale Item | ✅ | ✅ |
Other Charge for Purchase Item | ✅ | ✅ |
Other Charge for Resale Item | ✅ | ✅ |
Other Name | ✅ | ✅ |
Other Name Category | ✅ | |
Payment Item | ✅ | ✅ |
Project Task | ✅ | ✅ |
Purchase Order | ✅ | ✅ |
Requisition | ✅ | ✅ |
Sales Tax Item | ✅ | ✅ |
Service Purchase Item | ✅ | ✅ |
Service Resale Item | ✅ | ✅ |
Service Sale Item | ✅ | ✅ |
Ship Item | ✅ | ✅ |
Statistical Journal Entry | ✅ | |
Subsidiary | ✅ | ✅ |
Subtotal Item | ✅ | ✅ |
Tax Type | ✅ | |
Time Bill (Track Time) | ✅ | ✅ |
Transfer Order | ✅ | ✅ |
Vendor | ✅ | ✅ |
Vendor Bill | ✅ | ✅ |
Vendor Credit | ✅ | ✅ |
Vendor Prepayment | ✅ | ✅ |
Vendor Prepayment Application | ✅ | ✅ |
Vendor Return Authorization | ✅ | ✅ |
Vendor Subsidiary Relationship | ✅ | ✅ |
Marketing Records
Collection Name | Read | Write |
---|---|---|
Email Template | ✅ |
SuiteBilling Records
Collection Name | Read | Write |
---|---|---|
Assembly Item | ✅ | ✅ |
Billing Account | ✅ | ✅ |
Billing Schedule | ✅ | ✅ |
Change Order | ✅ | ✅ |
Charge | ✅ | ✅ |
Price Book | ✅ | ✅ |
Price Plan | ✅ | ✅ |
Pricing Group | ✅ | ✅ |
Subscription | ✅ | ✅ |
Subscription Line | ✅ | ✅ |
Subscription Plan | ✅ | ✅ |
Subscription Term | ✅ | ✅ |
Usage | ✅ |
Pricing Records
Collection Name | Read | Write |
---|---|---|
Cash Refund | ✅ | ✅ |
Cash Sale | ✅ | ✅ |
Check | ✅ | ✅ |
Consolidated Exchange Rate | ✅ | |
Credit Card Charge | ✅ | ✅ |
Credit Card Refund | ✅ | ✅ |
Credit Memo | ✅ | ✅ |
Currency | ✅ | |
Estimate | ✅ | ✅ |
Invoice | ✅ | ✅ |
Markup Item | ✅ | ✅ |
Opportunity | ✅ | ✅ |
Want a NetSuite object we’re not syncing? We can add it fast. Send us a note.
Setup & installation
Enable the OAuth 2.0 feature
First, you must ensure that OAuth 2.0 is enabled for your NetSuite account:
- Go to Setup > Company > Enable Features.
- Click the SuiteCloud sub-tab.
- In the SuiteScript section, check both Client SuiteScript and Server SuiteScript.
- In the Manage Authentication section, check the OAuth 2.0 box.
- Click Save.
Setup OAuth 2.0 roles
Next, you’ll need to setup a NetSuite user with OAuth 2.0 permissions. This will be the OAuth user that you use when connecting Sequin to your NetSuite account.
First, create or customize a role with OAuth 2.0 permissions:
- Go to Setup > Users/Roles > Manage Roles.
- Select a role to customize and add OAuth 2.0 permissions.
Then, assign the role to a user:
- Go to the user entity record (Lists > Employees > Employees for employees; List > Relationships for customers, partners, or vendors).
- Edit the user and go to the Access tab.
- On the Roles sub-tab, select the role you previously assigned OAuth 2.0 permissions and click Add.
- Click Save.
Create an integration record for the Sequin application
Next, you’ll need to create an integration record for Sequin:
- Go to Setup > Integration > New.
- Name the application “Sequin.”
- Select “Enabled” in the State field.
- Under the Authentication tab, check the necessary OAuth 2.0 options (Authorization Code Grant, Client Credentials Grant, etc.).
- For the redirect URI, use
https://api.sequin.io/api/oauth2/callback/netsuite
. - Click Save.
With OAuth 2.0 setup on your NetSuite instance, you’ll now be able to connect Sequin to your NetSuite account. Over on Sequin, add NetSuite as a source and follow the setup flow.
The syncing process
We first backfill your database with all your NetSuite data. The duration of the backfill depends on the size of your NetSuite account. NetSuite accounts with millions of records can take a couple hours to complete. Smaller accounts are typically completed in just a few minutes. We’ll email you when your backfill is complete and Sequin has loaded all your data into your database.
After the initial backfill, Sequin will monitor NetSuite for changes. Changes are detected within seconds of occurring on NetSuite.
Learn more about [our syncing process]/syncs.
Read and write NetSuite data using SQL
You’ll connect to your database via Sequin’s Postgres Proxy, which lets you read from your synced tables as well as write to them. You can use any SQL client that works with Postgres.
Here’s an example of what your NetSuite tables might look like in your database:
db7nea89oah3tas=> \dt
List of relations
Schema | Name | Type | Owner
--------+---------------------------+-------+----------
public | _sync_cdc | table | sequin
public | customer | table | sequin
public | employee | table | sequin
public | sales_order | table | sequin
public | item_fulfillment | table | sequin
public | invoice | table | sequin
(6 rows)
You’ll see all the NetSuite objects you selected when setting up your sync are now tables in your database. You’ll also see a _sync_cdc
table which Sequin uses to manage your sync.
Here’s what it looks like to query the customer
table:
select
entity_id,
company_name,
email,
phone,
date_created,
last_order_date,
sales_rep,
balance,
credit_limit
from
customer
where
entity_id = 'duke-leto|123456';
Which returns a row that looks like:
-[ RECORD 1 ]----+--------------------------------
entity_id | duke-leto|123456
company_name | House Atreides
email | leto.atreides@dune.com
phone | +199923456789
date_created | 2023-11-10T08:00:00.000Z
last_order_date | 2023-11-10T09:30:00.000Z
sales_rep | Jessica Atreides
balance | 50000.00
credit_limit | 100000.00
Writing back to NetSuite is as simple as writing a SQL query. For example, you can update a customer’s credit limit like this:
update customer
set credit_limit = 150000.00
where entity_id = 'duke-leto|123456';
Sequin will write this change to both NetSuite and your database at the same time.
If a write to NetSuite fails, Sequin will roll back the write to your database. For example, if you try to update a customer’s balance to an invalid amount, you’ll receive a Postgres error:
update customer
set balance = 'invalid-amount'
where entity_id = 'duke-leto|123456';
ERROR: [NetSuite] invalid input syntax for type numeric: "invalid-amount"
Next steps
Your NetSuite tables are now available as fully readable and writeable tables in your database. You can query for all your data using SQL, and mutate data thanks to Sequin’s Postgres Proxy. To build on this foundation, here are some next steps:
- Setup your ORM to work with your synced tables.
- Edit the NetSuite objects and properties you’re syncing at any time.
- Create views on your NetSuite data to tailor your schema to your needs.
- Invite your team to your Sequin account and start building!
If you need assistance setting up your sync, just send us a note. We’re around and eager to help.
Was this page helpful?