The present invention aims to provide a compound that may be useful for the prophylaxis or treatment of constipation and the like. The present invention provides a compound represented by the following formula (I) : wherein each symbol is as described in the specification, salt thereof.