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

# NetSuite

> NetSuite Scenario seeding parameters, nested fields, and examples

Use `netsuite` in `twins` and put this configuration under `seed_config.netsuite`.

Oracle NetSuite ERP account with customers, vendors, employees, subsidiaries, chart-of-account records, products and services, sales orders, invoices, customer payments, purchase orders, vendor bills and payments, journal entries, SuiteQL, REST records, RESTlets, and OAuth credentials.

## Example seed

This is the complete Scenario request body for [creating a Scenario](https://docs.argalabs.com/api-reference/post-create-a-scenario.md). You can also import it with `arga test-runner scenarios import --file scenario.json`.

```json theme={null}
{
  "name": "NetSuite eval fixture",
  "twins": [
    "netsuite"
  ],
  "seed_config": {
    "netsuite": {
      "account_id": "TSTDRV1234567",
      "company_name": "Example NetSuite Company",
      "subsidiaries": [
        {
          "alias": "main_subsidiary",
          "name": "Example NetSuite Company",
          "legalName": "Example NetSuite Company",
          "country": "US"
        }
      ],
      "accounts": [
        {
          "alias": "income_account",
          "acctNumber": "4000",
          "acctName": "Consulting Revenue",
          "acctType": {
            "id": "INCOME",
            "refName": "Income"
          }
        }
      ],
      "customers": [
        {
          "alias": "customer_acme",
          "entityId": "ACME",
          "companyName": "Acme Corporation",
          "email": "billing@acme.example",
          "subsidiary_alias": "main_subsidiary"
        }
      ],
      "vendors": [
        {
          "alias": "vendor_supply",
          "entityId": "SUPPLYCO",
          "companyName": "Supply Co",
          "email": "ap@supply.example",
          "subsidiary_alias": "main_subsidiary"
        }
      ],
      "service_items": [
        {
          "alias": "item_consulting",
          "itemId": "CONSULTING",
          "displayName": "Consulting Services",
          "basePrice": 175,
          "incomeAccount": {
            "id": {
              "$ref": "income_account.id"
            }
          }
        }
      ],
      "invoices": [
        {
          "alias": "invoice_acme",
          "customer_alias": "customer_acme",
          "memo": "Implementation services",
          "item": {
            "items": [
              {
                "item": {
                  "id": {
                    "$ref": "item_consulting.id"
                  }
                },
                "quantity": 10,
                "rate": 175,
                "amount": 1750
              }
            ]
          }
        }
      ],
      "vendor_bills": [
        {
          "vendor_alias": "vendor_supply",
          "memo": "Project supplies",
          "expense": {
            "items": [
              {
                "account": {
                  "id": "1"
                },
                "amount": 250
              }
            ]
          }
        }
      ]
    }
  }
}
```

## Parameters

The following fields belong directly inside `seed_config.netsuite`. Required nested fields are marked in their tables. Provider-native objects can contain service-specific fields beyond the representative record shapes below.

| Parameter | Type | Description |
| - | - | - |
| `account_id` | `string` | Account id. |
| `company_name` | `string` | Company name. |
| `subsidiaries` | `object[]` | Subsidiaries fixtures in provider-native format. |
| `accounts` | `object[]` | Accounts fixtures in provider-native format. |
| `customers` | `object[]` | Customers fixtures in provider-native format. |
| `vendors` | `object[]` | Vendors fixtures in provider-native format. |
| `service_items` | `object[]` | Service items fixtures in provider-native format. |
| `invoices` | `object[]` | Invoices fixtures in provider-native format. |
| `vendor_bills` | `object[]` | Vendor bills fixtures in provider-native format. |
| `access_token` | `string` | Synthetic access token used by the twin. |
| `currencies` | `object[]` | Currencies fixtures in provider-native format. |
| `locations` | `object[]` | Locations fixtures in provider-native format. |
| `departments` | `object[]` | Departments fixtures in provider-native format. |
| `classes` | `object[]` | Classes fixtures in provider-native format. |
| `terms` | `object[]` | Terms fixtures in provider-native format. |
| `employees` | `object[]` | Employees fixtures in provider-native format. |
| `contacts` | `object[]` | Contacts fixtures in provider-native format. |
| `items` | `object[]` | Items fixtures in provider-native format. |
| `non_inventory_items` | `object[]` | Non inventory items fixtures in provider-native format. |
| `inventory_items` | `object[]` | Inventory items fixtures in provider-native format. |
| `assembly_items` | `object[]` | Assembly items fixtures in provider-native format. |
| `tax_items` | `object[]` | Tax items fixtures in provider-native format. |
| `estimates` | `object[]` | Estimates fixtures in provider-native format. |
| `sales_orders` | `object[]` | Sales orders fixtures in provider-native format. |
| `cash_sales` | `object[]` | Cash sales fixtures in provider-native format. |
| `customer_payments` | `object[]` | Customer payments fixtures in provider-native format. |
| `purchase_orders` | `object[]` | Purchase orders fixtures in provider-native format. |
| `vendor_payments` | `object[]` | Vendor payments fixtures in provider-native format. |
| `credit_memos` | `object[]` | Credit memos fixtures in provider-native format. |
| `journal_entries` | `object[]` | Journal entries fixtures in provider-native format. |
| `expense_reports` | `object[]` | Expense reports fixtures in provider-native format. |
| `deposits` | `object[]` | Deposits fixtures in provider-native format. |
| `transfers` | `object[]` | Transfers fixtures in provider-native format. |
| `records` | `object[]` | Provider-native record fixtures, with optional aliases for references. |

## Seeding behavior

Resource aliases must reference earlier declared records in the supported seed order. Use `{"$ref":"alias.id"}` or the supported relationship shortcuts. The configured account ID must match the twin gateway account (`TSTDRV1234567`).

## Resource fields

These tables describe the record shapes used by the example. Keep native field names and casing. Map keys such as property names, IDs, and metadata keys are supplied by your fixture.

### `subsidiaries[]`

| Parameter | Type | Description |
| - | - | - |
| `alias` | `string` | Fixture-local name used by supported relationship references. |
| `name` | `string` | Human-readable name. |
| `legalName` | `string` | LegalName. |
| `country` | `string` | Country. |

### `accounts[]`

| Parameter | Type | Description |
| - | - | - |
| `alias` | `string` | Fixture-local name used by supported relationship references. |
| `acctNumber` | `string` | AcctNumber. |
| `acctName` | `string` | AcctName. |
| `acctType` | `object` | AcctType. |

### `customers[]`

| Parameter | Type | Description |
| - | - | - |
| `alias` | `string` | Fixture-local name used by supported relationship references. |
| `entityId` | `string` | EntityId. |
| `companyName` | `string` | CompanyName. |
| `email` | `string` | Main account email address. |
| `subsidiary_alias` | `string` | Subsidiary alias. |

### `vendors[]`

| Parameter | Type | Description |
| - | - | - |
| `alias` | `string` | Fixture-local name used by supported relationship references. |
| `entityId` | `string` | EntityId. |
| `companyName` | `string` | CompanyName. |
| `email` | `string` | Main account email address. |
| `subsidiary_alias` | `string` | Subsidiary alias. |

### `service_items[]`

| Parameter | Type | Description |
| - | - | - |
| `alias` | `string` | Fixture-local name used by supported relationship references. |
| `itemId` | `string` | ItemId. |
| `displayName` | `string` | DisplayName. |
| `basePrice` | `integer` | BasePrice. |
| `incomeAccount` | `object` | IncomeAccount. |

### `invoices[]`

| Parameter | Type | Description |
| - | - | - |
| `alias` | `string` | Fixture-local name used by supported relationship references. |
| `customer_alias` | `string` | Customer alias. |
| `memo` | `string` | Memo. |
| `item` | `object` | Item. |

### `invoices[].item.items[]`

| Parameter | Type | Description |
| - | - | - |
| `item` | `object` | Item. |
| `quantity` | `integer` | Quantity. |
| `rate` | `integer` | Rate. |
| `amount` | `integer` | Amount. |

### `vendor_bills[]`

| Parameter | Type | Description |
| - | - | - |
| `vendor_alias` | `string` | Vendor alias. |
| `memo` | `string` | Memo. |
| `expense` | `object` | Expense. |

### `vendor_bills[].expense.items[]`

| Parameter | Type | Description |
| - | - | - |
| `account` | `object` | Account. |
| `amount` | `integer` | Amount. |

See [Scenario seeding](https://docs.argalabs.com/twins/seeding.md) for saving, provisioning, and resetting fixtures.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.