In most of the ternary (and higher order) ferromagnetic shape memory alloys (FSMAs) with compositions close to the A2BC stoichiometry, the austenite phase exhibits L21-type ordering. Recent investigations of the Co-Ni-Ga FSMA system, however, suggest that the austenite phase has B2-type ordering, although definite confirmation remains elusive. In this work, we present a theoretical investigation of the effect of configurational order on the magnetic properties of ordered (L21) and disordered (B2) FSMA Co2NiGa. Through the use of calculations based on density functional theory, we predict the structural and magnetic properties (including magnetic exchange constants) of ordered and disordered Co2NiGa alloys. We validate our calculation of the magnetic exchange constants by extracting the Curie temperatures of the austenite and martensite structures and comparing them to experiments. By constructing a q-state Potts magnetic Hamiltonian and through the use of lattice Monte Carlo simulation, we predict the finite temperature behavior of the magnetization, magnetic susceptibility as well as the magnetic specific heat and entropy. The role of configurational order on the magnetic properties of the phases involved in the martensitic phase transformation is discussed and predictions of the magnitude of the magnetic contributions to the transformation entropy are presented.The calculations are compared to experimental information available in the literature as well as experiments performed by the authors. It is concluded that in FSMAs, magnetism plays a fundamental role in determining the relative stability of the austenite and martensite phases, which in turn determines the martensitic transformation temperature MS, irrespective of whether magnetic fields are used to drive the transformation.