Skip to main content

system.mes.productionOrder.getProductionOrder

Description

Retrieves a Production Orders record by its ID or name.

Syntax

system.mes.productionOrder.getProductionOrder(productionOrderIdOrName)

Parameters

ParameterTypeDescription
productionOrderIdOrNameStringThe ID or name of the production order to retrieve.

Returns

Returns a JSON representation of the production order. Returns nothing if no production order is found.

NameTypeDescription
productNameStringThe name of the material produce to be produced in this production order.
customerNameStringThe name of the customer that is associated with this production order.
locationNameStringThe name of the location that is associated with this production order.
unitOfMeasureNameStringThe name of the unit of measure that is associated with this production order.
propertyValuesList<JSON Object>The property values of the production order.
billOfMaterialsList<JSON Object>The bill of materials associated with this production order.
nameStringThe name of the production order.
productIdString (ULID)The ULID of the material produce to be produced.
customerIdString (ULID)The ULID of the customer that ordered this production order.
locationIdString (ULID)The ULID of the location associated with this production order.
statusStringThe status of the production order. (e.g., IDLE, SCHEDULED, RUNNING, PAUSED, STOPPED, CLOSED, CANCELLED).
schedulePriorityStringThe schedule priority of the production order (e.g., LOW, NORMAL, HIGH, URGENT).
quantityDoubleThe total quantity to be produced in this production order.
quantityProducedDoubleThe quantity that has been already produced in this production order.
quantityScheduledDoubleThe quantity that has been scheduled to be produced in this production order.
startDateInstantThe date this production order started.
endDateInstantThe date this production order ended.
dueDateInstantThe date this production order is due.
unitOfMeasureIdString (ULID)The ULID of the unit of measure for this production order.
scheduleShiftIdString (ULID)The ULID of the shift the production order started in.
scheduleShiftNameStringThe name of the shift the production order started in.
idString (ULID)The ULID of the production order.
notesStringNotes related to the production order.
enabledBooleanIndicates if the production order is active and enabled.
spare1StringAdditional field for user-defined context.
spare2StringAdditional field for user-defined context.
spare3StringAdditional field for user-defined context.

Code Examples

# Retrieve a production order by ID or name
production_order = system.mes.productionOrder.getProductionOrder('Order001')

# Output the production order
print(production_order)