The present invention relates to novel benzylpiperazine derivatives such as compounds of formula (I), which have activity as agonists of the GPR38 receptor and the use of such compounds or pharmaceutical compositions thereof in the treatment of gastrointestinal disorders.