## 3 Research Results  
### Knowledge Base  
Our novel concept (marked in green in Figure 1) was designed and implemented in the form of a WEB application that was launched on the company's local network (intranet). The application was implemented with the use of PHP version 7.0, in which most of the system's mechanisms were implemented. The remaining elements were implemented in the form of micro-services in Python and the Flask micro-framework. The application interface could adapt to the size of the screen on which it was used and could be displayed in one of three language versions. A segment of the constructed database that is responsible for storing data from the range presented is shown in Figure 7.  
Figure 5: Expected product parameters. Figure 6: Product described by an employee. In the first stage, the method NLP (natural language processing) for acquiring the expected product characteristics (E\({}_{\text{pc}}\)) from employee text notes was implemented. The Python language and the NLTK (natural language Toolkit) library were used for this purpose. The example shows the first step of this procedure, where the record analysed--in this case, the lorem ipsum text filler--was divided into single sentences. In each sentence, the symbols from the so-called stop list, such as punctuation marks, were omitted and it was specified to which parts of speech the remaining character strings could be assigned. In the following step, the mechanism uses the system-defined list of searched keywords in order to find words that are semantically closest to the record analysed. For this purpose, the linguistic corpus _wordnet_ and the _wup_similarity ()_ method were applied. By assigning individual keywords to product characteristics, the system could indicate which parts of the analysed record applied to each of them and what expected values were specified. The automatic analysis of the content of the consultant-customer conversation was an element that facilitated the collection of the order data. Additionally, specialist knowledge was acquired from employees in order to collect the data regarding expected product characteristics (E\({}_{\text{pc}}\)) in Figure 8a and expected product parameters (E\({}_{\text{pp}}\)) in Figure 8b. In order to obtain specialist knowledge from employees, the defined (Section 2.1) rules were used. Owing to the acquisition of data from the ERP system and the developed web application, a database for R\({}_{\text{op}}\), R\({}_{\text{pp}}\), and P\({}_{\text{comp}}\) was built (Figure 9). Finally, it was possible to create an algorithm for automatic customised order configuration, the implementation of which would enable support decision-making in a company operating according to mass customisation based on the developed scenario. Figure 7: Fragment of the database—orders and products. An Algorithm for the Automatic Configuration of an Order as an Integral Part of a Cyber-Physical System  
Here, we are looking to answer the following research question: How can a customised product be produced according to its expected parameters and characteristics? We propose the algorithm for the automatic configuration of an order based on the example of a manufacturer of individualised mattresses, intended mainly for the needs of camping vehicles. This algorithm is divided into four stages (Figures 10-13). Each of them is presented using pseudo-code and a block diagram. Figure 8: (a) Expected product characteristics; (b) expected product parameters. Figure 9: _Cont._  
Figure 10: The first step of the algorithm for the automatic configuration of an order. Figure 9: (a) Order parameters; (b) product component; (c) actual product parameters. Assumptions:  
Each mattress generally consists of three functional layers: (1) a cover, (2) a comfort layer/padding layer, and (3) a base layer/supporting layer.