In wireless sensor networks, the existing clustering head selection protocol is unworkable, leading to uneven network loads and a shorter network lifetime. To improve energy-effective wireless sensor networks (WSN) for e-commerce applications, a cluster head selection technique called CIBOA (Cluster Head Selection using Integrated Butterfly Optimization technique) has been created to address this problem. The current clustering head selection mechanism in wireless sensor networks is ineffective, which results in unequal network loads and a shorter network lifetime. The Butterfly Optimization Algorithm (BOA) has undergone significant modifications to enhance performance. These enhancements significantly boost the optimization speed and accuracy of BOA, thereby strengthening its search capabilities. During the process of selecting cluster heads (CH), a novel fitness function has been developed. This function considers variables such as remaining energy levels, the distance between nodes and base stations, and the average distance between neighboring nodes. The results show that CIBOA comprehensively considers factors like node energy and distance. This holistic approach results in a reduction in overall network operational time, making it particularly suitable for Energy-efficient networks of wireless sensors, especially in the context of e-commerce applications.