> ## Documentation Index
> Fetch the complete documentation index at: https://docs.nekt.com/llms.txt
> Use this file to discover all available pages before exploring further.

# NetSuite as a data source

> Bring data from NetSuite to Nekt.

NetSuite is a cloud-based business management software suite that includes ERP, financials, CRM, and e-commerce capabilities. It provides a comprehensive solution for managing business operations, financial data, and customer relationships.

<img height="50" src="https://mintcdn.com/nekt/cuPU45b7QEeSuPMC/assets/logo/logo-netsuite.png?fit=max&auto=format&n=cuPU45b7QEeSuPMC&q=85&s=c9a16d57b37ae87508d45c716526bcec" data-path="assets/logo/logo-netsuite.png" />

## Configuring NetSuite as a Source

In the [Sources](https://app.nekt.ai/sources) tab, click on the "Add source" button located on the top right of your screen. Then, select the NetSuite option from the list of connectors.

Click **Next** and you'll be prompted to add your access.

### 1. Add account access

You'll need your NetSuite API credentials for this connection. These can be obtained from your NetSuite account's Setup > Integration > Manage Integrations section. Once you have them, add the following credentials:

* **Consumer Key**: Your NetSuite consumer key for API authentication, obtained from a TBA integration record.
* **Consumer Secret**: Your NetSuite consumer secret for API authentication, obtained from a TBA integration record.
* **Token ID**: Your NetSuite token ID for API authentication, obtained when creating a TBA token associated with the integration record created above.
* **Token Secret**: Your NetSuite token secret for API authentication, obtained when creating a TBA token associated with the integration record created above.
* **Account ID**: Your NetSuite account ID. This can be extracted from your NetSuite URL. For example, if your URL is `https://123456.app.netsuite.com/` your account ID will be `123456`.
* **Date Filter Format**: The date format to use for incremental syncs. Choose from: `DD/MM/YYYY` (Brazilian format), `MM/DD/YYYY` (US format), `YYYY-MM-DD` (ISO format). This must match your NetSuite account configuration.
* **Start Date**: Records created or updated after this date will be extracted from the source.

<Note>
  This connector uses Token Based Authentication (TBA). Follow [this tutorial](https://docs.oracle.com/en/cloud/saas/netsuite/ns-online-help/article_0605103340.html#subsect_0605103551) to know more on how to create these credentials.
</Note>

### 2. Select streams

Choose which data streams you want to sync - you can select all streams or pick specific ones that matter most to you. The available streams are:

* Bill of Materials
* BOM Revision
* BOM Revision Component
* Billing Schedule
* BOM (Bill of Materials)
* BOM Revision
* BOM Revision Component
* Customers
* Department
* Items
* Location
* Previous Transaction Line Link
* Term
* Transaction Lines
* Transactions
* Units Type
* Units Type UOM
* Vendor

We use NetSuiteQL language to query your data, which allows for an efficient extraction process. The only limitation is that the data for each column returns as string, being necessary further processing to parse data to appropriate types (ex. numbers, dates, etc)

> Tip: The stream can be found more easily by typing its name.

Select the streams and click **Next**.

### 3. Configure data streams

Customize how you want your data to appear in your catalog. Select a name for each table (which will contain the fetched data) and the type of sync.

* **Table name**: we suggest a name, but feel free to customize it. You have the option to add a **prefix** and make this process faster!
* **Sync Type**: you can choose between INCREMENTAL and FULL\_TABLE.
  * Incremental: every time the extraction happens, we'll get only the new or modified data since the last sync - which is good for maintaining an efficient data pipeline.
  * Full table: every time the extraction happens, we'll get the current state of the data - which is good if you want to ensure complete data accuracy.

Once you are done configuring, click **Next**.

### 4. Configure data source

Describe your data source for easy identification within your organization, not exceeding 140 characters.

To define your [Trigger](https://docs.nekt.com/runs/scheduling-and-triggers), consider how often you want data to be extracted from this source. This decision usually depends on how frequently your NetSuite data is updated and how current you need your analytics to be.

Optionally, you can determine when to execute a [full sync](https://docs.nekt.com/get-started/core-concepts/types-of-sync#additional-full-sync). This will complement the incremental data extractions, ensuring that your data is completely synchronized with your source every once in a while.

Once you are ready, click **Next** to finalize the setup.

### 5. Check your new source

You can view your new source on the [Sources](https://app.nekt.ai/sources) page. If needed, manually trigger the source extraction by clicking on the arrow button. Once executed, your data will appear in your Catalog.

<Warning>For you to be able to see it on your [Catalog](https://app.nekt.ai/catalog), you need at least one successful source run.</Warning>

# Streams and Fields

Below you'll find all available data streams from NetSuite and their corresponding fields:

<AccordionGroup>
  <Accordion title="Bill of Materials">
    Stream for fetching Bill of Materials records from NetSuite.

    | Field                       | Type   | Description                                     |
    | :-------------------------- | :----- | :---------------------------------------------- |
    | `id`                        | String | Internal ID                                     |
    | `links`                     | Array  | Links associated with the BOM                   |
    | `name`                      | String | BOM name                                        |
    | `memo`                      | String | Memo                                            |
    | `subsidiary`                | String | Subsidiary ID                                   |
    | `externalid`                | String | External ID                                     |
    | `isinactive`                | String | Indicates if the BOM is inactive                |
    | `includechildren`           | String | Indicates if children subsidiaries are included |
    | `usecomponentyield`         | String | Indicates if component yield is used            |
    | `availableforallassemblies` | String | Available for all assemblies                    |
    | `availableforalllocations`  | String | Available for all locations                     |
    | `availableforlocations`     | String | Available for specific locations                |
    | `availableforsubisidiaries` | String | Available for specific subsidiaries             |
    | `restricttoassemblies`      | String | Restrict to specific assemblies                 |
    | `bomrevision`               | String | BOM revision ID                                 |
    | `usedonassembly`            | String | Assembly items using this BOM                   |
    | `legacybom`                 | String | Indicates if this is a legacy BOM               |
    | `createddate`               | String | Date created                                    |
    | `lastmodifieddate`          | String | Last modified date                              |
  </Accordion>

  <Accordion title="BOM Revision">
    Stream for fetching BOM Revision records from NetSuite.

    | Field                 | Type   | Description                           |
    | :-------------------- | :----- | :------------------------------------ |
    | `id`                  | String | Internal ID                           |
    | `links`               | Array  | Links associated with the revision    |
    | `name`                | String | Revision name                         |
    | `billofmaterials`     | String | Parent BOM ID                         |
    | `externalid`          | String | External ID                           |
    | `memo`                | String | Memo                                  |
    | `isinactive`          | String | Indicates if the revision is inactive |
    | `effectivestartdate`  | String | Effective start date                  |
    | `effectiveenddate`    | String | Effective end date                    |
    | `previousrevisionkey` | String | Previous revision key ID              |
    | `createddate`         | String | Date created                          |
    | `lastmodifieddate`    | String | Last modified date                    |
  </Accordion>

  <Accordion title="BOM Revision Component">
    Stream for fetching BOM Revision Component records from NetSuite.

    | Field                 | Type   | Description                                |
    | :-------------------- | :----- | :----------------------------------------- |
    | `id`                  | String | Internal ID                                |
    | `links`               | Array  | Links associated with the component        |
    | `bomrevision`         | String | Parent BOM Revision ID                     |
    | `item`                | String | Item ID                                    |
    | `displayname`         | String | Display name                               |
    | `description`         | String | Component description                      |
    | `quantity`            | String | Quantity                                   |
    | `units`               | String | Units of measure                           |
    | `componentyield`      | String | Component yield percentage                 |
    | `bomquantity`         | String | BOM quantity                               |
    | `itemsource`          | String | Item source                                |
    | `lineid`              | String | Line ID                                    |
    | `isoutsourcingcharge` | String | Indicates if this is an outsourcing charge |
  </Accordion>

  <Accordion title="Billing Schedule">
    Stream for fetching billing schedule records from NetSuite. Billing schedules define the recurring billing terms for transactions.

    | Field             | Type   | Description                                       |
    | :---------------- | :----- | :------------------------------------------------ |
    | `id`              | String | Internal ID                                       |
    | `name`            | String | Name of the billing schedule                      |
    | `links`           | Array  | Links associated with the billing schedule        |
    | `applytosubtotal` | String | Indicates if the schedule applies to the subtotal |
    | `billforactuals`  | String | Specifies if only actual time should be invoiced  |
    | `frequency`       | String | Frequency of the billing recurrence               |
    | `inarrears`       | String | Specifies if billing is in arrears                |
    | `initialamount`   | String | The initial amount to be billed                   |
    | `isinactive`      | String | Indicates if the billing schedule is inactive     |
    | `ispublic`        | String | Indicates if the billing schedule is public       |
    | `numberremaining` | String | Number of recurrences remaining                   |
    | `repeatevery`     | String | Repeat every X period(s)                          |
    | `scheduletype`    | String | Type of schedule                                  |
    | `transaction`     | String | Transaction ID                                    |
  </Accordion>

  <Accordion title="BOM (Bill of Materials)">
    Stream for fetching Bill of Materials records from NetSuite. BOMs define the components and quantities needed to build an assembly item.

    **Key Fields:**

    * `id` - Internal ID
    * `links` - Links associated with the BOM
    * `name` - BOM name
    * `memo` - Memo
    * `subsidiary` - Subsidiary ID
    * `externalid` - External ID
    * `isinactive` - Indicates if the BOM is inactive
    * `includechildren` - Indicates if children subsidiaries are included
    * `usecomponentyield` - Indicates if component yield is used
    * `availableforallassemblies` - Available for all assemblies
    * `availableforalllocations` - Available for all locations
    * `availableforlocations` - Available for specific locations
    * `availableforsubisidiaries` - Available for specific subsidiaries
    * `restricttoassemblies` - Restrict to specific assemblies
    * `bomrevision` - BOM revision ID
    * `usedonassembly` - Assembly items using this BOM
    * `legacybom` - Indicates if this is a legacy BOM
    * `createddate` - Date created
    * `lastmodifieddate` - Last modified date
  </Accordion>

  <Accordion title="BOM Revision">
    Stream for fetching BOM Revision records from NetSuite. Revisions represent versioned configurations of a Bill of Materials, with effective date ranges.

    **Key Fields:**

    * `id` - Internal ID
    * `links` - Links associated with the revision
    * `name` - Revision name
    * `billofmaterials` - Parent BOM ID (foreign key to BOM)
    * `externalid` - External ID
    * `memo` - Memo
    * `isinactive` - Indicates if the revision is inactive
    * `effectivestartdate` - Effective start date
    * `effectiveenddate` - Effective end date
    * `previousrevisionkey` - Previous revision key ID
    * `createddate` - Date created
    * `lastmodifieddate` - Last modified date
  </Accordion>

  <Accordion title="BOM Revision Component">
    Stream for fetching the individual component lines of a BOM Revision. Each record represents one item and its quantity within a revision. Full table sync only (no replication key).

    **Key Fields:**

    * `id` - Internal ID
    * `links` - Links associated with the component
    * `bomrevision` - Parent BOM Revision ID (composite primary key, foreign key to BOM Revision)
    * `item` - Item ID (composite primary key, foreign key to Items)
    * `displayname` - Display name
    * `description` - Component description
    * `quantity` - Quantity
    * `units` - Units of measure
    * `componentyield` - Component yield percentage
    * `bomquantity` - BOM quantity
    * `itemsource` - Item source
    * `lineid` - Line ID
    * `isoutsourcingcharge` - Indicates if this is an outsourcing charge
  </Accordion>

  <Accordion title="Customers">
    Stream for fetching customer information from NetSuite.

    | Field                               | Type   | Description                                      |
    | :---------------------------------- | :----- | :----------------------------------------------- |
    | `id`                                | String | The customer's system ID                         |
    | `entityid`                          | String | Entity ID                                        |
    | `externalid`                        | String | External ID                                      |
    | `entitytitle`                       | String | Entity title                                     |
    | `links`                             | Array  | Links associated with the customer               |
    | `companyname`                       | String | Company name                                     |
    | `firstname`                         | String | First name                                       |
    | `lastname`                          | String | Last name                                        |
    | `fullname`                          | String | Full name                                        |
    | `altname`                           | String | Alternative name for the customer                |
    | `email`                             | String | Email address                                    |
    | `phone`                             | String | Phone number                                     |
    | `emailpreference`                   | String | Email preference setting                         |
    | `emailtransactions`                 | String | Email transactions flag                          |
    | `faxtransactions`                   | String | Fax transactions flag                            |
    | `printtransactions`                 | String | Print transactions flag                          |
    | `globalsubscriptionstatus`          | String | Global subscription status                       |
    | `unsubscribe`                       | String | Unsubscribe flag                                 |
    | `defaultbillingaddress`             | String | Default billing address ID                       |
    | `defaultshippingaddress`            | String | Default shipping address ID                      |
    | `shippingcarrier`                   | String | Shipping carrier                                 |
    | `shipcomplete`                      | String | Ship complete flag                               |
    | `currency`                          | String | Currency ID                                      |
    | `balancesearch`                     | String | Customer balance                                 |
    | `depositbalancesearch`              | String | Deposit balance                                  |
    | `overduebalancesearch`              | String | Overdue balance                                  |
    | `unbilledorderssearch`              | String | Unbilled orders amount                           |
    | `daysoverduesearch`                 | String | Days overdue                                     |
    | `oncredithold`                      | String | Credit hold flag                                 |
    | `creditholdoverride`                | String | Credit hold override status                      |
    | `receivablesaccount`                | String | Receivables account                              |
    | `entitystatus`                      | String | Entity status                                    |
    | `isinactive`                        | String | Inactive flag                                    |
    | `isperson`                          | String | Person flag                                      |
    | `isjob`                             | String | Job flag                                         |
    | `isbudgetapproved`                  | String | Budget approved flag                             |
    | `isautogeneratedrepresentingentity` | String | Auto-generated representing entity flag          |
    | `duplicate`                         | String | Duplicate flag                                   |
    | `alcoholrecipienttype`              | String | Type of alcohol recipient                        |
    | `firstsaledate`                     | String | Date of first sale                               |
    | `firstsaleperiod`                   | String | First sale period                                |
    | `lastsaledate`                      | String | Date of last sale                                |
    | `lastsaleperiod`                    | String | Last sale period                                 |
    | `probability`                       | String | Probability value                                |
    | `searchstage`                       | String | Search stage                                     |
    | `toplevelparent`                    | String | Top level parent ID                              |
    | `datecreated`                       | String | Date customer was created                        |
    | `dateclosed`                        | String | Date account was closed                          |
    | `lastmodifieddate`                  | String | Last modified date                               |
    | `language`                          | String | Language code                                    |
    | `custom_fields`                     | Array  | Array of custom fields with name and value pairs |
  </Accordion>

  <Accordion title="Department">
    Stream for fetching department records from NetSuite. Departments are used to track transactions and organize your business structure.

    | Field              | Type   | Description                               |
    | :----------------- | :----- | :---------------------------------------- |
    | `id`               | String | Internal ID                               |
    | `name`             | String | Department name                           |
    | `fullname`         | String | Full name of the department               |
    | `parent`           | String | Parent department ID                      |
    | `includechildren`  | String | Indicates if department includes children |
    | `isinactive`       | String | Indicates if the department is inactive   |
    | `subsidiary`       | String | Subsidiary ID                             |
    | `lastmodifieddate` | String | Date the department was last modified     |
  </Accordion>

  <Accordion title="Items">
    Stream for fetching item records from NetSuite.

    | Field                     | Type   | Description                                      |
    | :------------------------ | :----- | :----------------------------------------------- |
    | `id`                      | String | The item's system ID                             |
    | `itemid`                  | String | Item ID code                                     |
    | `externalid`              | String | External ID                                      |
    | `displayname`             | String | Display name                                     |
    | `fullname`                | String | Full name                                        |
    | `description`             | String | Item description                                 |
    | `links`                   | Array  | Links associated with the item                   |
    | `itemtype`                | String | Type of item                                     |
    | `subtype`                 | String | Item subtype                                     |
    | `class`                   | String | Class                                            |
    | `department`              | String | Department                                       |
    | `subsidiary`              | String | Subsidiaries                                     |
    | `cost`                    | String | Cost                                             |
    | `averagecost`             | String | Average cost                                     |
    | `lastpurchaseprice`       | String | Last purchase price                              |
    | `costestimatetype`        | String | Cost estimate type                               |
    | `deposit`                 | String | Deposit flag                                     |
    | `expenseaccount`          | String | Expense account                                  |
    | `incomeaccount`           | String | Income account                                   |
    | `intercoexpenseaccount`   | String | Intercompany expense account                     |
    | `intercoincomeaccount`    | String | Intercompany income account                      |
    | `purchaseunit`            | String | Purchase unit                                    |
    | `saleunit`                | String | Sales unit                                       |
    | `unitstype`               | String | Units type                                       |
    | `weightunits`             | String | Weight units                                     |
    | `minimumquantity`         | String | Minimum quantity                                 |
    | `enforceminqtyinternally` | String | Enforce minimum quantity internally flag         |
    | `isdropshipitem`          | String | Dropship item flag                               |
    | `isfulfillable`           | String | Fulfillable flag                                 |
    | `isspecialorderitem`      | String | Special order flag                               |
    | `shipindividually`        | String | Ship individually flag                           |
    | `matchbilltoreceipt`      | String | Match bill to receipt flag                       |
    | `isinactive`              | String | Inactive flag                                    |
    | `isonline`                | String | Online flag                                      |
    | `includechildren`         | String | Include children flag                            |
    | `copydescription`         | String | Copy description flag                            |
    | `printitems`              | String | Print items flag                                 |
    | `generateaccruals`        | String | Generate accruals flag                           |
    | `usemarginalrates`        | String | Use marginal rates flag                          |
    | `createddate`             | String | Creation date                                    |
    | `lastmodifieddate`        | String | Last modified date                               |
    | `custom_fields`           | Array  | Array of custom fields with name and value pairs |
  </Accordion>

  <Accordion title="Location">
    Stream for fetching location records from NetSuite. Locations represent physical or logical places where inventory is stored or business is conducted.

    | Field                    | Type   | Description                            |
    | :----------------------- | :----- | :------------------------------------- |
    | `id`                     | String | Internal ID                            |
    | `name`                   | String | Location name                          |
    | `fullname`               | String | Full name of the location              |
    | `links`                  | Array  | Links associated with the location     |
    | `mainaddress`            | String | Main address of the location           |
    | `includeincontroltower`  | String | Flag for inclusion in control tower    |
    | `isinactive`             | String | Indicates if the location is inactive  |
    | `makeinventoryavailable` | String | Flag indicating inventory availability |
    | `subsidiary`             | String | Subsidiary ID                          |
    | `lastmodifieddate`       | String | Last modified date                     |
  </Accordion>

  <Accordion title="Previous Transaction Line Link">
    Stream for fetching links between related transaction lines. This stream is essential for understanding document flow (e.g., linking sales orders to invoices, purchase orders to vendor bills).

    | Field              | Type   | Description                           |
    | :----------------- | :----- | :------------------------------------ |
    | `linktype`         | String | Link type                             |
    | `previousdoc`      | String | Transaction ID of previous document   |
    | `previousline`     | String | Line ID of the previous document line |
    | `previoustype`     | String | Previous document type                |
    | `previousdate`     | String | Date of previous transaction          |
    | `nextdoc`          | String | Transaction ID of next document       |
    | `nextline`         | String | Line ID of the next document line     |
    | `nexttype`         | String | Next document type                    |
    | `nextdate`         | String | Date of next transaction              |
    | `foreignamount`    | String | Foreign amount                        |
    | `discount`         | String | Discount indicator                    |
    | `lastmodifieddate` | String | Last modified date                    |
  </Accordion>

  <Accordion title="Term">
    Stream for fetching payment term records from NetSuite. Terms define payment conditions such as due dates and discounts.

    | Field              | Type   | Description                       |
    | :----------------- | :----- | :-------------------------------- |
    | `id`               | String | Internal ID                       |
    | `name`             | String | Term name                         |
    | `datedriven`       | String | Date driven flag                  |
    | `daysuntilexpiry`  | String | Days until discount expires       |
    | `daysuntilnetdue`  | String | Days until net due                |
    | `discountpercent`  | String | Discount percentage               |
    | `installment`      | String | Installment flag                  |
    | `isinactive`       | String | Indicates if the term is inactive |
    | `preferred`        | String | Preferred flag                    |
    | `lastmodifieddate` | String | Last modified date                |
  </Accordion>

  <Accordion title="Transaction Lines">
    Stream for fetching transaction line-level details from NetSuite. Each transaction can have multiple lines representing individual items, charges, or accounting entries.

    | Field                         | Type   | Description                                         |
    | :---------------------------- | :----- | :-------------------------------------------------- |
    | `id`                          | String | The transaction line's system ID                    |
    | `uniquekey`                   | String | Unique key for the transaction line                 |
    | `transaction`                 | String | Transaction ID for this line                        |
    | `linesequencenumber`          | String | Line sequence number                                |
    | `documentnumber`              | String | Document number for the line                        |
    | `rn`                          | String | Row number                                          |
    | `item`                        | String | Item associated with this line                      |
    | `itemtype`                    | String | Type of item                                        |
    | `entity`                      | String | Entity related to the transaction line              |
    | `quantity`                    | String | Quantity                                            |
    | `quantitybilled`              | String | Quantity billed                                     |
    | `quantityshiprecv`            | String | Quantity shipped/received                           |
    | `quantityrejected`            | String | Quantity rejected                                   |
    | `units`                       | String | Units                                               |
    | `rate`                        | String | Rate                                                |
    | `rateamount`                  | String | Rate amount                                         |
    | `ratepercent`                 | String | Rate percent                                        |
    | `price`                       | String | Price for this line                                 |
    | `grossamt`                    | String | Gross amount                                        |
    | `netamount`                   | String | Net amount                                          |
    | `taxamount`                   | String | Tax amount                                          |
    | `basegrossamt`                | String | Base gross amount                                   |
    | `basetaxamount`               | String | Base tax amount                                     |
    | `foreignamount`               | String | Foreign amount                                      |
    | `foreignamountpaid`           | String | Foreign amount paid                                 |
    | `foreignamountpaidnopost`     | String | Foreign amount paid (no post)                       |
    | `foreignamountunpaid`         | String | Foreign amount unpaid                               |
    | `creditforeignamount`         | String | Credit foreign amount                               |
    | `debitforeignamount`          | String | Debit foreign amount                                |
    | `amountpending`               | String | Amount pending                                      |
    | `settlementamount`            | String | Settlement amount for the line                      |
    | `foreignpaymentamountunused`  | String | Foreign payment amount unused                       |
    | `foreignpaymentamountused`    | String | Foreign payment amount used                         |
    | `fxamountlinked`              | String | FX amount linked                                    |
    | `costestimate`                | String | Cost estimate                                       |
    | `costestimatebase`            | String | Cost estimate base                                  |
    | `costestimaterate`            | String | Cost estimate rate                                  |
    | `costestimatetype`            | String | Cost estimate type                                  |
    | `estgrossprofit`              | String | Estimated gross profit                              |
    | `estgrossprofitpercent`       | String | Estimated gross profit percent                      |
    | `accountinglinetype`          | String | Accounting line type (e.g. ACCOUNTSRECEIVABLE)      |
    | `expenseaccount`              | String | Expense account                                     |
    | `mainline`                    | String | Main line flag                                      |
    | `taxline`                     | String | Tax line flag                                       |
    | `iscogs`                      | String | Is cost of goods sold flag                          |
    | `isfxvariance`                | String | Is FX variance flag                                 |
    | `iscustomglline`              | String | Is custom GL line flag                              |
    | `isrevrectransaction`         | String | Is revenue recognition transaction flag             |
    | `eliminate`                   | String | Elimination flag                                    |
    | `location`                    | String | Location                                            |
    | `department`                  | String | Department                                          |
    | `class`                       | String | Class                                               |
    | `subsidiary`                  | String | Subsidiary                                          |
    | `isclosed`                    | String | Is closed flag                                      |
    | `isinventoryaffecting`        | String | Is inventory affecting flag                         |
    | `isbillable`                  | String | Is billable flag                                    |
    | `isfullyshipped`              | String | Is fully shipped flag                               |
    | `fulfillable`                 | String | Whether the line is fulfillable                     |
    | `hasfulfillableitems`         | String | Has fulfillable items flag                          |
    | `hascostline`                 | String | Has cost line flag                                  |
    | `cleared`                     | String | Cleared flag                                        |
    | `periodclosed`                | String | Period closed flag                                  |
    | `isitemvalueadjustment`       | String | Is item value adjustment flag                       |
    | `processedbyrevcommit`        | String | Processed by revenue commit flag                    |
    | `dropship`                    | String | Drop ship flag                                      |
    | `specialorder`                | String | Special order flag                                  |
    | `kitcomponent`                | String | Kit component flag                                  |
    | `matchbilltoreceipt`          | String | Match bill to receipt flag                          |
    | `commitmentfirm`              | String | Commitment firm flag                                |
    | `oldcommitmentfirm`           | String | Old commitment firm flag                            |
    | `excludefromraterequest`      | String | Exclude from rate request flag                      |
    | `transactiondiscount`         | String | Transaction discount flag                           |
    | `donotdisplayline`            | String | Do not display line flag                            |
    | `donotprintline`              | String | Do not print line flag                              |
    | `linecreateddate`             | String | Line created date                                   |
    | `linelastmodifieddate`        | String | Line last modified date                             |
    | `actualshipdate`              | String | Actual ship date                                    |
    | `expectedreceiptdate`         | String | Expected receipt date                               |
    | `duedate`                     | String | Due date                                            |
    | `closedate`                   | String | Close date                                          |
    | `createdfrom`                 | String | ID of the source transaction that created this line |
    | `billingschedule`             | String | Billing schedule                                    |
    | `memo`                        | String | Memo text                                           |
    | `cseg_nscs_aloca_rec`         | String | Custom segment NSCS Allocation Record               |
    | `cseg_nscs_class_crd`         | String | Custom segment NSCS Class CRD                       |
    | `custcol_atlas_promise_date`  | String | Custom: Atlas Promise Date                          |
    | `custcol_fte_i_line_sequence` | String | Custom: FTE I Line Sequence                         |
    | `custcol_ftebr_l_cfop_code`   | String | Custom: FTEBR L CFOP Code                           |
    | `custcol_nscs_item_code`      | String | Custom: NSCS Item Code                              |
    | `custom_fields`               | Array  | Array of custom fields with name and value pairs    |
  </Accordion>

  <Accordion title="Transactions">
    Stream for fetching transaction records from NetSuite.

    | Field                     | Type   | Description                                      |
    | :------------------------ | :----- | :----------------------------------------------- |
    | `id`                      | String | The transaction's system ID                      |
    | `tranid`                  | String | Transaction ID                                   |
    | `transactionnumber`       | String | Transaction number                               |
    | `number`                  | String | Transaction number                               |
    | `externalid`              | String | External ID                                      |
    | `trandisplayname`         | String | Transaction display name                         |
    | `typebaseddocumentnumber` | String | Type-based document number                       |
    | `links`                   | Array  | Links associated with the transaction            |
    | `type`                    | String | Transaction type                                 |
    | `abbrevtype`              | String | Abbreviated transaction type                     |
    | `recordtype`              | String | Record type                                      |
    | `status`                  | String | Status                                           |
    | `approvalstatus`          | String | Approval status                                  |
    | `customform`              | String | Custom form ID                                   |
    | `customtype`              | String | Custom type                                      |
    | `entity`                  | String | Entity ID                                        |
    | `email`                   | String | Email address                                    |
    | `trandate`                | String | Transaction date                                 |
    | `createddate`             | String | Creation date                                    |
    | `lastmodifieddate`        | String | Last modified date                               |
    | `closedate`               | String | Close date                                       |
    | `duedate`                 | String | Due date                                         |
    | `startdate`               | String | Start date                                       |
    | `enddate`                 | String | End date                                         |
    | `prevdate`                | String | Previous date                                    |
    | `taxpointdate`            | String | Tax point date                                   |
    | `shipdate`                | String | Ship date                                        |
    | `foreigntotal`            | String | Total in foreign currency                        |
    | `foreignamountpaid`       | String | Foreign amount paid                              |
    | `foreignamountpaidnopost` | String | Foreign amount paid (no post)                    |
    | `foreignamountunpaid`     | String | Foreign amount unpaid                            |
    | `amountunbilled`          | String | Unbilled amount                                  |
    | `totalaftertaxes`         | String | Total after taxes                                |
    | `basetotalaftertaxes`     | String | Base total after taxes                           |
    | `totalcostestimate`       | String | Total cost estimate                              |
    | `estgrossprofit`          | String | Estimated gross profit                           |
    | `estgrossprofitpercent`   | String | Estimated gross profit percentage                |
    | `taxtotal`                | String | Tax total                                        |
    | `basetaxtotal`            | String | Base tax total                                   |
    | `taxdetailsoverride`      | String | Tax details override flag                        |
    | `taxpointdateoverride`    | String | Tax point date override flag                     |
    | `taxregoverride`          | String | Tax registration override flag                   |
    | `legacytax`               | String | Legacy tax flag                                  |
    | `entitytaxregnum`         | String | Entity tax registration number                   |
    | `subsidiarytaxregnum`     | String | Subsidiary tax registration number               |
    | `nexus`                   | String | Tax nexus                                        |
    | `currency`                | String | Currency ID                                      |
    | `exchangerate`            | String | Exchange rate                                    |
    | `billingaddress`          | String | Billing address ID                               |
    | `billingstatus`           | String | Billing status                                   |
    | `terms`                   | String | Payment terms                                    |
    | `needsbill`               | String | Needs bill flag                                  |
    | `paymenthold`             | String | Payment hold flag                                |
    | `isfinchrg`               | String | Is finance charge flag                           |
    | `balsegstatus`            | String | Balance segment status                           |
    | `shipcarrier`             | String | Shipping carrier                                 |
    | `shipcomplete`            | String | Ship complete flag                               |
    | `shippingaddress`         | String | Shipping address ID                              |
    | `ordpicked`               | String | Order picked flag                                |
    | `printedpickingticket`    | String | Printed picking ticket flag                      |
    | `posting`                 | String | Posting flag                                     |
    | `postingperiod`           | String | Posting period ID                                |
    | `isreversal`              | String | Is reversal flag                                 |
    | `void`                    | String | Void flag                                        |
    | `voided`                  | String | Voided flag                                      |
    | `memorized`               | String | Memorized flag                                   |
    | `includeinforceast`       | String | Include in forecast flag                         |
    | `intercoadj`              | String | Intercompany adjustment flag                     |
    | `intercostatus`           | String | Intercompany status                              |
    | `intercotransaction`      | String | Intercompany transaction ID                      |
    | `tobeemailed`             | String | To be emailed flag                               |
    | `tobefaxed`               | String | To be faxed flag                                 |
    | `tobeprinted`             | String | To be printed flag                               |
    | `visibletocustomer`       | String | Visible to customer flag                         |
    | `daysopen`                | String | Days transaction has been open                   |
    | `daysoverduesearch`       | String | Days overdue search                              |
    | `source`                  | String | Source of the transaction                        |
    | `otherrefnum`             | String | Other reference number                           |
    | `memo`                    | String | Memo text                                        |
    | `createdby`               | String | Created by user ID                               |
    | `lastmodifiedby`          | String | Last modified by user ID                         |
    | `userevenuearrangement`   | String | Use revenue arrangement flag                     |
    | `custom_fields`           | Array  | Array of custom fields with name and value pairs |
  </Accordion>

  <Accordion title="Units Type">
    Stream for fetching Units Type records from NetSuite.

    | Field              | Type   | Description                             |
    | :----------------- | :----- | :-------------------------------------- |
    | `id`               | String | Internal ID                             |
    | `links`            | Array  | Links associated with the units type    |
    | `name`             | String | Units type name                         |
    | `isinactive`       | String | Indicates if the units type is inactive |
    | `lastmodifieddate` | String | Last modified date                      |
  </Accordion>

  <Accordion title="Units Type UOM">
    Stream for fetching Units Type UOM (Unit of Measure) records from NetSuite.

    | Field                | Type   | Description                           |
    | :------------------- | :----- | :------------------------------------ |
    | `internalid`         | String | Internal ID                           |
    | `links`              | Array  | Links associated with the UOM         |
    | `unitname`           | String | Unit name                             |
    | `conversionrate`     | String | Conversion rate relative to base unit |
    | `baseunit`           | String | Indicates if this is the base unit    |
    | `unitstype`          | String | Parent Units Type ID                  |
    | `abbreviation`       | String | Unit abbreviation                     |
    | `pluralname`         | String | Plural unit name                      |
    | `pluralabbreviation` | String | Plural abbreviation                   |
    | `inuse`              | String | Indicates if the unit is in use       |
  </Accordion>

  <Accordion title="Vendor">
    Stream for fetching vendor records from NetSuite.

    | Field                               | Type   | Description                                      |
    | :---------------------------------- | :----- | :----------------------------------------------- |
    | `id`                                | String | Internal ID                                      |
    | `links`                             | Array  | Links associated with the vendor                 |
    | `entityid`                          | String | Entity ID                                        |
    | `entitynumber`                      | String | Entity number                                    |
    | `entitytitle`                       | String | Entity title                                     |
    | `companyname`                       | String | Company name                                     |
    | `isperson`                          | String | Indicates if the vendor is a person              |
    | `firstname`                         | String | First name                                       |
    | `middlename`                        | String | Middle name                                      |
    | `lastname`                          | String | Last name                                        |
    | `fullname`                          | String | Full name                                        |
    | `altname`                           | String | Alternate name                                   |
    | `email`                             | String | Email address                                    |
    | `emailpreference`                   | String | Email preference                                 |
    | `emailtransactions`                 | String | Email transactions flag                          |
    | `phone`                             | String | Phone number                                     |
    | `altphone`                          | String | Alternate phone number                           |
    | `fax`                               | String | Fax number                                       |
    | `faxtransactions`                   | String | Fax transactions flag                            |
    | `printtransactions`                 | String | Print transactions flag                          |
    | `url`                               | String | URL                                              |
    | `comments`                          | String | Comments                                         |
    | `contactlist`                       | String | Contact list                                     |
    | `globalsubscriptionstatus`          | String | Global subscription status                       |
    | `unsubscribe`                       | String | Unsubscribe flag                                 |
    | `subsidiary`                        | String | Subsidiary ID                                    |
    | `subsidiaryedition`                 | String | Subsidiary edition                               |
    | `terms`                             | String | Payment terms ID                                 |
    | `currency`                          | String | Currency ID                                      |
    | `creditlimit`                       | String | Credit limit                                     |
    | `balance`                           | String | Balance                                          |
    | `balanceprimary`                    | String | Balance in primary currency                      |
    | `unbilledorders`                    | String | Unbilled orders amount                           |
    | `unbilledordersprimary`             | String | Unbilled orders in primary currency              |
    | `prepaymentbalance`                 | String | Prepayment balance                               |
    | `expenseaccount`                    | String | Expense account                                  |
    | `payablesaccount`                   | String | Payables account                                 |
    | `defaultbillingaddress`             | String | Default billing address                          |
    | `defaultshippingaddress`            | String | Default shipping address                         |
    | `isinactive`                        | String | Indicates if the vendor is inactive              |
    | `duplicate`                         | String | Duplicate flag                                   |
    | `isautogeneratedrepresentingentity` | String | Auto-generated representing entity flag          |
    | `isjobresourcevend`                 | String | Job resource vendor flag                         |
    | `predconfidence`                    | String | Prediction confidence                            |
    | `predicteddays`                     | String | Predicted days                                   |
    | `workcalendar`                      | String | Work calendar                                    |
    | `manufacturinglocations`            | String | Manufacturing locations                          |
    | `lastmodifieddate`                  | String | Last modified date                               |
    | `datecreated`                       | String | Date created                                     |
    | `defaultaddress`                    | String | Default address                                  |
    | `externalid`                        | String | External ID                                      |
    | `category`                          | String | Vendor category                                  |
    | `taxidnum`                          | String | Tax ID number                                    |
    | `is1099eligible`                    | String | Indicates 1099 eligibility                       |
    | `legalname`                         | String | Legal name                                       |
    | `accountnumber`                     | String | Account number                                   |
    | `printoncheckas`                    | String | Print on checks as                               |
    | `representingsubsidiary`            | String | Representing subsidiary ID                       |
    | `custom_fields`                     | Array  | Array of custom fields with name and value pairs |
  </Accordion>

  <Accordion title="Units Type">
    Stream for fetching unit of measure type records from NetSuite. Units types group related units of measure (e.g., Weight, Length). Full table sync only (no replication key).

    **Key Fields:**

    * `id` - Internal ID
    * `links` - Links associated with the units type
    * `name` - Units type name
    * `isinactive` - Indicates if the units type is inactive
    * `lastmodifieddate` - Last modified date
  </Accordion>

  <Accordion title="Units Type UOM">
    Stream for fetching individual unit of measure records within a Units Type. Each record represents one unit (e.g., kg, lb) and its conversion rate relative to the base unit. Full table sync only (no replication key).

    **Key Fields:**

    * `internalid` - Internal ID
    * `links` - Links associated with the UOM
    * `unitname` - Unit name
    * `abbreviation` - Unit abbreviation
    * `pluralname` - Plural unit name
    * `pluralabbreviation` - Plural abbreviation
    * `conversionrate` - Conversion rate relative to base unit
    * `baseunit` - Indicates if this is the base unit
    * `unitstype` - Parent Units Type ID (foreign key to Units Type)
    * `inuse` - Indicates if the unit is in use
  </Accordion>

  <Accordion title="Vendor">
    Stream for fetching vendor (supplier) records from NetSuite.

    **Identification:**

    * `id` - Internal ID
    * `links` - Links associated with the vendor
    * `entityid` - Entity ID
    * `entitynumber` - Entity number
    * `entitytitle` - Entity title
    * `externalid` - External ID
    * `companyname` - Company name
    * `legalname` - Legal name
    * `altname` - Alternate name
    * `fullname` - Full name

    **Person Fields:**

    * `isperson` - Indicates if the vendor is a person
    * `firstname` - First name
    * `middlename` - Middle name
    * `lastname` - Last name

    **Contact Information:**

    * `email` - Email address
    * `emailpreference` - Email preference
    * `emailtransactions` - Email transactions flag
    * `phone` - Phone number
    * `altphone` - Alternate phone number
    * `fax` - Fax number
    * `faxtransactions` - Fax transactions flag
    * `printtransactions` - Print transactions flag
    * `url` - URL
    * `defaultaddress` - Default address
    * `defaultbillingaddress` - Default billing address
    * `defaultshippingaddress` - Default shipping address
    * `comments` - Comments
    * `contactlist` - Contact list
    * `globalsubscriptionstatus` - Global subscription status
    * `unsubscribe` - Unsubscribe flag

    **Financial:**

    * `subsidiary` - Subsidiary ID
    * `subsidiaryedition` - Subsidiary edition
    * `terms` - Payment terms ID
    * `currency` - Currency ID
    * `creditlimit` - Credit limit
    * `balance` - Balance
    * `balanceprimary` - Balance in primary currency
    * `unbilledorders` - Unbilled orders amount
    * `unbilledordersprimary` - Unbilled orders in primary currency
    * `prepaymentbalance` - Prepayment balance
    * `expenseaccount` - Expense account
    * `payablesaccount` - Payables account
    * `accountnumber` - Account number
    * `printoncheckas` - Print on checks as

    **Classification:**

    * `category` - Vendor category
    * `taxidnum` - Tax ID number
    * `is1099eligible` - Indicates 1099 eligibility
    * `representingsubsidiary` - Representing subsidiary ID

    **Status & Flags:**

    * `isinactive` - Indicates if the vendor is inactive
    * `duplicate` - Duplicate flag
    * `isautogeneratedrepresentingentity` - Auto-generated representing entity flag
    * `isjobresourcevend` - Job resource vendor flag

    **Predictions:**

    * `predconfidence` - Prediction confidence
    * `predicteddays` - Predicted days

    **Other:**

    * `workcalendar` - Work calendar
    * `manufacturinglocations` - Manufacturing locations
    * `datecreated` - Date created
    * `lastmodifieddate` - Last modified date
    * `custom_fields` - Array of custom fields with name and value pairs
  </Accordion>
</AccordionGroup>

# Data Model

The following diagram illustrates the relationships between the core data streams in NetSuite. The arrows indicate the join keys that link the different entities.

```mermaid theme={null}
graph TD;
    subgraph "Core Entities"
        Customers("Customers");
        Vendors("Vendor");
        Items("Items");
        Locations("Location");
        Departments("Department");
        Terms("Term");
        BillingSchedule("Billing Schedule");
        Vendors("Vendor");
    end

    subgraph "Transactions"
        Transactions("Transactions");
        TransactionLines("Transaction Lines");
        PrevTranLink("Previous Transaction Line Link");
    end

    subgraph "Bill of Materials"
        BOM("BOM");
        BOMRevision("BOM Revision");
        BOMRevisionComponent("BOM Revision Component");
    end

    subgraph "Units of Measure"
        UnitsType("Units Type");
        UnitsTypeUom("Units Type UOM");
    end

    TransactionLines -- "transaction" --> Transactions;
    TransactionLines -- "item" --> Items;
    TransactionLines -- "entity" --> Customers;
    TransactionLines -- "location" --> Locations;
    TransactionLines -- "department" --> Departments;
    TransactionLines -- "billingschedule" --> BillingSchedule;
    Transactions -- "entity" --> Customers;
    Transactions -- "terms" --> Terms;
    PrevTranLink -- "previousdoc" --> Transactions;
    PrevTranLink -- "nextdoc" --> Transactions;
    BOMRevision -- "billofmaterials" --> BOM;
    BOMRevisionComponent -- "bomrevision" --> BOMRevision;
    BOMRevisionComponent -- "item" --> Items;
    UnitsTypeUom -- "unitstype" --> UnitsType;
    Items -- "unitstype" --> UnitsType;
```

# Implementation Notes

<AccordionGroup>
  <Accordion title="Data Types">
    Due to NetSuiteQL limitations, all field values are returned as strings. You'll need to convert numeric and date fields to their appropriate types in your data pipeline or queries:

    * **Dates**: Parse strings like `2024-01-15` to date types
    * **Numbers**: Convert numeric strings to integers or decimals
    * **Booleans**: Values typically come as `"T"` (true) or `"F"` (false)
  </Accordion>

  <Accordion title="Custom Fields">
    NetSuite supports extensive customization through custom fields. These are captured in the `custom_fields` array for each record, containing objects with `name` and `value` properties.

    Custom field names typically start with prefixes like:

    * `custentity_` - Custom entity fields
    * `custcol_` - Custom column (line-level) fields
    * `custbody_` - Custom body (transaction-level) fields
    * `cseg_` - Custom segment fields
  </Accordion>

  <Accordion title="Incremental Sync">
    Most streams support incremental sync using the `lastmodifieddate` field as the replication key. This allows for efficient data extraction by only fetching records that have changed since the last sync.

    **Streams with incremental sync:**

    * Bill of Materials (`lastmodifieddate`)
    * BOM (`lastmodifieddate`)
    * BOM Revision (`lastmodifieddate`)
    * Customers (`lastmodifieddate`)
    * Department (`lastmodifieddate`)
    * Items (`lastmodifieddate`)
    * Location (`lastmodifieddate`)
    * Previous Transaction Line Link (`lastmodifieddate`)
    * Term (`lastmodifieddate`)
    * Transaction Lines (`linelastmodifieddate`)
    * Transactions (`lastmodifieddate`)
    * Vendor (`lastmodifieddate`)

    **Full table only:**

    * Billing Schedule (no replication key)
    * BOM Revision Component (no replication key)
    * Units Type (no replication key)
    * Units Type UOM (no replication key)
  </Accordion>

  <Accordion title="Document Flow Tracking">
    The **Previous Transaction Line Link** stream is particularly valuable for understanding document flow in NetSuite. It tracks relationships between:

    * Sales Orders → Invoices
    * Purchase Orders → Vendor Bills
    * Quotes → Sales Orders
    * Invoices → Payments

    Use `previousdoc`/`nextdoc` and `previousline`/`nextline` to trace the complete lifecycle of a transaction.
  </Accordion>
</AccordionGroup>

## Skills for agents

<Snippet file="agent-skills-intro.mdx" />

<Card title="Download NetSuite skills file" icon="wand-magic-sparkles" href="/sources/netsuite.md">
  NetSuite connector documentation as plain markdown, for use in AI agent contexts.
</Card>
