The invention relates to heterocyclic derivatives, to the use of said derivatives in treating a range of metabolic diseases and other conditions mediated by agonism of the G-protein coupled bile acid GPBAR1/TGR5 receptor, to compositions and formulations containing said derivatives, processes for their preparation and methods of delivery.