pixiPutIntoBox
Scans a single orderline into a box (scan-in with picklist), optionally splitting the orderline and validating batch number and best-before date.
Performs the scan-in of one orderline into a shipping box, as the Pixi shipping client does for scan-in with picklist. The call works on the exact orderline given in OrderlineKey.
Steps:
- Checks that the setting
Premium_APIis enabled. Otherwise an error row is returned. - Reads item and location of the orderline. If the setting
BatchManagementis1, it checks whether the item carries the batch number tag (TagId-6) or the best-before tag (TagId-7). Without either tag, batch management is treated as off for this item. - If batch management is off but
BatchNumberorBestBeforeDateis sent, the call fails withWrong Batch Management data. - If batch management is on, it counts the active picklist items (
PLitem,Expired = 0) of the orderline whose bin item has exactly the given batch number and best-before date. If there are none, the call fails. - If
PickListNris0but the orderline is on an active picklist, the call fails withItem is part of picklist: …. - Looks up the orderline through the scan-in search logic, restricted to this orderline and the given picklist. The orderline must be in a status that allows scan-in, must not belong to a locked customer or address (unless the user has the permission
SHILC), and with a picklist it must be on that picklist. If nothing is found:No order found!. - Determines the quantity to put into the box:
- the picklist quantity of the orderline, capped to the number of matching batch items when batch management is on;
- if
ScannedQtyis not0, it must not exceed that quantity and replaces it.
- If the orderline quantity is larger than this quantity, the orderline is split so that the scanned part keeps the determined quantity (
GOSBreakOrderline). - Calls the internal put-into-box logic (
Pixi_PutIntoBox). It uses the stock movement operationScanInWithPicklistof applicationShippingClient_Aand the log reasonAPI - ScanIn with picklist. The logic:- takes
FromBox/ToBoxfrom the picklist header if it defines a box range; - finds a box for the customer, or performs an internal transfer if the order location differs from the last order location;
- checks that the box does not contain items of another customer and that the order is not already in another open box;
- updates the orderline for scan-in and releases the picklist items from the bin;
- publishes the message queue event
ScanInPutIntoBox, andScanInBoxFullif the box is now full.
- takes
The result is one row with the box and an Action value. IN BOX LEGEN means success; other values describe why the item was not put into a box.
Notes
- Requires the setting
Premium_API. - All lookups use
NOLOCK. - The call has no transaction of its own. The orderline split in step 8 runs in its own transaction (with an application lock on the orderline) and is committed before the item is put into the box. If the put-into-box step then fails, the split remains.
- Without a picklist (
PickListNr = 0) the scan-in search returns a picklist quantity of0. AnyScannedQtyother than0is then rejected, and the split step is called with a new quantity of0. What the split does in that case depends onGOSBreakOrderline_Base, which is not attached. The call is designed for scan-in with picklist. - Any
SupplOrderNrother than0makes the internal orderline lookup fail, so the result isFEHLERwith0010. BESTELL. GEANDERT !. - If
SupplGroupis empty and the orderline status isSHL, the supplier group stored on the orderline (SupplGroupScanIn) is used instead. The value is passed on asvarchar(4). BestBeforeDateis passed on as 1900-01-01 when it is not sent. If the global settingBatchManagementis1and the picklist hasDaysBeforeBBDset, this date can lead toMHD nicht zulässig.- The setting
OnlyPicklistScanIn = 1without a picklist returns the actionKeine Pickliste. - Deadlocks (error 1205) inside the put-into-box step are retried up to 10 times. Other errors are caught, written to
LogTableand returned as an action row instead of a SQL error. - Several called objects are not attached:
Pixi_ShipToCustomer,Pixi_ShipIntern,GOSUpdateOrderlineForScanIn,Pixi_ReleasePLitemFromBin,GOSBreakOrderline_Base,pixi.FullBoxesGetandPixi_MQ_EventPublish. Their exact data changes, and whether they emit additional result sets or errors, cannot be seen. - For an internal transfer (order location differs from the last order location) no box key is determined, so the result shows
BoxNr= 0. - The text
MHD nicht zulässigappears with broken encoding in the source and may arrive asMHD nicht zulässig.
Tables used
| Parameter | Type | Default | Description |
|---|---|---|---|
OrderlineKey
Required
|
int | – |
Key of the orderline to scan into a box. Example: |
SupplGroup
Required
|
varchar(5) string |
– |
Supplier group stored with the scan-in. If it is empty and the orderline status is |
Username
Required
|
varchar(50) string |
– |
Pixi user who performs the scan-in. Used for permissions, logging and the orderline update. Example: |
SupplOrderNr
|
int | 0 |
Supplier order number. Must be Example: |
FromBox
Required
|
int | – |
Lowest box number to use. Replaced by the picklist's box range if the picklist header defines one. Example: |
ToBox
Required
|
int | – |
Highest box number to use. Replaced by the picklist's box range if the picklist header defines one. Example: |
SerialNr
Required
|
varchar(200) string |
– |
Serial number of the scanned item. |
PickListNr
|
int | 0 |
Picklist number ( Example: |
IsPersonalizedScanIn
|
bit boolean |
0 |
Marks a scan-in of a personalized item (tag -1). Must match the item's tag, otherwise an error action is returned. Allowed values
Example: |
BinRef
|
int | 0 |
Bin location key passed on when the picklist items are released from the bin. Example: |
BatchNumber
|
varchar(50) string |
NULL |
Batch number (Charge) of the scanned item. Only allowed if batch management is active for the item; must match a picklist item of the orderline. Example: |
BestBeforeDate
|
datetime dateTime |
NULL |
Best-before date of the scanned item. Only allowed if batch management is active for the item; must match a picklist item of the orderline. Example: |
ScannedQty
|
int | 0 |
Quantity scanned. Example: |
Result set 1 · If a validation fails before the put-into-box step (setting, batch data, picklist, orderline lookup, quantity).
Error status row. No data is changed in this case.
| Column | Type | Description |
|---|---|---|
Status
|
varchar(5) string |
Always |
StatusMessage
|
varchar string |
Error text. |
Result set 2 · If all validations pass (returned by the internal put-into-box logic).
One row describing the box and the outcome of the put-into-box step.
| Column | Type | Description |
|---|---|---|
BoxKey
Nullable |
int |
Key of the box; |
BoxNr
|
int |
Box number; |
BoxColor
Nullable |
varchar(7) string |
Color of the box; empty if no box was used. |
Action
|
varchar(200) string |
Outcome: |
DESCRIPTION
|
varchar(200) string |
Box description on success, otherwise the error or info text. |
PackageId
Nullable |
int |
Package ID of a draft invoice. Always |
Response example
<SqlRowSet1>
<row>
<Status>ERROR</Status>
<StatusMessage>Item is part of picklist: 4711</StatusMessage>
</row>
</SqlRowSet1>
| Status | Message | Cause |
|---|---|---|
| ERROR | Setting "Premium_API" is not enabled. | The setting `Premium_API` is not enabled. Enable it in Pixi. |
| ERROR | Wrong Batch Management data | `BatchNumber` or `BestBeforeDate` was sent, but batch management is off globally or the item has neither the batch number nor the best-before tag. Omit both values for such items. |
| ERROR | Item(s) with selected batch number and/or best before date not on stock. Please enter the correct values. | Batch management is active for the item, but no active picklist item of the orderline has the given batch number and best-before date. Send the values of the picked stock. |
| ERROR | Item is part of picklist: {PLIheaderRef} | `PickListNr` is `0`, but the orderline is on an active picklist. Pass that picklist number. |
| ERROR | No order found! | The scan-in search did not find the orderline: wrong status, not on the given picklist, locked customer/address, or location mismatch. |
| ERROR | ScannedQty is higher than quantity on picklist | `ScannedQty` exceeds the picklist quantity of the orderline (capped to matching batch items). Without a picklist the picklist quantity is `0`, so only `ScannedQty = 0` is accepted. |
| Keine Pickliste | Keine Pickliste | Setting `OnlyPicklistScanIn` is `1` and no picklist was given (returned in `Action`/`DESCRIPTION`). |
| MHD nicht zulässig | MHD nicht zulässig | The best-before date is earlier than today plus `DaysBeforeBBD` of the picklist. |
| FEHLER | 0014. No Order Found!! | The picklist contains no item for the article of the orderline. |
| FEHLER | 0012. FEHLER: PERSONALISIERTER ARTIKEL NICHT AKTIVIERT! | `IsPersonalizedScanIn = 1`, but the item (or its bundle) is not tagged as personalized. |
| FEHLER | 0013. FEHLER: PERSONALISIERTER ARTIKEL OHNE BESTELLREFERENZ! | The item is personalized, but `IsPersonalizedScanIn` is `0`. |
| FEHLER | 0010. BESTELL. GEANDERT ! | The orderline is no longer in a scan-in status, or `SupplOrderNr` is not `0`. |
| FEHLER | 0011. KEINE BOX GEFUNDEN! | No free box was found in the box range `FromBox`–`ToBox`. |
| FEHLER | Pixi_PutIntoBox problem check {boxes} orderlineKey={OrderlineKey} {Username} boxNr={BoxNr} | The chosen box contains items of another customer (`FB …`), or the order is already in another open box. |
| FEHLER | Der gescannte Artikel wurde bereits verarbeitet. | The item is already in the box items (duplicate key on `boxitems`). |
| Bitte wiederholen! | Mehrfache Auslagerung | Releasing the stock failed with error 57251 (multiple stock removal). Retry the scan. |
| FEHLER ... Exc. | {Info} | An unexpected SQL error occurred in the put-into-box step; details are written to `LogTable`. |
POST https://apigateway.descartes.com/tms/pixi/
Content-Type: text/xml; charset=utf-8
Authorization: Basic BASE64(USERNAME:PASSWORD)
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="https://apigateway.descartes.com/tms/pixi/">
<SOAP-ENV:Body>
<ns1:pixiPutIntoBox>
<OrderlineKey>123456</OrderlineKey>
<SupplGroup>?</SupplGroup>
<Username>api_user</Username>
<!-- <SupplOrderNr>0</SupplOrderNr> -->
<FromBox>1</FromBox>
<ToBox>200</ToBox>
<SerialNr>?</SerialNr>
<!-- <PickListNr>4711</PickListNr> -->
<!-- <IsPersonalizedScanIn>0</IsPersonalizedScanIn> -->
<!-- <BinRef>0</BinRef> -->
<!-- <BatchNumber>CH-2024-001</BatchNumber> -->
<!-- <BestBeforeDate>2025-12-31T00:00:00</BestBeforeDate> -->
<!-- <ScannedQty>2</ScannedQty> -->
</ns1:pixiPutIntoBox>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
curl -X POST 'https://apigateway.descartes.com/tms/pixi/' \
--user 'USERNAME:PASSWORD' \
--header 'Content-Type: text/xml; charset=utf-8' \
--data-binary @- <<'XML'
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="https://apigateway.descartes.com/tms/pixi/">
<SOAP-ENV:Body>
<ns1:pixiPutIntoBox>
<OrderlineKey>123456</OrderlineKey>
<SupplGroup>?</SupplGroup>
<Username>api_user</Username>
<!-- <SupplOrderNr>0</SupplOrderNr> -->
<FromBox>1</FromBox>
<ToBox>200</ToBox>
<SerialNr>?</SerialNr>
<!-- <PickListNr>4711</PickListNr> -->
<!-- <IsPersonalizedScanIn>0</IsPersonalizedScanIn> -->
<!-- <BinRef>0</BinRef> -->
<!-- <BatchNumber>CH-2024-001</BatchNumber> -->
<!-- <BestBeforeDate>2025-12-31T00:00:00</BestBeforeDate> -->
<!-- <ScannedQty>2</ScannedQty> -->
</ns1:pixiPutIntoBox>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
XML
<?php
$soapClient = new SoapClient(null, [
'login' => 'USERNAME',
'password' => 'PASSWORD',
'location' => 'https://apigateway.descartes.com/tms/pixi/',
'uri' => 'https://apigateway.descartes.com/tms/pixi/',
]);
$arguments = [
'OrderlineKey' => '123456',
'SupplGroup' => '?',
'Username' => 'api_user',
// 'SupplOrderNr' => '0',
'FromBox' => '1',
'ToBox' => '200',
'SerialNr' => '?',
// 'PickListNr' => '4711',
// 'IsPersonalizedScanIn' => '0',
// 'BinRef' => '0',
// 'BatchNumber' => 'CH-2024-001',
// 'BestBeforeDate' => '2025-12-31T00:00:00',
// 'ScannedQty' => '2',
];
$soapArguments = [];
foreach ($arguments as $name => $value) {
$soapArguments[] = new SoapVar($value, XSD_STRING, '', '', $name);
}
$response = $soapClient->__soapCall('pixiPutIntoBox', $soapArguments);
- SQL object:
- dbo.pipiPutIntoBox