Postman collection
Shipping Write

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:

  1. Checks that the setting Premium_API is enabled. Otherwise an error row is returned.
  2. Reads item and location of the orderline. If the setting BatchManagement is 1, 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.
  3. If batch management is off but BatchNumber or BestBeforeDate is sent, the call fails with Wrong Batch Management data.
  4. 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.
  5. If PickListNr is 0 but the orderline is on an active picklist, the call fails with Item is part of picklist: ….
  6. 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!.
  7. 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 ScannedQty is not 0, it must not exceed that quantity and replaces it.
  8. If the orderline quantity is larger than this quantity, the orderline is split so that the scanned part keeps the determined quantity (GOSBreakOrderline).
  9. Calls the internal put-into-box logic (Pixi_PutIntoBox). It uses the stock movement operation ScanInWithPicklist of application ShippingClient_A and the log reason API - ScanIn with picklist. The logic:
    • takes FromBox/ToBox from 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, and ScanInBoxFull if the box is now full.

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 of 0. Any ScannedQty other than 0 is then rejected, and the split step is called with a new quantity of 0. What the split does in that case depends on GOSBreakOrderline_Base, which is not attached. The call is designed for scan-in with picklist.
  • Any SupplOrderNr other than 0 makes the internal orderline lookup fail, so the result is FEHLER with 0010. BESTELL. GEANDERT !.
  • If SupplGroup is empty and the orderline status is SHL, the supplier group stored on the orderline (SupplGroupScanIn) is used instead. The value is passed on as varchar(4).
  • BestBeforeDate is passed on as 1900-01-01 when it is not sent. If the global setting BatchManagement is 1 and the picklist has DaysBeforeBBD set, this date can lead to MHD nicht zulässig.
  • The setting OnlyPicklistScanIn = 1 without a picklist returns the action Keine Pickliste.
  • Deadlocks (error 1205) inside the put-into-box step are retried up to 10 times. Other errors are caught, written to LogTable and 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.FullBoxesGet and Pixi_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ässig appears with broken encoding in the source and may arrive as MHD nicht zulässig.

Tables used

Settings · Read Orderlines · Read PLitem · Read InvBinItem · Read TagMatch · Read StockMovementTypes · Read StockMovementMatching · Read StockMovementOperations · Read PLHeader · Read OrderStates · Read Customers · Read Addresses · Read Shops · Read Payments · Read boxes · Read boxitems · Read items · Read InvBin · Read BundleItems · Read LogTable · Write
SQL object:
dbo.pipiPutIntoBox
Updated at 2026-10-30