The present invention relates to novel oxyindole derivatives of formula (I) or a pharmaceutically acceptable salt thereof, processes for their preparation, pharmaceutical compositions containing them and their use in the treatment of various disorders which are mediated via the motilin receptor (GPR38).