The contemporary consumer market determines the use of mass customisation by manufacturers. Therefore, from the point of view of Industry 4.0 (I4.0), concept data and communications and analytics are relevant to the implementation of the mass-customisation strategy. The problem involves at least three subjects: how to connect the currently available information system within an enterprise with new I4.0 technologies, how new information solutions can support the verification of the feasibility of tailoring an order to the needs of the customer, and, finally, how to model a knowledge base for a cyber-physical system containing a formal record of the knowledge acquired regarding customer preferences. Therefore, in this paper, we developed a new algorithm that will enable, on one hand, the collection and recording of customer preferences, and, on the other hand, the integration of those data and information that are available within the Enterprise Resource Planning (ERP) system. The main contribution of this work is the use of specialist knowledge and data from ERP regarding production capabilities implemented in a manufacturing enterprise in order to model the scenario of generating possible orders for a client, and finally applying the new solution for the operation of manufacturing according to mass-customisation strategy in a real company that manufactures mattresses.