In this paper, a mathematical model of a dual-channel supply chain network (DCSCN) based on the Internet of Things (IoT) under uncertainty is presented, and its solution using algorithms based on artificial intelligence such as genetic algorithm (GA), particle swarm optimization (PSO), imperialist competitive algorithm (ICA), and gray wolf optimizer (GWO). The main goal of this model is to maximize the total DCSCN profit to determine the amount of demand accurately, price in direct and indirect channels, locate distribution centers, and equip/not equip these centers with IoT devices. The results show that with the increase in the uncertainty rate, the amount of demand and corresponding transportation costs have increased. This issue has led to a decrease in the total DCSCN profit. By analyzing the mathematical model, it was also observed that deploying IoT equipment in distribution centers has increased fixed costs. Examining this issue shows that by increasing the savings factor by 0.2, the total DCSCN profit has increased by 6.5%. By ranking the algorithms with the TOPSIS method, the GA was ranked as the most efficient algorithm, followed by PSO, ICA, and GWO. This IoT-enhanced dual-channel supply chain model not only aims to optimize traditional supply chain metrics but also introduces advanced, data-driven strategies for improving demand management, pricing, and infrastructure allocation, ultimately driving profitability in uncertain environments.