In this work, a mathematical model, designed to determine the optimal strategy of the trading firm’s behavior is constructed under conditions of random demand. As a result of special marketing research, it is determined that at some random time T there will be a sharp and strong drop in demand. It is assumed that the trading company uses the following scheme of the wholesale order of the goods. All ordered goods are divided into two parts, the first consignment of goods arriving immediately, and it must be sold within a certain period of time T1, if the demand does not drop, then the sale of the second consignment of goods starts at a discount. The delivery of the second batch to the buyers occurs at time T . The article considers various situations that arise as a result of a drop in demand after the moment T, either until the time T1 or in the period between the time moments T1 and T. It is necessary to consider such a wholesale order scheme. Firstly, the warehouses of the trading company have a limited scope and cannot accommodate the entire ordered volume of goods, and secondly, the producer cannot immediately supply the entire ordered lot of goods, since not all goods could be produced in the initial (zero) time when the order is made. For the trading company, the moments of time T1 and T are important. At time T1, the trading company will completely sell the first shipment of the goods and receive the funds, part of which it will pay to the firm for the manufacturer. The time T is also extremely important for the trading company, as it will mean the successful completion of the full realization of the entire purchased product. The choice of time points T1 and T allows determining the volume of the first consignment of ordered goods and the total volume of all ordered goods from the manufacturer. In this work a mathematical model is proposed that allows choosing the optimal ordering strategy for a trading company in conditions of a possible drop in demand at a random time.