Therapeutic compounds are disclosed having the general formula (I) that are useful for the treatment of metabolic disorders, including type II diabetes. The compounds have activity as agonists of GPR119. Compounds having the stereochemistry of formula (la) may also demonstrate DPP-IV inhibitory activity.