This paper proposes a novel mixed integer linear programming model to solve a supply chain network design problem. The proposed model deals with major issues for supply chains; product quality and cost. These issues are usually solved separately, but in this paper, we investigate effects of product quality on supply chain design and transportation flow. A trade-off between raw material quality, its purchasing and reprocessing costs was considered. Assuming decision maker (DM) wishes to work with a supplier which serves a low quality raw material; this raw material should be in need of reprocessing. To avoid the reprocessing costs, a supplier which serves a high quality raw material should be chosen but at this time the DM has to face a high purchasing cost. A supply chain network which consists of multiple suppliers, manufacturers, distribution centers and retailers is tried to be designed to accomplish aforementioned above trade-offs. The paper examines and discusses the relationship between product quality and supply chain design and offers several managerial insights.