Manufacturing Orders
Manufacturing orders track the production process from creation to completion.
Available fields
| Field | Type | Description |
|---|---|---|
id | Int | Unique identifier. |
label | String | Order number. |
notes | String | Internal notes. |
status | ManufacturingOrderStatus | Current status. |
operation_type | ManufacturingOrderOperationType | Build or split. |
on_hold_reason | ManufacturingOrderOnHoldReason | Reason if on hold. |
on_hold_note | String | Note for hold reason. |
quantity | Float | Ordered quantity. |
remaining_to_produce | Float | Quantity remaining. |
actually_produced | Float | Actually produced quantity. |
draft_produced_quantity | Float | Draft produced quantity. |
batch_quantity | Float | Batch quantity. |
unit_manufacturing_cost | Float | Cost per unit. |
exceptional_manufacturing_cost | Float | Exceptional costs. |
due_at | Date | Due date. |
planned_start_at | Date | Planned start date. |
planned_end_at | Date | Planned end date. |
actual_start_at | Date | Actual start date. |
actual_end_at | Date | Actual end date. |
created_at | DateTime | Creation timestamp. |
updated_at | DateTime | Last update timestamp. |
variant | Variant | Product variant to manufacture. |
bill_of_material | BillOfMaterial | BOM used. |
manufacturing_routing | ManufacturingRouting | Routing used. |
location | Location | Manufacturing location. |
supplier | Supplier | Subcontractor (if outsourced). |
order | Order | Source sales order. |
steps | [ManufacturingOrderStep] | Manufacturing steps. |
lines | [ManufacturingOrderLine] | Production lines. |
dependencies | [ManufacturingOrderDependency] | Dependent orders. |
batches | [ManufacturingOrderBatch] | Production batches. |
stock_adjustments | [StockAdjustment] | Related stock movements. |
email_histories | [EmailHistory] | Email logs. |
purchases | [Purchase] | Related purchase orders. |
parent_dependencies | [ManufacturingOrderDependency] | Orders that depend on this one. |
order_line_item_id | Int | Source order line item ID. |
ManufacturingOrderStep
| Field | Type | Description |
|---|---|---|
id | Int | Unique identifier. |
manufacturing_routing_step_id | Int | Routing step ID. |
status | ManufacturingOrderStepStatus | Step status. |
started_at | DateTime | Step start time. |
completed_at | DateTime | Step completion time. |
routing_step | ManufacturingRoutingStep | Associated routing step. |
ManufacturingOrderLine
ManufacturingOrderDependency
| Field | Type | Description |
|---|---|---|
id | Int | Unique identifier. |
manufacturing_order_id | Int | Parent order ID. |
dependency_manufacturing_order_id | Int | Dependent order ID. |
manufacturing_order | ManufacturingOrder | Parent order. |
dependency_manufacturing_order | ManufacturingOrder | Dependent order. |
ManufacturingOrderBatch
| Field | Type | Description |
|---|---|---|
id | Int | Unique identifier. |
status | ManufacturingOrderBatchStatus | Batch status. |
produced_at | DateTime | Production date. |
produced_quantity | Float | Produced quantity. |
posted_at | DateTime | Posting date. |
cancelled_at | DateTime | Cancellation date. |
notes | String | Batch notes. |
location | Location | Production location. |
finished_batch_number | BatchNumber | Finished batch number. |
lines | [ManufacturingOrderBatchLine] | Batch lines. |
steps | [ManufacturingOrderBatchStep] | Batch steps. |
ManufacturingOrderBatchStep
| Field | Type | Description |
|---|---|---|
id | Int | Unique identifier. |
manufacturing_routing_step_id | Int | Routing step ID. |
status | ManufacturingOrderStepStatus | Step status. |
started_at | DateTime | Step start time. |
completed_at | DateTime | Step completion time. |
routing_step | ManufacturingRoutingStep | Associated routing step. |
ManufacturingOrderBatchLine
| Field | Type | Description |
|---|---|---|
id | Int | Unique identifier. |
manufacturing_order_line_id | Int | Parent line ID. |
actual_quantity | Float | Actually produced quantity. |
manufacturing_order_line | ManufacturingOrderLine | Parent line. |
batch_numbers | [ManufacturingOrderBatchLineBatchNumber] | Batch numbers. |
serial_numbers | [ManufacturingOrderBatchLineSerialNumber] | Serial numbers. |
ManufacturingOrderBatchLineSerialNumber
| Field | Type | Description |
|---|---|---|
id | Int | Unique identifier. |
serial_number_id | Int | Serial number ID. |
serial_number | SerialNumber | Associated serial number. |
ManufacturingOrderBatchLineBatchNumber
| Field | Type | Description |
|---|---|---|
id | Int | Unique identifier. |
batch_number_id | Int | Batch number ID. |
quantity | Float | Quantity for this batch. |
batch_number | BatchNumber | Associated batch number. |
Enums
ManufacturingOrderStatus
| Value | Description |
|---|---|
unpublished | Draft, not visible. |
draft | Created, not released. |
released | Released for production. |
in_progress | Production in progress. |
ready_to_close | Ready to close. |
completed | Production completed. |
on_hold | On hold. |
cancelled | Cancelled. |
ManufacturingOrderOperationType
| Value | Description |
|---|---|
build | Build a product. |
split | Split into components. |
ManufacturingOrderStepStatus
| Value | Description |
|---|---|
pending | Not started. |
in_progress | In progress. |
completed | Completed. |
skipped | Skipped. |
ManufacturingOrderBatchStatus
| Value | Description |
|---|---|
draft | Draft batch. |
posted | Posted (confirmed). |
cancelled | Cancelled. |
ManufacturingOrderOnHoldReason
| Value | Description |
|---|---|
material_shortage | Missing materials. |
machine_issue | Machine problem. |
quality_issue | Quality control issue. |
labor_issue | Labor shortage or issue. |
dependency_blocked | Waiting on dependent order. |
other | Other reason. |
ManufacturingOrder
Returns a single manufacturing order by id.
query GetManufacturingOrder($id: ID!) {
ManufacturingOrder(id: $id) {
id
label
status
quantity
remaining_to_produce
due_at
variant {
id
label
}
bill_of_material {
id
label
}
steps {
id
status
started_at
completed_at
}
batches {
id
status
produced_quantity
}
}
}ManufacturingOrders
Returns a paginated list of manufacturing orders with sorting and filters.
query ManufacturingOrders(
$orderBy: [QueryManufacturingOrdersOrderByOrderByClause!]
$where: QueryManufacturingOrdersWhereWhereConditions
) {
ManufacturingOrders(orderBy: $orderBy, where: $where) {
id
label
status
quantity
due_at
variant {
id
label
}
}
}ManufacturingOrderBatches
Returns a paginated list of manufacturing order batches.
query ManufacturingOrderBatches(
$orderBy: [QueryManufacturingOrderBatchesOrderByOrderByClause!]
$where: QueryManufacturingOrderBatchesWhereWhereConditions
$first: Int
$page: Int
) {
ManufacturingOrderBatches(orderBy: $orderBy, where: $where, first: $first, page: $page) {
id
status
produced_quantity
produced_at
posted_at
manufacturing_order {
id
label
}
}
}ManufacturingOrderDependencies
Returns a paginated list of manufacturing order dependencies.
query ManufacturingOrderDependencies(
$orderBy: [QueryManufacturingOrderDependenciesOrderByOrderByClause!]
$where: QueryManufacturingOrderDependenciesWhereWhereConditions
$first: Int
$page: Int
) {
ManufacturingOrderDependencies(orderBy: $orderBy, where: $where, first: $first, page: $page) {
id
manufacturing_order {
id
label
}
dependency_manufacturing_order {
id
label
}
}
}Filters
The following fields can be used in the where parameter for ManufacturingOrders:
id, label, status, quantity, variant_id, variant_label, variant_sku, component_variant_id, batch_number_id, component_batch_number_id, location_id, order_id, order_line_item_id, supplier_id, bill_of_material_id, manufacturing_routing_id, due_at, planned_start_at, planned_end_at, actual_start_at, actual_end_at.
The search parameter is also available for full-text search on label and variant fields.
The following fields can be used in the where parameter for ManufacturingOrderBatches:
id, manufacturing_order_id, status, produced_at, posted_at, created_at, updated_at.
The following fields can be used in the where parameter for ManufacturingOrderDependencies:
id, manufacturing_order_id, dependency_manufacturing_order_id, created_at, updated_at.
