Postman collection
Items Read

pixiGetResolvedItemDependencies

Resolves a list of items into the actual stock items: non-bundle items are returned as they are, bundles are replaced by their components with multiplied quantities.

Takes a list of items with quantities as XML and returns the items that the request actually depends on, for example to check or reserve stock for an order.

Steps:

  1. The XML in ItemXML is parsed from /Items/Item. Each Item can identify the article by ItemKey, by ItemNrInt or by both, and carries a Qty.
  2. Missing identifiers are completed from the Items table: if ItemKey is missing it is looked up by ItemNrInt; if ItemNrInt is missing it is looked up by ItemKey.
  3. Entries whose ItemKey cannot be determined (unknown item number) are silently discarded.
  4. Resolution:
    • Items with IsBundle = 0 are returned with the requested Qty.
    • Items with IsBundle = 1 are not returned themselves. Instead every component from BundleItems is returned with quantity Qty × component quantity.
  5. The result is grouped by ItemKey: quantities of the same item (listed several times or contained in several bundles) are summed up.

If ItemXML is not passed, an empty result set is returned. No sort order is defined.

Notes

  • Read-only; all reads on Items and BundleItems use NOLOCK, so uncommitted data may be returned.
  • Bundles are resolved only one level deep. A component that is itself a bundle is returned as it is and is not expanded further.
  • If both ItemKey and ItemNrInt are given, ItemKey is used and ItemNrInt is not checked against it.
  • Unknown items are dropped without any error message; compare the result with the request if this matters.
  • If Qty is omitted for an entry, its quantity is NULL and does not contribute to the summed Qty (the sum becomes NULL if all contributions are NULL).
  • Invalid XML causes an SQL error from sp_xml_preparedocument, returned as SqlMessage.
  • The data type of the returned Qty depends on the type of BundleItems.Qty, which is not visible in the code.

Tables used

Items · Read BundleItems · Read
SQL object:
dbo.pipiGetResolvedItemDependencies
Updated at 2026-10-30