The photocatalytic activity of the ternary doped catalysts was evaluated by measuring the degradation of ampicillin antibiotic under sunlight irradiation. The results showed that the ternary doped catalysts had higher photocatalytic activity compared to monodoped and codoped catalysts. The highest degradation efficiency was observed for the catalyst with the atomic configuration of (x=2, y=0.1, z=0.06), which showed a degradation efficiency of 92% after 3 hours of irradiation. The degradation efficiency of the ternary doped catalysts was found to be dependent on the atomic configuration of the dopants. The increase in the dopant concentration led to an increase in the photocatalytic activity, but beyond a certain limit, the photocatalytic activity decreased due to the recombination of electronhole pairs. The enhanced photocatalytic activity of the ternary doped catalysts can be attributed to the synergistic effect of the dopants. The B dopant facilitated the separation of electron-hole pairs, while the Ce dopant provided additional active sites for the adsorption of reactants. The Ag dopant acted as a plasmonic resonance enhancer, which improved the visible light absorption of the catalysts. The ternary doped catalysts also showed improved disinfection efficiency compared to monodoped and codoped catalysts. The disinfection efficiency of the ternary doped catalysts was found to be dependent on the atomic configuration of the dopants, with the highest disinfection efficiency observed for the catalyst with the atomic configuration of (x=2, y=0.1, z=0.06).