Most of the service centers operating in the repair and maintenance of machines and mechanisms apply warehouse management systems based on event prediction, which ensures inventory replenishment based on the initial diagnosis of the units. Such methodology is enforced measure, since the components and assemblies, even from the same manufacturer, having similar functions, design and connecting components have their own engineering numbers and part numbers for ordering. Unfortunately, this method is relevant only with perfect logistics and minimal time factor. If these criteria cannot be fulfilled, the maintenance and repair time increases, especially at a distance from logistic centers. By reducing lost sales and quick customer satisfaction, own warehouse stocks based on statistical data increases. Unfortunately, none of the modern methods gives a 100% result and eventually leads to overstocking and formation of deadstock. On the other hands more and more components are made from composite materials, complex alloys, permanent joints are being used. But due to ineffective management the significant part of expensive components is became needless. The aim of this research is to develop an algorithm allowing to optimise the logistics chain and reduce the inventory and deadstock, reduce disposal of used and obsolete units and assemblies, resulting in significantly lower consumption of natural resources, energy and reduced negative impact of waste on the environment. Our research shows that in various fields of science there are being developed methodologies, which would solve the described tasks by combining those methodologies in a single algorithm.