This paper addresses an interactive energy scheduling model developed between distribution system and residential microgrids (RMGs). To make such concepts, a three-stage mathematical programming framework is proposed. Residential energy management (REM) approach which is in interaction with residential microgrid operator (RMGO) is developed which contains two stages, sequentially. The main goal of these stages is to modify RMGs day-ahead load profile by considering the minimized total daily energy expenses of each home at each RMG. Moreover, in these stages, in addition to existing fixed-loads at each evaluated residential homes, in-home energy management (iHEM) systems are responsible for adjusting the shiftable appliances and small scale distributed energy resources (DERs) commitment. In third stage, besides the interactions between distribution system operator (DSO) and RMG operators (RMGOs), optimal operation cost of the distribution system is determined as well. In this way, optimal scheduling of distribution system active elements namely large scale DERs are considered and the changing trends in energy exchanges, power losses, and voltage profile are addressed. To lower the computational burden of the proposed model, linearization techniques are applied in the proposed model. Simulation studies are reported on modified IEEE 33-bus distribution test system to assess the performance of the proposed model. Results are discussed in depth.