Inventory ATP Validator

Validates inventory availability using Available-to-Promise (ATP) data, including future delivery dates.

Overview

The Inventory ATP Validator checks product availability using Available-to-Promise (ATP) data, which accounts for projected future inventory changes. This validator is particularly useful when orders have a requested delivery date, as it can validate availability at that future point in time.

Identifier

PropertyValue
Connector IDinventoryAtpValidator
Validation TypeGeneral

Behavior

  1. If the cart's order type is PreOrder, validation is skipped (always passes)
  2. If the cart has no line items, returns a "Cart is empty" error
  3. Resolves the relevant warehouses:
    • Uses the warehouse from the first shipment's WarehouseCode or PickUpWarehouseCode if set
    • Falls back to the cart's store and its available warehouses
    • Falls back to all warehouses if no store is set
  4. Fetches product data and inventory data
  5. For each line item:
    • Skips virtual products and products in the "service" catalog
    • Calculates current availability: Quantity - ReservedQuantity + CalculatedQuantity
    • If a RequestedDeliveryDate is set on the cart, also calculates ATP availability by summing ATP entries with dates before the requested delivery date
    • If the requested quantity exceeds current availability, checks against ATP availability
    • Returns a validation error if both current and ATP availability are insufficient
  6. Returns one validation error per SKU that fails the check

Error messages

ConditionTranslation Key
Cart has no line itemsCartIsEmpty
Insufficient stock for SKUInventoryValidatorErrorMessage

Configuration

No additional properties required.

{
  "name": "inventoryAtpValidator",
  "implementations": ["IValidator"],
  "disableStandardErrorPolicy": false
}

On this page