pixiRemoveItemFromPicklist
Removes a given quantity of an item, identified by barcode, from a bin on a picklist and returns a status row.
Removes picklist positions for one item and one bin from a picklist.
Steps:
Quantitymust be at least 1.NULLor smaller values return an error.- The bin is looked up by its name (
BinName) inInvBin. - The item is looked up by its barcode (
EanUpc), using the item codes with code type 1 (barcode). - The call counts the picklist positions (
PLitemrows linked to an order line) on the picklist for this bin and item. Each position counts as one piece. - If no position is found, the call checks why and returns a specific error: the picklist does not exist, the picklist has no positions from this bin, or the item is not on the picklist in this bin.
- If fewer positions exist than
Quantity, an error is returned and nothing is deleted. - Otherwise,
Quantitypositions are removed, starting with the newest positions (highest position key, i.e. the bottom of the picklist). For the affected order lines the picklist reference (PickListNrUsed) is reset toNULL. All picking progress entries for this picklist, item and bin are deleted. After that, a cleanup of assigned boxes runs for picklists that are now empty. - A
SUCCESSrow reports how many positions were deleted.
Notes
- The deletion runs in its own transaction, or in a savepoint if a transaction is already open. If a database error occurs, the changes are rolled back and the error is written to the error log via
log.InsertError. The call still returnsSUCCESSin that case, with the message0 items deleted from picklist.Treat a count of 0 as a failure. - All picking progress entries (
PL_ItemPickingProgress) for the picklist, item and bin are deleted, not only the entries for the removed quantity. - The box cleanup is done by
dbo.pixi_RemoveAssignedBoxesFromEmptyPicklist. Its definition is not attached, so its exact effects are not documented here. - The lookups and counts use
NOLOCK. If several bins share the same name, or several items share the same barcode, it is not defined which one is used.
Tables used
| Parameter | Type | Default | Description |
|---|---|---|---|
PickListNr
Required
|
int | – |
Number (key) of the picklist ( Example: |
EanUpc
Required
|
varchar(50) string |
– |
Barcode (EAN/UPC) of the item. It is matched against the item codes with code type 1 (barcode). Example: |
BinName
Required
|
varchar(50) string |
– |
Name of the bin from which the item is picked. Example: |
Quantity
Required
|
int | – |
Number of picklist positions (pieces) to remove. Must be at least 1 and must not exceed the number of matching positions. Example: |
Result set 1 · Always; exactly one status row (error or success).
Status row with the result of the call.
| Column | Type | Description |
|---|---|---|
Status
|
varchar(10) string |
|
Message
|
varchar(max) string |
Error text, or on success the number of deleted positions, e.g. |
Response example
<SqlRowSet1>
<row>
<Status>SUCCESS</Status>
<Message>2 items deleted from picklist.</Message>
</row>
</SqlRowSet1>
| Status | Message | Cause |
|---|---|---|
| ERROR | Wrong quantity "{Quantity}". | `Quantity` is `NULL` or less than 1. Pass a positive quantity. |
| ERROR | Bin "{BinName}" does not exists. | No bin with the given name exists. Check `BinName`. |
| ERROR | Item with barcode "{EanUpc}" does not exists. | No item has the given barcode (code type 1). Check `EanUpc`. |
| ERROR | Picklist {PickListNr} does not exists. | No matching positions were found and the picklist itself does not exist. Check `PickListNr`. |
| ERROR | There are no items on picklist {PickListNr} from bin "{BinName}". | The picklist exists but has no positions from the given bin. |
| ERROR | No items found on picklist {PickListNr} with barcode "{EanUpc}" from bin "{BinName}". | The picklist has positions from the bin, but none for the item with this barcode. |
| ERROR | There is only {Count} items on picklist {PickListNr} in the bin "{BinName}". | `Quantity` is greater than the number of matching positions. Nothing is deleted; pass at most the reported count. |
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:pixiRemoveItemFromPicklist>
<PickListNr>12345</PickListNr>
<EanUpc>4006381333931</EanUpc>
<BinName>A-01-02-03</BinName>
<Quantity>1</Quantity>
</ns1:pixiRemoveItemFromPicklist>
</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:pixiRemoveItemFromPicklist>
<PickListNr>12345</PickListNr>
<EanUpc>4006381333931</EanUpc>
<BinName>A-01-02-03</BinName>
<Quantity>1</Quantity>
</ns1:pixiRemoveItemFromPicklist>
</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 = [
'PickListNr' => '12345',
'EanUpc' => '4006381333931',
'BinName' => 'A-01-02-03',
'Quantity' => '1',
];
$soapArguments = [];
foreach ($arguments as $name => $value) {
$soapArguments[] = new SoapVar($value, XSD_STRING, '', '', $name);
}
$response = $soapClient->__soapCall('pixiRemoveItemFromPicklist', $soapArguments);
- SQL object:
- dbo.pipiRemoveItemFromPicklist