Manufacturing Orders Queries

Manufacturing Orders

Manufacturing orders track the production process from creation to completion.

Available fields

FieldTypeDescription
idIntUnique identifier.
labelStringOrder number.
notesStringInternal notes.
statusManufacturingOrderStatusCurrent status.
operation_typeManufacturingOrderOperationTypeBuild or split.
on_hold_reasonManufacturingOrderOnHoldReasonReason if on hold.
on_hold_noteStringNote for hold reason.
quantityFloatOrdered quantity.
remaining_to_produceFloatQuantity remaining.
actually_producedFloatActually produced quantity.
draft_produced_quantityFloatDraft produced quantity.
batch_quantityFloatBatch quantity.
unit_manufacturing_costFloatCost per unit.
exceptional_manufacturing_costFloatExceptional costs.
due_atDateDue date.
planned_start_atDatePlanned start date.
planned_end_atDatePlanned end date.
actual_start_atDateActual start date.
actual_end_atDateActual end date.
created_atDateTimeCreation timestamp.
updated_atDateTimeLast update timestamp.
variantVariantProduct variant to manufacture.
bill_of_materialBillOfMaterialBOM used.
manufacturing_routingManufacturingRoutingRouting used.
locationLocationManufacturing location.
supplierSupplierSubcontractor (if outsourced).
orderOrderSource 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_idIntSource order line item ID.

ManufacturingOrderStep

FieldTypeDescription
idIntUnique identifier.
manufacturing_routing_step_idIntRouting step ID.
statusManufacturingOrderStepStatusStep status.
started_atDateTimeStep start time.
completed_atDateTimeStep completion time.
routing_stepManufacturingRoutingStepAssociated routing step.

ManufacturingOrderLine

FieldTypeDescription
idIntUnique identifier.
variant_idIntVariant ID.
planned_quantityFloatPlanned quantity.
remaining_to_produceFloatRemaining to produce.
weightIntWeight.
variantVariantAssociated variant.

ManufacturingOrderDependency

FieldTypeDescription
idIntUnique identifier.
manufacturing_order_idIntParent order ID.
dependency_manufacturing_order_idIntDependent order ID.
manufacturing_orderManufacturingOrderParent order.
dependency_manufacturing_orderManufacturingOrderDependent order.

ManufacturingOrderBatch

FieldTypeDescription
idIntUnique identifier.
statusManufacturingOrderBatchStatusBatch status.
produced_atDateTimeProduction date.
produced_quantityFloatProduced quantity.
posted_atDateTimePosting date.
cancelled_atDateTimeCancellation date.
notesStringBatch notes.
locationLocationProduction location.
finished_batch_numberBatchNumberFinished batch number.
lines[ManufacturingOrderBatchLine]Batch lines.
steps[ManufacturingOrderBatchStep]Batch steps.

ManufacturingOrderBatchStep

FieldTypeDescription
idIntUnique identifier.
manufacturing_routing_step_idIntRouting step ID.
statusManufacturingOrderStepStatusStep status.
started_atDateTimeStep start time.
completed_atDateTimeStep completion time.
routing_stepManufacturingRoutingStepAssociated routing step.

ManufacturingOrderBatchLine

FieldTypeDescription
idIntUnique identifier.
manufacturing_order_line_idIntParent line ID.
actual_quantityFloatActually produced quantity.
manufacturing_order_lineManufacturingOrderLineParent line.
batch_numbers[ManufacturingOrderBatchLineBatchNumber]Batch numbers.
serial_numbers[ManufacturingOrderBatchLineSerialNumber]Serial numbers.

ManufacturingOrderBatchLineSerialNumber

FieldTypeDescription
idIntUnique identifier.
serial_number_idIntSerial number ID.
serial_numberSerialNumberAssociated serial number.

ManufacturingOrderBatchLineBatchNumber

FieldTypeDescription
idIntUnique identifier.
batch_number_idIntBatch number ID.
quantityFloatQuantity for this batch.
batch_numberBatchNumberAssociated batch number.

Enums

ManufacturingOrderStatus

ValueDescription
unpublishedDraft, not visible.
draftCreated, not released.
releasedReleased for production.
in_progressProduction in progress.
ready_to_closeReady to close.
completedProduction completed.
on_holdOn hold.
cancelledCancelled.

ManufacturingOrderOperationType

ValueDescription
buildBuild a product.
splitSplit into components.

ManufacturingOrderStepStatus

ValueDescription
pendingNot started.
in_progressIn progress.
completedCompleted.
skippedSkipped.

ManufacturingOrderBatchStatus

ValueDescription
draftDraft batch.
postedPosted (confirmed).
cancelledCancelled.

ManufacturingOrderOnHoldReason

ValueDescription
material_shortageMissing materials.
machine_issueMachine problem.
quality_issueQuality control issue.
labor_issueLabor shortage or issue.
dependency_blockedWaiting on dependent order.
otherOther 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.