POST scheduler/v1/plan/order/helper

The order helper path is used to update existing orders or to create orders from scratch, supplying everything needed to build the order.

Request body format

application/json

Sample outline json body

{
    "order": {
        "name": "string",
        "quantity": 1,
        ...
    },
    "routeHelper": {
        "route": {
            "name": "string",
            ...
        },
        "operations": [
            {
                "name": "string",
                "opNum": 10,
                "properties": "",
                "selectedResourceId": "string",
                "workload": 10,
                ...
            }
        ],
        "dependencies": [
            {
                "bindingRules": [
                    "FS"
                ],
                "opNum": "10",
                "prevOpNums": []
            }
        ],
        "transactionHelpers": [
            {
                "opNum": "10",
                "transactions": [
                    {
                        "transactionType": 1,
                        "accessMethod": 200,
                        "rawMaterialId": "string",
                        "quantityStrategy": 300,
                        "quantity": 32,
                        ...
                    }
                ]
            }
        ]
    },
    "schedulingSettings": {
       "strategyName": "ForwardFromNow",
       "externalDependencies": "Ignore",
       "allowMoveToDifferentResource": true,
       ...
    }
}

URI Parameters

None

Body parameters

OrderHelper

Name Type Required Description
order EProductionOrderValue true The EProductionOrderValue describing the order to create/update. In case of an update, an id must be present. For a complete list of parameter names, please check the POST /scheduler/v1/plan/order in the API Explorer
routeHelper RouteHelper false A RouteHelper object describing the route
schedulingSettings SchedulingSettings false The scheduling settings used in case a scheduling is needed

SchedulingSettings
Most of the parameters of the SchedulingSettings object are basic types and the complete list can be found at POST /scheduler/v1/plan/order/helper in the API Explorer.
However some of the parameters are more complex, these are described below:

Name Type Required Possible values Description
strategyName String, values defined by StrategyName enum true ForwardFromMaterialDate, ForwardFromNow, ForwardFromCustomDate, ForwardFromLastOperation, BackwardFromCustomDate, BackwardFromDueDate The name of the scheduling strategy
externalDependencies String, values defined by ExternalDependencies enum true Ignore, Respect, ScheduleDirectDependencies, ScheduleCompleteNetwork The parameter defines how external dependencies should be handled.

RouteHelper

Name Type Required Description
route EOperationSequenceValue false The EOperationSequenceValue describing the route to create/update. In case of an update, an id must be present. For a complete list of parameter names, please check the POST /scheduler/v1/plan/route in the API Explorer
operations List of EOperationValue false A list of EOperationValue objects that describe the individual operations in the route. For a complete list of parameter names, please check the POST /scheduler/v1/plan/operation in the API Explorer
dependencies List of RouteDependencyHelperRest false A list of RouteDependencyHelperRest objects that describe the dependencies between the operations in the route. Note: if dependencies is not supplied in the body, then operations will automatically be linked together by a FS constraint (Finish-to-Start) in the order they are listed in the operations part of the body.
transactionHelpers List of MaterialTransactionHelperRest false A list of MaterialTransactionHelperRest objects that describe the transactions (BOM-lines) of the operations

RouteDependencyHelperRest

Note: All operations involved in a dependency need to have an entry in this list i.e. if you want opNum=10 to connect with opNum=20, you need a RouteDependencyHelperRest object for both.

Name Type Required Description
opNum String true The opNum of the operation the dependency applies for
prevOpNums List of String false A list of opNums representing the operations that this operation depends upon
bindingRules List of String values defined by BindingRule false A list of BindingRule objects defining how the different operations anchor to each other. The list of possible values and their description can be found under Importing master routes

MaterialTransactionHelperRest

Name Type Required Description
opNum String true The opNum of the operation the material transactions apply for
transactions List of ERawMaterialTransactionValue false A list of ERawMaterialTransactionValue objects that describe the material transaction (BOM-lines) for the operation. For a complete list of parameter names, please check the POST /scheduler/v1/plan/transaction in the API Explorer

Examples

Basic order creation

The below body will create an order using the supplied order data, route, and operations (note that additional operations may be specified with the square brackets [ ] using standard JSON array notation. In this example order id and name is not specified, so ROB-EX will automatically assign the next id and name to the order). After creation, the order is scheduled using the supplied scheduling settings.

{
  "order": {
    "quantity": 20.0,
    "deliveryCalendar": "2015-1-1T23:00",
    "materialCalendar": "2015-1-1T23:00",
    "customer": "customerName",
    "description": "description text",
    "priority": 8,
    "customText1": "custom text 1",
    "customText2": "custom text 2",
    "customText3": "custom text 3",
    "customText4": "custom text 4",
    "state": 20
  },

  "routeHelper": {
    "route": {
      "name": "TestRoute"
    },
    "operations": [
      {
        "name": "TestOpr",
        "selectedResourceId": "R8",
        "workload": 20.0
      }
    ]
  },

  "schedulingSettings": {
    "strategyName": "ForwardFromNow",
    "externalDependencies": "Ignore"
  }
}

Complex order creation
Below is a more complex example with BOM and dependencies defined.

{
    "order": {
        "name": "Test",
        "quantity": 10,
        "state": 20
    },
    "routeHelper": {
        "route": {
            "name": "Test route"
        },
        "operations": [
            {
                "id": "opr1",
                "name": "operation 1",
                "opNum": 10,
                "workload": 10,
                "selectedResourceId": "R50" 
            },
            {
                "id": "opr2",
                "name": "operation 2",
                "opNum": 20,
                "workload": 10,
                "selectedResourceId": "R51"
            }
        ],
        "dependencies": [
            {
                "bindingRules": [
                    "FS"
                ],
                "opNum": "10",
                "prevOpNums": []
            },
            {
                "bindingRules": [
                    "FS"
                ],
                "opNum": "20",
                "prevOpNums": ["10"]
            }
        ],
        "transactionHelpers": [
            {
                "opNum": "10",
                "transactions": [
                    {
                        "transactionType": 1,
                        "accessMethod": 200,
                        "rawMaterialId": "R8",
                        "quantityStrategy": 300,
                        "quantity": 32
                    }
                ]
            }
        ]
    },
    "schedulingSettings": {
        "strategyName": "ForwardFromNow",
        "allowMoveToDifferentResource": true,
        "externalDependencies": "Ignore"
    }
}

Add, remove, or update operations
The list of operations supplied in the routeHelper represents the complete list of operations for the order, this allows us to add, remove, or update operations.
In below example we need as little as the order id and the complete list of operations we want to have available after the update:

{
    "order": {
        "id": "R31"
    },
    "routeHelper": {
        "operations": [
            {
                "id": "opr1",
                "name": "operation 1",
                "opNum": 10,
                "workload": 10,
                "selectedResourceId": "R68" 
            },
            {
                "id": "opr2",
                "name": "operation 2",
                "opNum": 20,
                "workload": 20,
                "selectedResourceId": "R69" 
            }
        ],
        "dependencies": [
            {
                "bindingRules": [
                    "FS"
                ],
                "opNum": "10",
                "prevOpNums": []
            },
            {
                "bindingRules": [
                    "FS"
                ],
                "opNum": "20",
                "prevOpNums": ["10"]
            }
        ]
    }
}

Add, remove, or update transactions (BOM-lines)

Note requires 7.4.0.2832, 7.4.2.2831 (or newer). The list of transactions supplied in the MaterialTransactionHelperRest object represents the complete list of transactions for the operation, this allows us to add, remove, or update transactions.
In below example we need as little as the order id and the complete list of transactions we want to have available per operations after the update:
Note how the list of transactions for opNum 10 is empty. This will remove any transactions already present on the operation.

{
    "order": {
        "id": "R12"
    },
    "routeHelper": {
        "transactionHelpers": [
            {
                "opNum": "10",
                "transactions": []
            },
            {
                "opNum": "20",
                "transactions": [
                    {
                        "transactionType": 1,
                        "accessMethod": 200,
                        "rawMaterialId": "R8",
                        "quantityStrategy": 300,
                        "quantity": 50
                    }
                ]
            }
        ]
    }
}

Feedback

Was this helpful?

Yes No
You indicated this topic was not helpful to you ...
Could you please leave a comment telling us why? Thank you!
Thanks for your feedback.

Post your comment on this topic.

Post Comment