1. A system for automatically determining substitution chains that are valid during a rules-based ATP check for an order item, the system comprising: an interface for interfacing with a plurality of data storage devices in at least one of which a plurality of stock items are stored as data; an execution memory storing software; a buffer for temporarily storing the data; and a processor coupled to the interface and the execution memory, the processor executing the software to carry out an availability check in which a replacement chain describing replacements is stored in the buffer, wherein the replacement chain is determined by one or more rules defining substitutions.