Broadleaf Microservices
  • v1.0.0-latest-prod

Inventory Availability Validation Workflow Activity

Workflow activity responsible for creating "soft" inventory reservations for cart items. If reservation fails because of insufficient inventory quantity, then a CheckoutWorkflowActivityException is thrown with failureType FAILED_INVENTORY_CHECK, which is then handled by CheckoutWorkflowActivity and can be referenced by the checkout initiator in the CheckoutResponse.

By default, this relies on InventoryProvider to make the requests.

Note

When requesting a soft reservation for serialized inventory, make sure to provide the sku reference in the following format: MY_SKU?serializationValue=1234567890.

When adding to cart, the serialization value should be declared using a cart item attribute choice named "inventorySerializationValue". When this is done, the serialization value automatically gets appended to the cart item’s SKU as part of the inventory check & reservation requests.