ABSTRACT Present invention relates to novel heterocyclic compounds as indoleamine 2,3-dioxygenase (IDO) and/or tryptophan 2,3- dioxygenase (TDO) modulators. Compounds of the present invention inhibit tryptophan degradation by modulating IDO and/or TDO. Formula (I) The invention further relates to the process of their preparation, pharmaceutical composition and their use in modulating the activity of indoleamine 2,3-dioxygenase (IDO) and/or tryptophan 2,3-dioxygenase (TDO). The compounds of the invention can be used alone or in combination for the treatment of conditions that benefits from the inhibition of tryptophan degradation.