Skip to main content

system.mes.inventory.move

Moves inventory from the MES based on the provided parameters.

Syntax

system.mes.inventory.move(**move_request)

Parameters

ParameterTypeNullableDescription
typeStringTrueThe type of request defined by the LotRecordType Enum. It is internally set and must not be modified, as changes may break functionality.
quantityDoubleFalseThe quantity to move from the location.
unitOfMeasureSymbolStringTrueThe symbol of the unit of measure for the quantity.
lotIdOrNameStringTrueThe ID or name of the inventory lot to move.
materialIdOrPathStringFalseThe ID or path of the material being moved.
sourceLocationIdOrPathStringFalseThe ID or path of the location from which inventory will be moved.
destinationLocationIdOrPathStringFalseThe ID or path of the location the moved inventory goes to.
operationIdString (ULID)TrueThe ID of the operation moving this inventory.
inventoryOperationIdString (ULID)TrueThe ID of the inventory operation related to this move action.
productionOrderIdOrNameStringTrueThe ID or name of the production order associated with the move.
materialReasonCodeIdString (ULID)TrueThe ID of the material reason code to add additional context.
startDateInstantFalseThe start date and time of the move. Default value is Current Instant.
endDateInstantTrueThe end date and time of the move.
ongoingBooleanFalseIndicates whether this request is ongoing. Default value is false.
destinationInventoryNameStringTrueThe name of the inventory the moved inventory goes to.
notesStringTrueNotes related to the move request.
spare1StringTrueAdditional field for user-defined context.
spare2StringTrueAdditional field for user-defined context.
spare3StringTrueAdditional field for user-defined context.

Returns

Returns a JSON representation of an inventory lot record for a Move Request.

Code Examples

# Generate the object structure for a new move request object with no initial arguments
new_request = system.mes.inventory.newMoveRequest()

# Set basic attributes for the new move request
new_request['materialIdOrPath'] = 'Bottle/Milk'
new_request['sourceLocationIdOrPath'] = 'DairyFarm'
new_request['destinationLocationIdOrPath'] = 'DairyCo'
new_request['quantity'] = 610
# (You can continue setting other properties as needed here)

# Move the request
moved_request = system.mes.inventory.move(**new_request)

# Output the JSON representation of the moved request
print(moved_request)