API invoked during point of sale integration
The API invoked during the integration of the Sterling™ Store Inventory Management with Point Of Sale Systems is adjustLocationInventory().
This API adjusts location inventory. In point of sale systems, it is typically called with an inventory reason code associated with an adjustment sequence, without a Location ID. It can also be called with both the Location ID and the inventory reason code associated with an adjustment sequence. The transaction does not go through if the Location ID is not passed and the inventory reason code passed does not have an adjustment sequence associated with it.
If the adjustLocationInventory API is called with an inventory reason code associated with an adjustment sequence and the Location ID is not passed:
- Inventory is deducted consecutively from the locations or zones specified in the adjustment sequence.
- Within a zone, inventory is deducted according to the pick sequence of the locations in the zone. For locations having the same pick sequence number, inventory is deducted in the alphabetical order of the Location ID.
- Inventory in non-virtual locations is deducted only to the extent of the available quantity of loose SKU (inventory in LPN is not considered). Available inventory is deducted consecutively from the configured locations until a virtual location, if configured in the adjustment sequence, is reached. The balance of the demanded quantity is then adjusted from this virtual location. If any other locations have been configured in the adjustment sequence after the virtual location, they are ignored.
- The transaction does not go through if there is insufficient inventory in the locations or zones specified in the adjustment sequence and a virtual location has not been configured in the adjustment sequence.
When the adjustLocationInventory API is called with a Location ID and an inventory reason code associated with an adjustment sequence, the inventory is adjusted in the specified location and the adjustment sequence is ignored. The transaction does not go through if there is insufficient inventory at the specified location.
When the adjustLocationInventory API is called for serialized items, the location sequence associated with an inventory reason code is always ignored.
- If the adjustLocationInventory API is called with a Location ID, inventory is deducted from that location. The transaction does not go through if the serial number is not found in the specified location.
- If the adjustLocationInventory API is called without a Location ID, inventory is deducted from any location where the serial number is found. The transaction does not go through if the specified serial number is not found in any location of the node.