Provided is a substituted piperidine compound having an orexin type 2 receptor agonist activity. A compound represented by the formula (I): wherein each symbol is as described in the description, or a salt thereof has an orexin type 2 receptor agonist activity, and is useful as a prophylactic or therapeutic agent for narcolepsy.所提供的為具有食慾激素2型受體致效劑活性的經取代哌啶化合物。式(I)所示之化合物或其鹽:其中各符號如說明書所述,具有食慾激素2型受體致效劑活性,而適用作為猝睡症的預防或治療劑。