The present invention relates to sulfonamide derivatives of formula (I): or a pharmaceutically acceptable salts thereof, wherein Z, R1a, R1b, R2, R3, R4 and R5 are as defined in the description, and to their use in medicine, to compositions containing them, to processes for their preparation and to intermediates used in such processes. The compounds of formula (I) are Nav1.7 inhibitors useful in the treatment of a wide range of disorders, particularly pain.