## 3 Results
### Technologies and Implementation
#### 3.3.2 Enterprise Resource Planning  
A commonly used definition of an ERP system is a set or collection of all-inclusive software used to manage business operations and information, particularly in the manufacturing sector. All the business operations inside a company may be managed and integrated using an ERP system. In a typical ERP operation, two or more agents are involved in the completion of the business process. For example, a customer ordering a part. The request is served from an external source such as a web application in the ERP. This request is converted into a sales order and afterward converted into a purchase order, and when the order is completely processed, the user receives the product delivery information. In all these instances, the transaction passes through different actors, where it can be approved or rejected. Figure 15 shows the class diagram of ERP and web applications, and the relations between them. The web application data model includes users of the systems and purchase orders they can make. The ERP data model shows the relations between sale orders, products, and production orders and how information moves from the initial user pre-order to the production of the product.  
Figure 15: Representation of the class diagram of ERP. (1..* stands for one or more).  
The User class (Figure 16) represents users in the web application. The Partner class (Figure 17) is related to the User class in the ERP system with a relation of one-to-one. To facilitate our integration with the blockchain (for traceability and trustability), the User class contains information about blockchain authToken and publicKey. The Partner class (Figure 17) is mostly used to identify the customers.  
Users can create PurchaseOrders (Figure 18a), which are related to the Product class (Figure 18b) and ERP SaleOrder class (Figure 18c). PurchaseOrder contains necessary information about the sale to the cloud. The Product class contains the selected configuration of the product to be produced. SaleOrder is the class that contains the ERP sale information and has relation to the Partner class, which is the customer of the sale. Each customer can have multiple SaleOrders. Products ordered are contained in SaleOrderLine (Figure 18d) class, and SaleOrder can have multiple SaleOrderLines.  
Figure 16: User class.  
Figure 17: Partner class.  
The Product class is related to the ProductTemplate (Figure 19a) and Production (Figure 19b) classes. ProductTemplate is the functional description of a kind of product, it includes the bill of materials (BoM) identification, category, and company, among other details.  
For instance, ERP might have a basic template for the Basic product (on ProductTemplate). The Product class describes it more in-depth, with other details, for example, the color of the product. The Production class describes the manufacturing details of the ordered product and sub-product/parts. Production has a relation with the BillOfMaterial class (Figure 19c) which contains the list of parts needed to manufacture the product. BillOfMaterial can contain multiple BillOfMaterialLines that represent the parts needed to manufacture the final product to be delivered to the customer.