Reservations
Soft, Hard, Picked and Packed claims that move without growing, and order-change messages that must not become duplicate claims.
Request with "decision": "reserve" and one of these operations: add_soft, release, pick, short_close, cancel.
Clauses applied
reserve.line: For each order line, OrderedQty = CancelledQty + ShippedQty + UnreservedQty + active Soft/Hard/Picked/Packed.reserve.upstream: Upstream changes do not overwrite claimed scope.reserve.release: Wave release records Soft −q / Hard +q, so total claims do not grow.reserve.atp: For each exact unowned eligible position, ATP is QuantityOnHand minus positive Soft and Hard balances.reserve.owned: Owned picked/packed stock is never ATP for another order.reserve.pick: Pick records source stock −q / owned tote stock +q and Hard −q / Picked +q.reserve.short: A short pick posts actual picked quantity, releases the residual source claim and excludes suspect stock before a replacement reservation; it cannot both retain and recreate the same demand.reserve.cancel: Released work is cancelled only after all active tasks, owned stock, reservation balances and uncertain carrier operations reconcile.
Evidence questions
order_change_kind@1
This message about an existing order arrived after the order was received. What does it ask the warehouse to do with the order's quantities?
| Answer | Meaning |
|---|---|
additional_units | Ship more units on top of what the order already holds: a new line, or more of an item in addition to the ordered quantity. |
revised_quantity | Change an existing line to a new total quantity, up or down. |
cancellation | Cancel the order or part of it. |
restatement | Nothing new: it repeats, confirms, resends or asks about the order as it stands. |
Examples
Customer revises a line, agent reserves the new total
{
"decision": "reserve",
"proposal": {
"operation": "add_soft",
"qty": "30"
},
"line": {
"id": "OL-4471-2",
"sku": "YB-CORK-2",
"ordered": "25",
"cancelled": "0",
"shipped": "0",
"unreserved": "0",
"soft": "25",
"hard": "0",
"picked": "0",
"packed": "0"
},
"position": {
"on_hand": "180",
"soft": "40",
"hard": "20",
"eligible": true
},
"message": {
"text": "Hi team, on PO 4471 can you make the cork blocks 30 instead of 25? Thanks, Maya",
"source": "email"
},
"order_lines": [
{
"line": "1",
"sku": "YS-6-TL",
"description": "Yoga strap 6ft teal",
"ordered": "40"
},
{
"line": "2",
"sku": "YB-CORK-2",
"description": "Yoga block cork 2in",
"ordered": "25"
}
]
}Response from the rules with no model loaded, so every question abstains.
{
"verdict": "review",
"next": {
"action": "classify_message",
"text": "The message could not be read with certainty as new demand, a revision, a cancellation or a repeat, so it changes no claim until someone decides.",
"role": "Warehouse Manager"
},
"questions": [
{
"ask": "message",
"question": "order_change_kind@1",
"status": "model_unavailable",
"evidence": [
"/message/text"
]
}
]
}Wave release moves Soft to Hard
{
"decision": "reserve",
"proposal": {
"operation": "release",
"qty": "20"
},
"line": {
"id": "OL-9012-1",
"ordered": "70",
"cancelled": "0",
"shipped": "0",
"unreserved": "0",
"soft": "30",
"hard": "40",
"picked": "0",
"packed": "0"
},
"position": {
"on_hand": "100",
"soft": "30",
"hard": "40",
"eligible": true
}
}Response from the rules with no model loaded, so every question abstains.
{
"verdict": "allow",
"next": {
"action": "proceed",
"text": "Release moves 20 from Soft to Hard; total claims stay the same."
},
"questions": []
}
Request schema
{
"type": "object",
"required": [
"decision",
"proposal",
"line"
],
"additionalProperties": false,
"properties": {
"decision": {
"const": "reserve"
},
"proposal": {
"type": "object",
"required": [
"operation",
"qty"
],
"additionalProperties": false,
"properties": {
"operation": {
"type": "string",
"enum": [
"add_soft",
"release",
"pick",
"short_close",
"cancel"
]
},
"qty": {
"type": "string",
"format": "decimal"
}
}
},
"line": {
"type": "object",
"required": [
"id",
"ordered",
"cancelled",
"shipped",
"unreserved",
"soft",
"hard",
"picked",
"packed"
],
"additionalProperties": false,
"properties": {
"id": {
"type": "string",
"minLength": 1,
"maxLength": 200
},
"sku": {
"type": "string",
"minLength": 1,
"maxLength": 200
},
"ordered": {
"type": "string",
"format": "decimal"
},
"cancelled": {
"type": "string",
"format": "decimal"
},
"shipped": {
"type": "string",
"format": "decimal"
},
"unreserved": {
"type": "string",
"format": "decimal"
},
"soft": {
"type": "string",
"format": "decimal"
},
"hard": {
"type": "string",
"format": "decimal"
},
"picked": {
"type": "string",
"format": "decimal"
},
"packed": {
"type": "string",
"format": "decimal"
}
}
},
"position": {
"type": "object",
"required": [
"on_hand",
"soft",
"hard",
"eligible"
],
"additionalProperties": false,
"properties": {
"id": {
"type": "string",
"minLength": 1,
"maxLength": 200
},
"on_hand": {
"type": "string",
"format": "decimal"
},
"soft": {
"type": "string",
"format": "decimal"
},
"hard": {
"type": "string",
"format": "decimal"
},
"eligible": {
"type": "boolean"
}
}
},
"message": {
"type": "object",
"required": [
"text"
],
"additionalProperties": false,
"properties": {
"text": {
"type": "string",
"minLength": 1,
"maxLength": 4000
},
"received_at": {
"type": "string",
"format": "date-time"
},
"source": {
"type": "string",
"enum": [
"email",
"edi",
"portal",
"phone",
"other"
]
}
}
},
"order_lines": {
"type": "array",
"items": {
"type": "object",
"required": [
"sku",
"ordered"
],
"additionalProperties": false,
"properties": {
"line": {
"type": "string",
"minLength": 1,
"maxLength": 200
},
"sku": {
"type": "string",
"minLength": 1,
"maxLength": 200
},
"description": {
"type": "string",
"minLength": 1,
"maxLength": 4000
},
"ordered": {
"type": "string",
"format": "decimal"
}
}
},
"maxItems": 200
}
}
}