Inventory Transactions Clean Up
For instances that create many orders in a short time frame or at a constant high rate, retention of this inventory data slows checkout.
Load tests show a direct dependency between the number of existing transactions and the number of orders that can be created per second. The dependency is even more severe for flash sales where transactions are booked against only one or few distinct inventory records.
The CleanupInventoryTransaction job, introduced in Release 17.1, runs hourly to delete zero amount inventory transactions and inventory transactions with zero sum corresponding to the same order.
You are not permitted to update inventory allocation by setting the allocation reset date to older than it was. However, a feature switch enables you to suppress this restriction in a case of an exception.
A quota checks
for violations of this value. The quota: The maximum hours
reallocation date can be set in the past
(
id="object.ProductInventoryRecordPO.maxReallocationTimeInPast" )
is set to 48 hours. The quota is violated if the inventory allocation
reset date is set to a date earlier than 48 hours in the past.
We recommend that if your site doesn't violate this quote, you ask Commerce Cloud Support to enforce it for you. Enforcement enables you to take advantage of the inventory transactions cleanup capability.
- When the quota is enforced, the CleanupInventoryTransaction job cleans up all final inventory transactions older than the corresponding allocation reset date and older than 48 hours.
- When the quota isn't enforced, the CleanupInventoryTransaction job cleans up all final inventory transactions older than the corresponding allocation reset date and older than 7 days.