Pre-allocate boxes to a customer
create_preallocationChanges data: sets boxes of one packing line aside for a customer, as the person who connected this app, and records it in the organization's audit log. Use it only when the user asks to pre-allocate, reserve or set aside boxes, and say what you are about to allocate (line, boxes, customer, price) before calling it. Get the packing_line_id and its available_boxes from list_preallocations first: a line cannot be allocated beyond its box count. Each call makes a new pre-allocation, so do not repeat a call that succeeded; to change one use update_preallocation. Answers with the pre-allocation and its id.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"packing_line_id": "<packing_line_id>",
"boxes": "<boxes>"
},
"name": "create_preallocation"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| boxes | Yes | How many boxes to set aside. | |
| currency | No | ISO 4217 code such as "EUR". Required with unit_price. | |
| allocatee | No | The customer the boxes are for, such as "Acme BV". Reuse the spelling list_preallocations shows. | |
| unit_price | No | The tentative price, per box unless price_basis is "total". A number, or a string such as "12.50". | |
| price_basis | No | "box" (default) when unit_price is per box, "total" when it is the total for these boxes. | box |
| packing_line_id | Yes | A packing line id such as "pln_5521", as returned by list_preallocations. |