Smart warehousing aims at increasing the overall service quality, productivity, and efficiency while minimizing the costs and failures. For designing the reference architecture, we apply a domain-driven architecture design approach and use the architecture design knowledge as presented in the software architecture design literature. We first provide the results of a thorough domain analysis process to smart warehouses to identify the key concerns that shape the architecture of smart warehouses. The domain model is presented using feature diagrams that show the common and variant features of smart warehouses. The domain analysis process is followed by the architecture design process, whereby we have used architecture viewpoints for modeling the reference architecture. Different businesses require different kinds of smart warehouses. Therefore, we present the generic business process model for both traditional warehouses and smart warehouses. The business modeling process is followed by the architecture design process, whereby we have used architecture viewpoints for modeling the reference architecture. Once the reference architecture is designed, a case study has been used to evaluate the proposed reference architecture. The case study has been conducted at a large warehouse in the food industry and illustrates the overall design method and presents the lessons learned.