The study is devoted to solving the scientific problem of optimal expansion of the enterprise’s market niche, taking into account potential demand and the formation of an effective advertising campaign. An economic-mathematical model of the enterprise’s production activity has been developed taking into account logistics and market demand. The problem of determining the optimal advertising costs is solved in two formulations: a) the enterprise produces homogeneous goods and the wholesale warehouse can fulfill the retail order for any quantity of goods in the wholesale warehouse; b) the enterprise produces some products in assortment. In this case, a certain minimum stock of products should be available at the wholesale warehouse. The study found that the optimal advertising costs are determined by the value of all the main parameters of the enterprise’s logistics system. This conclusion was obtained as a result of careful model accounting of the structure of the enterprise’s logistics system. All the main links (flows) between the elements of the logistics system were also taken into account. The simulation was performed in such a way that non-physical phenomena (for example, storage overflow, etc.) did not appear at the intermediate stages of modeling. The calculations found that with the planned capacity of 4.1 (units per day), the annual profit will be 3975.5 (units) with an optimal advertising cost of 44.8 (units). The practical significance of the study is that scientific ideas about the relationship of the advertising campaign with the production potential of the enterprise can serve as the basis for more efficient management of the budget process at the enterprise, namely: more informed planning of production volumes and expenses for its advertising campaign