# Oracle NetSuite

> Run NetSuite from your workflows: add and update customers, contacts and vendors, create sales orders, invoices, vendor bills and journal entries, bill orders and record payments, find records or run SuiteQL queries, and start workflows when customers, sales orders or invoices are added or changed.

App · 24 actions. Web page: https://docs.lodol.com/docs/integrations/oracle-netsuite

## Actions

### Bill sales order

Create the invoice for a sales order from its lines, as Bill does in NetSuite. The order must be ready to bill.

**Inputs**

- Sales order ID (`sales_order_id`, text, required): The sales order's internal ID, from 'Find sales orders' or an earlier step.
- Invoice date (`date`, date): The invoice's date. Defaults to today.
- Memo (`memo`, text): A memo on the transaction.

**Outputs**

- `id` (text): The new record's internal ID
- `invoice` (object): The invoice

**Example output**

```json
{
  "id": "5690",
  "invoice": {
    "amountPaid": 0,
    "amountRemaining": 300,
    "createdDate": "2026-10-20T14:12:00Z",
    "createdFrom": {
      "id": "5678",
      "refName": "Sales Order #SO1042"
    },
    "currency": {
      "id": "1",
      "refName": "USA"
    },
    "dueDate": "2026-11-19",
    "entity": {
      "id": "1234",
      "refName": "Acme Corporation"
    },
    "id": "5690",
    "item": {
      "items": [
        {
          "amount": 300,
          "description": "Consulting",
          "item": {
            "id": "12",
            "refName": "Consulting hour"
          },
          "line": 1,
          "quantity": 2,
          "rate": 150
        }
      ]
    },
    "lastModifiedDate": "2026-10-20T14:12:00Z",
    "memo": "Rush order",
    "otherRefNum": "PO-7781",
    "status": {
      "id": "A",
      "refName": "Open"
    },
    "subtotal": 300,
    "terms": {
      "id": "2",
      "refName": "Net 30"
    },
    "total": 300,
    "tranDate": "2026-10-20",
    "tranId": "INV2087"
  }
}
```

### Create contact

Add a contact person, optionally linked to the customer or vendor they work for.

**Inputs**

- First name (`first_name`, text, required): The contact's first name.
- Last name (`last_name`, text): The person's last name.
- Email (`email`, text): Email address.
- Phone (`phone`, text): Phone number.
- Job title (`title`, text): The contact's job title.
- Company (`company_id`, text): The customer (or vendor) the contact works for. Pick a customer, or give an internal ID.
- Subsidiary (`subsidiary_id`, text): The subsidiary it belongs to. Required in NetSuite OneWorld accounts; other accounts have none.
- More fields (`other_fields`, object): Any other fields, by their NetSuite name, such as {"custentity_tier": "Gold"} or {"salesRep": {"id": "7"}}. A field filled in above wins.

**Outputs**

- `contact` (object): The contact
- `id` (text): The new record's internal ID

**Example output**

```json
{
  "contact": {
    "company": {
      "id": "1234",
      "refName": "Acme Corporation"
    },
    "dateCreated": "2026-10-20T14:05:00Z",
    "email": "jo@acme.example",
    "entityId": "Jo Bloggs",
    "firstName": "Jo",
    "id": "1240",
    "isInactive": false,
    "lastName": "Bloggs",
    "phone": "555-0101",
    "subsidiary": {
      "id": "1",
      "refName": "Parent Company"
    },
    "title": "Accounts payable"
  },
  "id": "1240"
}
```

### Create customer

Add a customer, a company or a person, with their email, phone, subsidiary, currency and payment terms.

**Inputs**

- Type (`customer_type`, text): A company, or an individual person. One of: `company`, `individual`. Default: `company`.
- Company name (`company_name`, text): The company's name. Only when Type is Company.
- First name (`first_name`, text): The person's first name. Only when Type is Individual.
- Last name (`last_name`, text): The person's last name. Only when Type is Individual.
- Email (`email`, text): Email address.
- Phone (`phone`, text): Phone number.
- Subsidiary (`subsidiary_id`, text): The subsidiary it belongs to. Required in NetSuite OneWorld accounts; other accounts have none.
- Currency (`currency_id`, text): The currency. Leave empty for the default one.
- Payment terms (`terms_id`, text): Payment terms, such as Net 30.
- Comments (`comments`, text): Notes kept on the customer.
- More fields (`other_fields`, object): Any other fields, by their NetSuite name, such as {"custentity_tier": "Gold"} or {"salesRep": {"id": "7"}}. A field filled in above wins.

**Outputs**

- `customer` (object): The customer
- `id` (text): The new record's internal ID

**Example output**

```json
{
  "customer": {
    "balance": 0,
    "comments": "",
    "companyName": "Acme Corporation",
    "currency": {
      "id": "1",
      "refName": "USA"
    },
    "dateCreated": "2026-10-20T14:03:00Z",
    "email": "billing@acme.example",
    "entityId": "Acme Corporation",
    "firstName": "",
    "id": "1234",
    "isInactive": false,
    "isPerson": false,
    "lastModifiedDate": "2026-10-20T14:03:00Z",
    "lastName": "",
    "phone": "555-0100",
    "subsidiary": {
      "id": "1",
      "refName": "Parent Company"
    },
    "terms": {
      "id": "2",
      "refName": "Net 30"
    }
  },
  "id": "1234"
}
```

### Create invoice

Create an invoice for a customer with one or more item lines.

**Inputs**

- Customer (`customer_id`, text, required): The customer. Pick one, or give its internal ID from an earlier step.
- Item (`item_id`, text): The item sold on the line. Pick one, or give its internal ID. Leave empty when using Line items.
- Quantity (`quantity`, number): How many. Defaults to 1. At least 0.
- Rate (`rate`, number): The price of one. Leave empty for the item's own price.
- Line description (`line_description`, text): A description for the line. Leave empty for the item's own.
- Line items (advanced) (`line_items`, list): Several lines, such as [{"item_id": "12", "quantity": 2, "rate": 150}, {"item_id": "15", "description": "Setup"}]. Keys: item_id, quantity, rate, amount, description. Added after the line above.
- Date (`date`, date): The transaction date. Defaults to today.
- Due date (`due_date`, date): When payment is due. Leave empty to work it out from the terms.
- Payment terms (`terms_id`, text): Payment terms, such as Net 30.
- PO number (`po_number`, text): The customer's purchase order number.
- Memo (`memo`, text): A memo on the transaction.
- More fields (`other_fields`, object): Any other fields, by their NetSuite name, such as {"custentity_tier": "Gold"} or {"salesRep": {"id": "7"}}. A field filled in above wins.

**Outputs**

- `id` (text): The new record's internal ID
- `invoice` (object): The invoice

**Example output**

```json
{
  "id": "5690",
  "invoice": {
    "amountPaid": 0,
    "amountRemaining": 300,
    "createdDate": "2026-10-20T14:12:00Z",
    "createdFrom": {
      "id": "5678",
      "refName": "Sales Order #SO1042"
    },
    "currency": {
      "id": "1",
      "refName": "USA"
    },
    "dueDate": "2026-11-19",
    "entity": {
      "id": "1234",
      "refName": "Acme Corporation"
    },
    "id": "5690",
    "item": {
      "items": [
        {
          "amount": 300,
          "description": "Consulting",
          "item": {
            "id": "12",
            "refName": "Consulting hour"
          },
          "line": 1,
          "quantity": 2,
          "rate": 150
        }
      ]
    },
    "lastModifiedDate": "2026-10-20T14:12:00Z",
    "memo": "Rush order",
    "otherRefNum": "PO-7781",
    "status": {
      "id": "A",
      "refName": "Open"
    },
    "subtotal": 300,
    "terms": {
      "id": "2",
      "refName": "Net 30"
    },
    "total": 300,
    "tranDate": "2026-10-20",
    "tranId": "INV2087"
  }
}
```

### Create journal entry

Post a journal entry: an amount from one account to another, or several lines that balance.

**Inputs**

- Debit account (`debit_account_id`, text): The account debited with the amount.
- Credit account (`credit_account_id`, text): The account credited with the amount.
- Amount (`amount`, number): The amount debited to one account and credited to the other. At least 0.
- Line memo (`line_memo`, text): A memo on both lines.
- Lines (advanced) (`lines`, list): More lines, such as [{"account_id": "1", "debit": 100}, {"account_id": "2", "credit": 100, "memo": "Accrual"}]. Keys: account_id, debit or credit, memo, entity_id. Debits and credits must balance.
- Date (`date`, date): The transaction date. Defaults to today.
- Subsidiary (`subsidiary_id`, text): The subsidiary it belongs to. Required in NetSuite OneWorld accounts; other accounts have none.
- Currency (`currency_id`, text): The currency. Leave empty for the default one.
- Memo (`memo`, text): A memo on the transaction.
- More fields (`other_fields`, object): Any other fields, by their NetSuite name, such as {"custentity_tier": "Gold"} or {"salesRep": {"id": "7"}}. A field filled in above wins.

**Outputs**

- `id` (text): The new record's internal ID
- `journal_entry` (object): The journal entry

**Example output**

```json
{
  "id": "5720",
  "journal_entry": {
    "createdDate": "2026-10-31T17:00:00Z",
    "currency": {
      "id": "1",
      "refName": "USA"
    },
    "id": "5720",
    "line": {
      "items": [
        {
          "account": {
            "id": "58",
            "refName": "6100 Office Supplies"
          },
          "credit": 0,
          "debit": 100,
          "line": 0,
          "memo": "Accrual"
        },
        {
          "account": {
            "id": "25",
            "refName": "2000 Accrued Liabilities"
          },
          "credit": 100,
          "debit": 0,
          "line": 1,
          "memo": "Accrual"
        }
      ]
    },
    "memo": "October accrual",
    "subsidiary": {
      "id": "1",
      "refName": "Parent Company"
    },
    "tranDate": "2026-10-31",
    "tranId": "JE118"
  }
}
```

### Create record

Create any kind of record from its fields, named as NetSuite's REST API names them, such as a task, estimate or custom record.

**Inputs**

- Record type (`record_type`, text, required): The kind of record. Pick one, or type any other NetSuite record type, such as customrecord_project_log.
- Fields (`fields`, object, required): The record's fields by their NetSuite name, such as {"title": "Call back", "company": {"id": "1234"}}. A reference to another record is {"id": "..."}.

**Outputs**

- `id` (text): The record's internal ID
- `record` (object): The record's fields, named as NetSuite's REST API names them; a reference is an object with its id and refName
- `record_type` (text): The record type

**Example output**

```json
{
  "id": "320",
  "record": {
    "company": {
      "id": "1234",
      "refName": "Acme Corporation"
    },
    "id": "320",
    "status": {
      "id": "NOTSTART",
      "refName": "Not Started"
    },
    "title": "Call back Acme"
  },
  "record_type": "task"
}
```

### Create sales order

Create a sales order for a customer with one or more item lines, approved or pending approval.

**Inputs**

- Customer (`customer_id`, text, required): The customer. Pick one, or give its internal ID from an earlier step.
- Item (`item_id`, text): The item sold on the line. Pick one, or give its internal ID. Leave empty when using Line items.
- Quantity (`quantity`, number): How many. Defaults to 1. At least 0.
- Rate (`rate`, number): The price of one. Leave empty for the item's own price.
- Line description (`line_description`, text): A description for the line. Leave empty for the item's own.
- Line items (advanced) (`line_items`, list): Several lines, such as [{"item_id": "12", "quantity": 2, "rate": 150}, {"item_id": "15", "description": "Setup"}]. Keys: item_id, quantity, rate, amount, description. Added after the line above.
- Date (`date`, date): The transaction date. Defaults to today.
- Approval (`approval`, text): Approve the order now, or leave it pending approval. Leave empty for your NetSuite default. One of: `pending_fulfillment` (Approved (pending fulfillment)), `pending_approval` (Pending approval).
- PO number (`po_number`, text): The customer's purchase order number.
- Memo (`memo`, text): A memo on the transaction.
- More fields (`other_fields`, object): Any other fields, by their NetSuite name, such as {"custentity_tier": "Gold"} or {"salesRep": {"id": "7"}}. A field filled in above wins.

**Outputs**

- `id` (text): The new record's internal ID
- `sales_order` (object): The sales order

**Example output**

```json
{
  "id": "5678",
  "sales_order": {
    "createdDate": "2026-10-20T14:10:00Z",
    "currency": {
      "id": "1",
      "refName": "USA"
    },
    "entity": {
      "id": "1234",
      "refName": "Acme Corporation"
    },
    "id": "5678",
    "item": {
      "items": [
        {
          "amount": 300,
          "description": "Consulting",
          "item": {
            "id": "12",
            "refName": "Consulting hour"
          },
          "line": 1,
          "quantity": 2,
          "rate": 150
        }
      ]
    },
    "lastModifiedDate": "2026-10-20T14:10:00Z",
    "memo": "Rush order",
    "otherRefNum": "PO-7781",
    "status": {
      "id": "B",
      "refName": "Pending Fulfillment"
    },
    "subsidiary": {
      "id": "1",
      "refName": "Parent Company"
    },
    "subtotal": 300,
    "total": 300,
    "tranDate": "2026-10-20",
    "tranId": "SO1042"
  }
}
```

### Create vendor

Add a vendor (supplier), a company or a person, with their email, phone, subsidiary, currency and payment terms.

**Inputs**

- Type (`vendor_type`, text): A company, or an individual person. One of: `company`, `individual`. Default: `company`.
- Company name (`company_name`, text): The company's name. Only when Type is Company.
- First name (`first_name`, text): The person's first name. Only when Type is Individual.
- Last name (`last_name`, text): The person's last name. Only when Type is Individual.
- Email (`email`, text): Email address.
- Phone (`phone`, text): Phone number.
- Subsidiary (`subsidiary_id`, text): The subsidiary it belongs to. Required in NetSuite OneWorld accounts; other accounts have none.
- Currency (`currency_id`, text): The currency. Leave empty for the default one.
- Payment terms (`terms_id`, text): Payment terms, such as Net 30.
- More fields (`other_fields`, object): Any other fields, by their NetSuite name, such as {"custentity_tier": "Gold"} or {"salesRep": {"id": "7"}}. A field filled in above wins.

**Outputs**

- `id` (text): The new record's internal ID
- `vendor` (object): The vendor

**Example output**

```json
{
  "id": "1250",
  "vendor": {
    "companyName": "Northwind Supplies",
    "currency": {
      "id": "1",
      "refName": "USA"
    },
    "dateCreated": "2026-10-20T14:06:00Z",
    "email": "ap@northwind.example",
    "entityId": "Northwind Supplies",
    "id": "1250",
    "isInactive": false,
    "isPerson": false,
    "phone": "555-0102",
    "subsidiary": {
      "id": "1",
      "refName": "Parent Company"
    },
    "terms": {
      "id": "2",
      "refName": "Net 30"
    }
  }
}
```

### Create vendor bill

Enter a bill from a vendor with one or more expense lines, ready to approve and pay.

**Inputs**

- Vendor (`vendor_id`, text, required): The vendor. Pick one, or give its internal ID.
- Expense account (`account_id`, text): The account the cost goes to. Leave empty when using Line items.
- Amount (`amount`, number): The amount of the expense. At least 0.
- Line memo (`line_memo`, text): A memo on the expense line.
- Line items (advanced) (`line_items`, list): Several expense lines, such as [{"account_id": "58", "amount": 120, "memo": "Paper"}]. Keys: account_id, amount, memo. Added after the line above.
- Date (`date`, date): The transaction date. Defaults to today.
- Due date (`due_date`, date): When the bill is due. Leave empty to work it out from the terms.
- Reference number (`reference_number`, text): The vendor's invoice number.
- Payment terms (`terms_id`, text): Payment terms, such as Net 30.
- Memo (`memo`, text): A memo on the transaction.
- More fields (`other_fields`, object): Any other fields, by their NetSuite name, such as {"custentity_tier": "Gold"} or {"salesRep": {"id": "7"}}. A field filled in above wins.

**Outputs**

- `id` (text): The new record's internal ID
- `vendor_bill` (object): The vendor bill

**Example output**

```json
{
  "id": "5710",
  "vendor_bill": {
    "createdDate": "2026-10-20T15:00:00Z",
    "currency": {
      "id": "1",
      "refName": "USA"
    },
    "dueDate": "2026-11-19",
    "entity": {
      "id": "1250",
      "refName": "Northwind Supplies"
    },
    "expense": {
      "items": [
        {
          "account": {
            "id": "58",
            "refName": "6100 Office Supplies"
          },
          "amount": 120,
          "line": 1,
          "memo": "Paper"
        }
      ]
    },
    "id": "5710",
    "memo": "October supplies",
    "status": {
      "id": "A",
      "refName": "Open"
    },
    "total": 120,
    "tranDate": "2026-10-20",
    "tranId": "NW-5521"
  }
}
```

### Delete record

Delete any record by its type and internal ID. This can't be undone, and NetSuite refuses when other records depend on it.

**Inputs**

- Record type (`record_type`, text, required): The kind of record. Pick one, or type any other NetSuite record type, such as customrecord_project_log.
- Record ID (`record_id`, text, required): The record's internal ID, such as 1234 (or eid: and its external ID).

**Outputs**

- `deleted` (true/false): True once deleted
- `id` (text): The record's internal ID
- `record_type` (text): The record type

**Example output**

```json
{
  "deleted": true,
  "id": "320",
  "record_type": "task"
}
```

### Find contacts

Find contacts by name or email, or a company's contacts, newest first.

**Inputs**

- Search (`search`, text): Text the name or email contains. Leave empty for all.
- Company (`company_id`, text): Only the contacts of this customer (or vendor).
- How many (`limit`, number): How many to return, 1 to 1,000. Defaults to 50. From 1 to 1000.
- Skip (`offset`, number): How many to skip, to get the next page ('next_offset'). At least 0.

**Outputs**

- `contacts` (list): The contacts
- `count` (number): How many came back in this page
- `has_more` (true/false): True when there are more to fetch
- `next_offset` (number): The offset for the next page (0 when none)
- `total` (number): How many match in all

**Example output**

```json
{
  "contacts": [
    {
      "company_id": "1234",
      "company_name": "Acme Corporation",
      "email": "jo@acme.example",
      "first_name": "Jo",
      "id": "1240",
      "is_inactive": false,
      "last_name": "Bloggs",
      "name": "Jo Bloggs",
      "phone": "555-0101",
      "title": "Accounts payable"
    }
  ],
  "count": 1,
  "has_more": false,
  "next_offset": 0,
  "total": 1
}
```

### Find customers

Find customers by name, company or email, newest first. Gets one page; to see more, run it again with the next page it gives.

**Inputs**

- Search (`search`, text): Text the name, company or email contains. Leave empty for all.
- Exact email (`email`, text): Only the customer with exactly this email address.
- Include inactive (`include_inactive`, true/false): Also return records marked inactive. Default: `false`.
- How many (`limit`, number): How many to return, 1 to 1,000. Defaults to 50. From 1 to 1000.
- Skip (`offset`, number): How many to skip, to get the next page ('next_offset'). At least 0.

**Outputs**

- `count` (number): How many came back in this page
- `customers` (list): The customers
- `has_more` (true/false): True when there are more to fetch
- `next_offset` (number): The offset for the next page (0 when none)
- `total` (number): How many match in all

**Example output**

```json
{
  "count": 1,
  "customers": [
    {
      "company_name": "Acme Corporation",
      "created_at": "2026-10-20 07:03:00",
      "email": "billing@acme.example",
      "first_name": "",
      "id": "1234",
      "is_inactive": false,
      "is_individual": false,
      "last_name": "",
      "name": "Acme Corporation",
      "phone": "555-0100",
      "stage": "Customer"
    }
  ],
  "has_more": false,
  "next_offset": 0,
  "total": 1
}
```

### Find invoices

Find invoices by customer, status and date, newest first, with what is still due on each.

**Inputs**

- Customer (`customer_id`, text): Only this customer's. Pick one, or give its internal ID.
- Status (`status`, text): Only invoices with this status. One of: `open`, `paid` (Paid in full), `pending_approval` (Pending approval), `rejected`.
- Dated on or after (`from_date`, date): Only those dated on or after this day.
- Dated on or before (`to_date`, date): Only those dated on or before this day.
- How many (`limit`, number): How many to return, 1 to 1,000. Defaults to 50. From 1 to 1000.
- Skip (`offset`, number): How many to skip, to get the next page ('next_offset'). At least 0.

**Outputs**

- `count` (number): How many came back in this page
- `has_more` (true/false): True when there are more to fetch
- `invoices` (list): The invoices
- `next_offset` (number): The offset for the next page (0 when none)
- `total` (number): How many match in all

**Example output**

```json
{
  "count": 1,
  "has_more": false,
  "invoices": [
    {
      "amount_due": 300,
      "created_at": "2026-10-20 07:12:00",
      "currency": "USA",
      "customer_id": "1234",
      "customer_name": "Acme Corporation",
      "date": "2026-10-20",
      "due_date": "2026-11-19",
      "id": "5690",
      "memo": "Rush order",
      "number": "INV2087",
      "po_number": "PO-7781",
      "status": "A",
      "status_name": "Open",
      "total": 300
    }
  ],
  "next_offset": 0,
  "total": 1
}
```

### Find items

Find the products and services you sell or buy, by name or description, optionally of one type.

**Inputs**

- Search (`search`, text): Text the item's name, display name or description contains. Leave empty for all.
- Item type (`item_type`, text): Only items of this type. One of: `InvtPart` (Inventory item), `NonInvtPart` (Non-inventory item), `Service`, `OthCharge` (Other charge), `Kit` (Kit or package), `Assembly`, `Group` (Item group), `Discount`.
- Include inactive (`include_inactive`, true/false): Also return records marked inactive. Default: `false`.
- How many (`limit`, number): How many to return, 1 to 1,000. Defaults to 50. From 1 to 1000.
- Skip (`offset`, number): How many to skip, to get the next page ('next_offset'). At least 0.

**Outputs**

- `count` (number): How many came back in this page
- `has_more` (true/false): True when there are more to fetch
- `items` (list): The items
- `next_offset` (number): The offset for the next page (0 when none)
- `total` (number): How many match in all

**Example output**

```json
{
  "count": 1,
  "has_more": false,
  "items": [
    {
      "description": "One hour of consulting",
      "display_name": "Consulting (per hour)",
      "id": "12",
      "is_inactive": false,
      "name": "Consulting hour",
      "type": "Service",
      "type_name": "Service"
    }
  ],
  "next_offset": 0,
  "total": 1
}
```

### Find sales orders

Find sales orders by customer, status and date, newest first.

**Inputs**

- Customer (`customer_id`, text): Only this customer's. Pick one, or give its internal ID.
- Status (`status`, text): Only orders with this status. One of: `pending_approval` (Pending approval), `pending_fulfillment` (Pending fulfillment), `partially_fulfilled` (Partially fulfilled), `pending_billing_partially_fulfilled` (Pending billing, partially fulfilled), `pending_billing` (Pending billing), `billed`, `closed`, `cancelled`.
- Dated on or after (`from_date`, date): Only those dated on or after this day.
- Dated on or before (`to_date`, date): Only those dated on or before this day.
- How many (`limit`, number): How many to return, 1 to 1,000. Defaults to 50. From 1 to 1000.
- Skip (`offset`, number): How many to skip, to get the next page ('next_offset'). At least 0.

**Outputs**

- `count` (number): How many came back in this page
- `has_more` (true/false): True when there are more to fetch
- `next_offset` (number): The offset for the next page (0 when none)
- `sales_orders` (list): The sales orders
- `total` (number): How many match in all

**Example output**

```json
{
  "count": 1,
  "has_more": false,
  "next_offset": 0,
  "sales_orders": [
    {
      "created_at": "2026-10-20 07:10:00",
      "currency": "USA",
      "customer_id": "1234",
      "customer_name": "Acme Corporation",
      "date": "2026-10-20",
      "id": "5678",
      "memo": "Rush order",
      "number": "SO1042",
      "po_number": "PO-7781",
      "status": "B",
      "status_name": "Pending Fulfillment",
      "total": 300
    }
  ],
  "total": 1
}
```

### Find vendors

Find vendors by name, company or email, newest first.

**Inputs**

- Search (`search`, text): Text the name, company or email contains. Leave empty for all.
- Include inactive (`include_inactive`, true/false): Also return records marked inactive. Default: `false`.
- How many (`limit`, number): How many to return, 1 to 1,000. Defaults to 50. From 1 to 1000.
- Skip (`offset`, number): How many to skip, to get the next page ('next_offset'). At least 0.

**Outputs**

- `count` (number): How many came back in this page
- `has_more` (true/false): True when there are more to fetch
- `next_offset` (number): The offset for the next page (0 when none)
- `total` (number): How many match in all
- `vendors` (list): The vendors

**Example output**

```json
{
  "count": 1,
  "has_more": false,
  "next_offset": 0,
  "total": 1,
  "vendors": [
    {
      "company_name": "Northwind Supplies",
      "created_at": "2026-10-20 07:06:00",
      "email": "ap@northwind.example",
      "id": "1250",
      "is_inactive": false,
      "is_individual": false,
      "name": "Northwind Supplies",
      "phone": "555-0102"
    }
  ]
}
```

### Get customer

Get one customer with their contact details, terms and balance.

**Inputs**

- Customer (`customer_id`, text, required): The customer. Pick one, or give its internal ID from an earlier step.

**Outputs**

- `customer` (object): The customer

**Example output**

```json
{
  "customer": {
    "balance": 0,
    "comments": "",
    "companyName": "Acme Corporation",
    "currency": {
      "id": "1",
      "refName": "USA"
    },
    "dateCreated": "2026-10-20T14:03:00Z",
    "email": "billing@acme.example",
    "entityId": "Acme Corporation",
    "firstName": "",
    "id": "1234",
    "isInactive": false,
    "isPerson": false,
    "lastModifiedDate": "2026-10-20T14:03:00Z",
    "lastName": "",
    "phone": "555-0100",
    "subsidiary": {
      "id": "1",
      "refName": "Parent Company"
    },
    "terms": {
      "id": "2",
      "refName": "Net 30"
    }
  }
}
```

### Get invoice

Get one invoice with its status, lines, total and the amount still due.

**Inputs**

- Invoice ID (`invoice_id`, text, required): The invoice's internal ID, from 'Find invoices' or an earlier step.

**Outputs**

- `invoice` (object): The invoice

**Example output**

```json
{
  "invoice": {
    "amountPaid": 0,
    "amountRemaining": 300,
    "createdDate": "2026-10-20T14:12:00Z",
    "createdFrom": {
      "id": "5678",
      "refName": "Sales Order #SO1042"
    },
    "currency": {
      "id": "1",
      "refName": "USA"
    },
    "dueDate": "2026-11-19",
    "entity": {
      "id": "1234",
      "refName": "Acme Corporation"
    },
    "id": "5690",
    "item": {
      "items": [
        {
          "amount": 300,
          "description": "Consulting",
          "item": {
            "id": "12",
            "refName": "Consulting hour"
          },
          "line": 1,
          "quantity": 2,
          "rate": 150
        }
      ]
    },
    "lastModifiedDate": "2026-10-20T14:12:00Z",
    "memo": "Rush order",
    "otherRefNum": "PO-7781",
    "status": {
      "id": "A",
      "refName": "Open"
    },
    "subtotal": 300,
    "terms": {
      "id": "2",
      "refName": "Net 30"
    },
    "total": 300,
    "tranDate": "2026-10-20",
    "tranId": "INV2087"
  }
}
```

### Get record

Get any record, such as an estimate, purchase order or custom record, by its type and internal ID, with its lines.

**Inputs**

- Record type (`record_type`, text, required): The kind of record. Pick one, or type any other NetSuite record type, such as customrecord_project_log.
- Record ID (`record_id`, text, required): The record's internal ID, such as 1234 (or eid: and its external ID).

**Outputs**

- `id` (text): The record's internal ID
- `record` (object): The record's fields, named as NetSuite's REST API names them; a reference is an object with its id and refName
- `record_type` (text): The record type

**Example output**

```json
{
  "id": "5730",
  "record": {
    "entity": {
      "id": "1234",
      "refName": "Acme Corporation"
    },
    "id": "5730",
    "total": 300,
    "tranId": "EST77"
  },
  "record_type": "estimate"
}
```

### Get sales order

Get one sales order with its status, totals and lines.

**Inputs**

- Sales order ID (`sales_order_id`, text, required): The sales order's internal ID, from 'Find sales orders' or an earlier step.

**Outputs**

- `sales_order` (object): The sales order

**Example output**

```json
{
  "sales_order": {
    "createdDate": "2026-10-20T14:10:00Z",
    "currency": {
      "id": "1",
      "refName": "USA"
    },
    "entity": {
      "id": "1234",
      "refName": "Acme Corporation"
    },
    "id": "5678",
    "item": {
      "items": [
        {
          "amount": 300,
          "description": "Consulting",
          "item": {
            "id": "12",
            "refName": "Consulting hour"
          },
          "line": 1,
          "quantity": 2,
          "rate": 150
        }
      ]
    },
    "lastModifiedDate": "2026-10-20T14:10:00Z",
    "memo": "Rush order",
    "otherRefNum": "PO-7781",
    "status": {
      "id": "B",
      "refName": "Pending Fulfillment"
    },
    "subsidiary": {
      "id": "1",
      "refName": "Parent Company"
    },
    "subtotal": 300,
    "total": 300,
    "tranDate": "2026-10-20",
    "tranId": "SO1042"
  }
}
```

### Record invoice payment

Record a customer's payment of an invoice, in full or in part, as Accept Payment does in NetSuite.

**Inputs**

- Invoice ID (`invoice_id`, text, required): The invoice's internal ID, from 'Find invoices' or an earlier step.
- Amount (`amount`, number): How much was paid. Leave empty to pay what is due. At least 0.
- Payment date (`date`, date): When it was paid. Defaults to today.
- Check or reference number (`reference_number`, text): The check number, or the payment's reference.
- Memo (`memo`, text): A memo on the transaction.

**Outputs**

- `id` (text): The new record's internal ID
- `payment` (object): The customer payment

**Example output**

```json
{
  "id": "5701",
  "payment": {
    "applied": 300,
    "checkNumber": "10023",
    "createdDate": "2026-10-21T09:00:00Z",
    "currency": {
      "id": "1",
      "refName": "USA"
    },
    "customer": {
      "id": "1234",
      "refName": "Acme Corporation"
    },
    "id": "5701",
    "memo": "Paid by check",
    "payment": 300,
    "status": {
      "id": "B",
      "refName": "Not Deposited"
    },
    "tranDate": "2026-10-21",
    "tranId": "PYMT311",
    "unapplied": 0
  }
}
```

### Run SuiteQL query

Run a SuiteQL query, NetSuite's SQL, and get one page of its rows. Use ? in the query for each of the values given, in order.

**Inputs**

- Query (`query`, text, required): A SuiteQL SELECT query, such as SELECT id, companyname FROM customer WHERE email = ?
- Values (`values`, list): Values for the query's ? marks, in order, such as ["jo@example.com"]. They are never read as SQL.
- How many (`limit`, number): How many to return, 1 to 1,000. Defaults to 50. From 1 to 1000.
- Skip (`offset`, number): How many to skip, to get the next page ('next_offset'). At least 0.

**Outputs**

- `count` (number): How many came back in this page
- `has_more` (true/false): True when there are more to fetch
- `next_offset` (number): The offset for the next page (0 when none)
- `rows` (list): The rows
- `total` (number): How many match in all

**Example output**

```json
{
  "count": 1,
  "has_more": false,
  "next_offset": 0,
  "rows": [
    {
      "companyname": "Acme Corporation",
      "id": "1234"
    }
  ],
  "total": 1
}
```

### Update customer

Change a customer's name, email, phone, terms or comments, or make them inactive. Only the fields given change.

**Inputs**

- Customer (`customer_id`, text, required): The customer. Pick one, or give its internal ID from an earlier step.
- Company name (`company_name`, text): A new company name. Leave empty to keep it.
- First name (`first_name`, text): The person's first name.
- Last name (`last_name`, text): The person's last name.
- Email (`email`, text): Email address.
- Phone (`phone`, text): Phone number.
- Payment terms (`terms_id`, text): Payment terms, such as Net 30.
- Comments (`comments`, text): New comments, replacing the old. Leave empty to keep them.
- Status (`status`, text): Make the customer active or inactive. Leave empty to keep it. One of: `active`, `inactive`.
- More fields (`other_fields`, object): Any other fields, by their NetSuite name, such as {"custentity_tier": "Gold"} or {"salesRep": {"id": "7"}}. A field filled in above wins.

**Outputs**

- `customer` (object): The customer

**Example output**

```json
{
  "customer": {
    "balance": 0,
    "comments": "",
    "companyName": "Acme Corporation",
    "currency": {
      "id": "1",
      "refName": "USA"
    },
    "dateCreated": "2026-10-20T14:03:00Z",
    "email": "billing@acme.example",
    "entityId": "Acme Corporation",
    "firstName": "",
    "id": "1234",
    "isInactive": false,
    "isPerson": false,
    "lastModifiedDate": "2026-10-20T14:03:00Z",
    "lastName": "",
    "phone": "555-0199",
    "subsidiary": {
      "id": "1",
      "refName": "Parent Company"
    },
    "terms": {
      "id": "2",
      "refName": "Net 30"
    }
  }
}
```

### Update record

Change fields on any kind of record. Only the fields given change.

**Inputs**

- Record type (`record_type`, text, required): The kind of record. Pick one, or type any other NetSuite record type, such as customrecord_project_log.
- Record ID (`record_id`, text, required): The record's internal ID, such as 1234 (or eid: and its external ID).
- Fields (`fields`, object, required): The record's fields by their NetSuite name, such as {"title": "Call back", "company": {"id": "1234"}}. A reference to another record is {"id": "..."}.

**Outputs**

- `id` (text): The record's internal ID
- `record` (object): The record's fields, named as NetSuite's REST API names them; a reference is an object with its id and refName
- `record_type` (text): The record type

**Example output**

```json
{
  "id": "320",
  "record": {
    "id": "320",
    "status": {
      "id": "COMPLETE",
      "refName": "Completed"
    },
    "title": "Call back Acme"
  },
  "record_type": "task"
}
```
