Broadleaf Microservices
  • v1.0.0-latest-prod

Inventory Release Notes for 1.7.13-GA

Requirements

  • JDK 11 is required for Broadleaf release trains 1.7.0-GA, and beyond.

  • JDK 17 is supported for Broadleaf release trains 1.8.1-GA, and beyond.

Notable Changes

  • Introduced the concept of Serialized Inventory

    • Added support for checking available serialized inventory

    • Added support for making soft & hard reservations against serialized inventory

    • Added support for releasing expired soft reservations when serialized inventory is used

    • Added validation to ensure that serialized inventory’s quantity fields can only be 0 or 1

    • Removed all indices except for location_id as it was impacting performance, a new index was created instead with these columns: sku_code, serialized, serialization_value

      • IMPORTANT: if you use a different SKU reference other than the SKU code to manage SKU inventories, e.g. external id or UPC, then a new index should be created with the SKU reference column to make sure performance is not impacted, and the out-of-box index can be removed

      • Liquibase scripts to remove these indices are included with this version, but they’re not configured to run automatically. To execute these scripts, you’ll want to add the following include statement in your relevant *-changelog-master.xml file: <include file="db/changelog/inventory.postgresql.drop.changelog-1.7.13.xml" />

  • Updated the usages of SkuInventory#quantityAvailable to be calculated via a method rather than manually set

    • Updated metadata of quantityAvailable to be read-only as it would be calculated upon create, update, and replace

    • The calculation formula is the same as previously enforced via validation, except now safety stock can cause the result of quantityAvailable to be negative (see next point), so quantityAvailable would be set to 0 in that case

    • Loosened restriction around safety stock

      • Previously, quantityAvailable must be equal to quantityOnHand - quantityReserved - safetyStock, which implies that safety stock must correlate to the values of quantityOnHand and quantityReserved. However, safety stock should represent the desired amount of the item that is not for sale, therefore it could be any value, even greater than the actual quantity on hand

  • Introduced an endpoint to release soft inventory reservations after removing an item from cart

  • Added support to check for existing reservations when checking inventory availability for the same item and user.

    • Added a field for a reference number for a previous reservation, and an attributes map for extensibility to SkuInventoryAvailabilityRequest

Note
For example, if a SKU has total of 2 available and 1 is reserved for userA, and userA checks inventory availability for a quantity of 2 for the same SKU. The existing soft reservation is excluded from the check in this case, effectively making this request to check for an additional quantity of 1 to be available. However, if userB sends the same request to check availability for a quantity of 2 for the same SKU, it would return unavailable since only 1 is available as the other one is reserved for userA.

Upgrade Guide

New Endpoints

Path Description

POST /shop-sku-inventory/release-reservation

Releases the inventory soft reservations based on the given request