Opportunity API
Manage sales opportunities for pipeline tracking and forecasting using the NetSuite REST API.
Endpoints
| Method | Endpoint | Description |
|---|---|---|
GET | /record/v1/opportunity | List all opportunities |
GET | /record/v1/opportunity/{id} | Get specific opportunity |
POST | /record/v1/opportunity | Create new opportunity |
PATCH | /record/v1/opportunity/{id} | Update opportunity |
DELETE | /record/v1/opportunity/{id} | Delete opportunity |
Key Fields
Header Fields
| Field | Type | Description | Required |
|---|---|---|---|
id | string | Internal ID (read-only) | - |
title | string | Opportunity name/title | Yes |
entity | object | Customer/prospect reference | Yes |
tranDate | string | Opportunity date (ISO 8601) | Yes |
expectedCloseDate | string | Expected close date | No |
status | object | Opportunity status | No |
subsidiary | object | Subsidiary | Yes (OneWorld) |
Sales Tracking
| Field | Type | Description | Required |
|---|---|---|---|
salesRep | object | Sales representative | No |
salesGroup | object | Sales team/group | No |
probability | number | Win probability % (0-100) | No |
salesStage | object | Sales stage | No |
forecastType | object | Forecast type | No |
partner | object | Partner reference | No |
leadsource | object | Lead source | No |
Financial Projections
| Field | Type | Description | Required |
|---|---|---|---|
currency | object | Transaction currency | Yes |
exchangeRate | number | Exchange rate | Auto-calculated |
projectedTotal | number | Projected revenue | No |
rangeHigh | number | High revenue estimate | No |
rangeLow | number | Low revenue estimate | No |
probability | number | Win probability % | No |
weightedTotal | number | Weighted forecast (read-only) | Auto-calculated |
Relationship Fields
| Field | Type | Description | Required |
|---|---|---|---|
tranId | string | Opportunity number | Auto-generated |
competitor | object | Competitor reference | No |
winLossReason | object | Win/loss reason | No |
actionItem | string | Next action item | No |
Other Fields
| Field | Type | Description | Required |
|---|---|---|---|
memo | string | Internal notes | No |
class | object | Department/class | No |
location | object | Location | No |
createdFrom | object | Source transaction | No |
Sublists
| Field | Type | Description | Required |
|---|---|---|---|
item | collection | Projected line items | No |
competitor | collection | Competitors | No |
salesteam | collection | Sales team members | No |
Line Items
The item sublist contains projected products/services for revenue forecasting.
Item Line Fields
| Field | Type | Description | Required |
|---|---|---|---|
item | object | Item reference | Yes |
quantity | number | Projected quantity | Yes |
rate | number | Expected unit price | Yes |
amount | number | Line total (qty × rate) | Auto-calculated |
description | string | Line description | No |
expectedShipDate | string | Expected ship date | No |
Example: Create Opportunity
POST /record/v1/opportunity
Content-Type: application/json
{
"title": "Q1 2026 Enterprise License - Acme Corp",
"entity": {
"id": "456"
},
"tranDate": "2025-12-25",
"expectedCloseDate": "2026-03-31",
"subsidiary": {
"id": "1"
},
"currency": {
"id": "1"
},
"salesRep": {
"id": "123"
},
"probability": 50,
"projectedTotal": 150000,
"rangeHigh": 200000,
"rangeLow": 100000,
"leadsource": {
"id": "5"
},
"actionItem": "Schedule product demo for January 15",
"memo": "Large enterprise opportunity - requires executive approval",
"item": {
"items": [
{
"item": { "id": "789" },
"quantity": 100,
"rate": 1500,
"description": "Enterprise License - 100 users",
"expectedShipDate": "2026-04-01"
},
{
"item": { "id": "791" },
"quantity": 100,
"rate": 500,
"description": "Premium Support - Annual"
}
]
}
}
Response:
{
"id": "3001",
"tranId": "OPP-3001",
"title": "Q1 2026 Enterprise License - Acme Corp",
"entity": {
"id": "456",
"refName": "Acme Corporation"
},
"tranDate": "2025-12-25",
"expectedCloseDate": "2026-03-31",
"status": {
"id": "OPEN",
"refName": "Open"
},
"probability": 50,
"projectedTotal": 150000.00,
"weightedTotal": 75000.00,
"links": [
{
"rel": "self",
"href": "https://{account}.suitetalk.api.netsuite.com/services/rest/record/v1/opportunity/3001"
}
]
}
Example: Update Opportunity
PATCH /record/v1/opportunity/3001
Content-Type: application/json
{
"probability": 75,
"expectedCloseDate": "2026-03-15",
"actionItem": "Awaiting contract review",
"memo": "Customer confirmed budget approval - very strong interest"
}
Sales Stages
Track opportunity progression through your sales pipeline:
| Stage | Description | Typical Probability |
|---|---|---|
| Prospecting | Initial contact | 10% |
| Qualification | Qualified lead | 20% |
| Needs Analysis | Understanding requirements | 30% |
| Proposal/Quote | Formal proposal submitted | 50% |
| Negotiation | Price/terms discussion | 75% |
| Verbal Approval | Verbal commitment | 90% |
| Closed Won | Deal won | 100% |
| Closed Lost | Deal lost | 0% |
tip
Sales stages and probabilities are configurable in NetSuite and vary by organization.
Convert to Estimate or Sales Order
Convert to Estimate
POST /record/v1/estimate
Content-Type: application/json
{
"createdFrom": {
"id": "3001"
},
"entity": { "id": "456" },
"tranDate": "2025-12-26"
}
Convert to Sales Order
POST /record/v1/salesOrder
Content-Type: application/json
{
"createdFrom": {
"id": "3001"
},
"entity": { "id": "456" },
"tranDate": "2025-12-26"
}
Auto-Fill from Opportunity
When you provide createdFrom with an opportunity ID, NetSuite auto-fills customer, items, and projected amounts.
Query Filters
Find Open Opportunities
GET /record/v1/opportunity?q=status='OPEN'
Find by Sales Rep
GET /record/v1/opportunity?q=salesRep='123'
Find High-Value Opportunities
GET /record/v1/opportunity?q=projectedTotal > 100000 AND status='OPEN'
Find by Probability Range
GET /record/v1/opportunity?q=probability >= 50 AND probability <= 75
Find Closing This Quarter
GET /record/v1/opportunity?q=expectedCloseDate BETWEEN '2026-01-01' AND '2026-03-31'
Find by Customer
GET /record/v1/opportunity?q=entity='456'
Find Stale Opportunities (No Activity)
GET /record/v1/opportunity?q=lastModifiedDate < SYSDATE-30 AND status='OPEN'
Important Notes
No Accounting Impact
- Opportunities do not affect the general ledger
- They are pipeline tracking documents only
- No journal entries are created
- Revenue is not recognized until conversion
Weighted Forecasting
weightedTotal=projectedTotal× (probability/ 100)- Used for revenue forecasting
- Automatically calculated by NetSuite
- Updates when probability or projected total changes
Pipeline Management
- Use opportunities to track deals in progress
- Monitor conversion rates by stage
- Forecast revenue by close date
- Track win/loss reasons for analysis
Sales Team Collaboration
- Multiple team members can be assigned
- Track individual contributions
- Split commission tracking
- Partner relationship management
Converting Opportunities
- Can be converted to Estimates, Sales Orders, or Invoices
- Original opportunity remains open
- Update status to "Closed Won" or "Closed Lost" manually
- Conversion creates reference link
Custom Fields
- Add custom fields for your sales process
- Track industry-specific data
- Integrate with CRM workflows
- Custom approval processes
Multi-Currency
- Currency is set at opportunity creation
- Exchange rates affect weighted forecasting
- Important for global sales teams
See Also
- Estimate - Create quotes from opportunities
- Sales Order - Convert to orders
- Customer - Customer management