The invention relates to heterocyclic compounds of the formula (I)in which all of the variables are as defined in the specification; capable of modulating the activity of CFTR. The invention further provides a method for manufacturing compounds of the invention, and its therapeutic uses. The invention further provides methods to their preparation, to their medical use, in particular to their use in the treatment and management of diseases or disorders including Cystic fibrosis and related disorders.本發明係關於式(I)之雜環化合物,其中所有變量如說明書中所定義;其等能夠調節CFTR之活性。本發明進一步提供製造本發明化合物之方法及其治療用途。本發明進一步提供該等化合物之製備方法、其等醫學用途、具體而言其等用於治療及管控疾病或病症(包括囊性纖維化及相關病症)之用途。