Skip to main content

Work Order Close API

Close completed work orders to finalize manufacturing operations. This transaction marks a work order as complete and prevents further activity against it.

Endpoints

MethodEndpointDescription
GET/record/v1/workOrderCloseRetrieve list of work order close transactions
GET/record/v1/workOrderClose/{id}Retrieve specific work order close
POST/record/v1/workOrderCloseCreate new work order close transaction
PATCH/record/v1/workOrderClose/{id}Update existing work order close
DELETE/record/v1/workOrderClose/{id}Delete work order close transaction

Key Fields

Header Fields

FieldTypeDescriptionRequired
createdFromObjectReference to the work order being closedYes
tranDateDateTransaction date (format: YYYY-MM-DD)Yes
tranIdStringTransaction number (auto-generated if not provided)No
subsidiaryObjectSubsidiary (inherited from work order)Read-only
locationObjectLocation (inherited from work order)Read-only
memoStringNotes or comments about closing the work orderNo
departmentObjectDepartment referenceNo
classObjectClass referenceNo
postingPeriodObjectAccounting period for postingNo
orderQuantityNumberOriginal work order quantityRead-only
builtQuantityNumberQuantity actually builtRead-only
customFormObjectCustom form referenceNo
createdDateDateTimeDate transaction was createdRead-only
lastModifiedDateDateTimeDate transaction was last modifiedRead-only

Sublist: Component (item)

FieldTypeDescriptionRequired
itemObjectComponent item referenceRead-only
quantityPerNumberQuantity per assembly unitRead-only
orderQuantityNumberTotal quantity ordered for work orderRead-only
receivedQuantityNumberQuantity received/consumedRead-only
scrapQuantityNumberQuantity scrappedNo

Example: Create Work Order Close

Request

POST /record/v1/workOrderClose
Content-Type: application/json
{
"createdFrom": {
"id": "3001"
},
"tranDate": "2026-01-06",
"memo": "Closing work order WO-2025-001 - Production complete",
"department": {
"id": "5"
},
"class": {
"id": "3"
}
}

Response

{
"id": "4001",
"createdFrom": {
"id": "3001",
"refName": "WO-2025-001"
},
"tranDate": "2026-01-06",
"tranId": "WOC-2026-001",
"subsidiary": {
"id": "1",
"refName": "Parent Company"
},
"location": {
"id": "1",
"refName": "Main Warehouse"
},
"memo": "Closing work order WO-2025-001 - Production complete",
"department": {
"id": "5",
"refName": "Manufacturing"
},
"class": {
"id": "3",
"refName": "Production"
},
"orderQuantity": 100,
"builtQuantity": 100,
"postingPeriod": {
"id": "102",
"refName": "Jan 2026"
},
"createdDate": "2026-01-06T09:15:00Z",
"lastModifiedDate": "2026-01-06T09:15:00Z",
"item": {
"items": [
{
"item": {
"id": "789",
"refName": "Component Part A"
},
"quantityPer": 2,
"orderQuantity": 200,
"receivedQuantity": 200,
"scrapQuantity": 0
},
{
"item": {
"id": "790",
"refName": "Component Part B"
},
"quantityPer": 1,
"orderQuantity": 100,
"receivedQuantity": 100,
"scrapQuantity": 0
}
]
},
"links": [
{
"rel": "self",
"href": "https://your-account.suitetalk.api.netsuite.com/services/rest/record/v1/workOrderClose/4001"
}
]
}

Example: Update Work Order Close

Request

PATCH /record/v1/workOrderClose/4001
Content-Type: application/json
{
"memo": "Closing work order WO-2025-001 - Production complete with minor scrap",
"item": {
"items": [
{
"item": {
"id": "789"
},
"scrapQuantity": 4
}
]
}
}

Response

{
"id": "4001",
"memo": "Closing work order WO-2025-001 - Production complete with minor scrap",
"lastModifiedDate": "2026-01-06T10:30:00Z",
"item": {
"items": [
{
"item": {
"id": "789",
"refName": "Component Part A"
},
"scrapQuantity": 4
}
]
},
"links": [
{
"rel": "self",
"href": "https://your-account.suitetalk.api.netsuite.com/services/rest/record/v1/workOrderClose/4001"
}
]
}

Sublists and Components

Component Items (item)

The item sublist displays component information from the work order and allows tracking of scrap quantities.

Fields:

  • item: Reference to the component item (read-only)
  • quantityPer: Quantity needed per assembly unit (read-only)
  • orderQuantity: Total quantity ordered (read-only)
  • receivedQuantity: Quantity consumed (read-only)
  • scrapQuantity: Quantity of component scrapped

Example:

"item": {
"items": [
{
"item": {"id": "789"},
"scrapQuantity": 5
}
]
}

Query Filters

Filter by Transaction Date

GET /record/v1/workOrderClose?q=tranDate EQUAL '2026-01-06'

Filter by Date Range

GET /record/v1/workOrderClose?q=tranDate BETWEEN '2026-01-01' AND '2026-01-31'

Filter by Work Order

GET /record/v1/workOrderClose?q=createdFrom EQUAL 3001

Filter by Subsidiary

GET /record/v1/workOrderClose?q=subsidiary EQUAL 1
GET /record/v1/workOrderClose/4001?expandSubResources=true

Work Order Close Process

The work order close transaction performs the following:

  1. Finalizes Work Order: Changes work order status to "Closed"
  2. Locks Work Order: Prevents further completions or issues
  3. Records Scrap: Allows documenting component scrap quantities
  4. Completes Accounting: Finalizes all manufacturing costs
  5. Releases Commitments: Releases any remaining committed inventory

Important Notes

  1. Work Order Status: Only work orders with status "Built" can be closed. The work order must have completed quantities.

  2. Prerequisite Transaction: A Work Order Completion must be posted before a work order can be closed.

  3. Component Tracking: The component sublist shows all components from the original work order with their consumption details.

  4. Scrap Accounting:

    • Scrap quantities can be entered for components
    • Scrap is recorded in the scrap account defined in accounting preferences
    • Scrap affects the total cost of the assembly
  5. Posting Period:

    • Transaction posts to the specified accounting period
    • If not specified, uses the period for the transaction date
    • Period must be open for posting
  6. Reversibility: Once a work order is closed, it cannot be reopened. To reverse, delete the close transaction (if no dependent transactions exist).

  7. Inventory Impact:

    • Closing does not affect inventory quantities
    • All inventory movements should be completed via Completions and Issues before closing
  8. Variance Analysis: Any difference between planned and actual component usage is recorded as manufacturing variance.

  9. Department and Class: These values default from the work order but can be overridden.

  10. Multi-Currency: If multi-currency is enabled, exchange rates are locked at close time.

  11. Custom Forms: Custom close forms may include additional required fields.

  12. Permissions: Requires "Work Order Close" transaction permission with appropriate access level.

  13. Audit Trail: The close transaction creates a permanent record of the work order completion details.

  14. Workflow: May trigger custom workflows or scripts defined for work order close events.