Inventory Transactions Clean Up

For instances that create many orders in a short time frame or at a constant high rate, checkout is substantially slowed by retention of this data. Load tests show a direct dependency between the number of existing transactions and the number of orders that can be created per second. This is even more severe for flash sales where transactions are booked against only one or very 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 in a case of an exception.

A quota checks for violations of this value. The quota: The maximum hours re-allocation 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.

Note: Salesforce B2C Commerce doesn't enforce this quota because some customers might need to set an older allocation reset date.

We recommend that if your site doesn't violate this quote, you ask Commerce Cloud Support to enforce it for you. This enables you to take advantage of the inventory transactions cleanup capability.