In the realm of smart transportation and mobility, delivery organizations are continuously refining their strategies, harnessing resources and advanced analytical techniques to streamline operations, aiming to achieve optimal solutions in terms of both efficiency and cost-effectiveness. However, a persistent challenge faced by these delivery companies revolves around the effective assignment of delivery personnel to customer orders, often grappling with suboptimal assignments that lead to inefficiencies and delays. To address this issue, we propose an architecture that uses the Munkres algorithm to optimize the task assignment problem for delivery personnel with pending orders, employing different cost functions obtained with deterministic and machine learning techniques. We compared the performance of linear and polynomial regression methods to construct different cost functions represented by matrices with orders and delivery people information. Subsequently, we applied the Munkres optimization algorithm to solve the assignment problem, which optimally assigns delivery people and orders. The results demonstrate that linear regression, used to estimate distance information, can reduce estimation errors by up to 568.52 km (1.51%) for our dataset compared to other methods. Conversely, polynomial regression proves effective in constructing a superior cost function based on time information, reducing estimation errors by up to 17,143.41 minutes (11.59%) compared to alternative methods. The proposed approach aims to enhance delivery personnel allocation within the delivery sector, optimizing the efficiency of this process.