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
| Property | Value |
|---|---|
| Connector ID | inventoryAtpValidator |
| Validation Type | General |
Behavior
- If the cart's order type is
PreOrder, validation is skipped (always passes) - If the cart has no line items, returns a "Cart is empty" error
- Resolves the relevant warehouses:
- Uses the warehouse from the first shipment's
WarehouseCodeorPickUpWarehouseCodeif set - Falls back to the cart's store and its available warehouses
- Falls back to all warehouses if no store is set
- Uses the warehouse from the first shipment's
- Fetches product data and inventory data
- For each line item:
- Skips virtual products and products in the "service" catalog
- Calculates current availability:
Quantity - ReservedQuantity + CalculatedQuantity - If a
RequestedDeliveryDateis 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
- Returns one validation error per SKU that fails the check
Error messages
| Condition | Translation Key |
|---|---|
| Cart has no line items | CartIsEmpty |
| Insufficient stock for SKU | InventoryValidatorErrorMessage |
Configuration
No additional properties required.
