It's all about associations. If you pick a sound (any sound, though one that is high pitched tends to get their attention easily) and do consistent rewards initially so that they associate the sound with something good. Then, after they have the association down, you make the treats more random & you have them totally hooked
I make a 'kshshsh kshsh' sound when I am sending them back into the coop and a high pitched 'keeeeeepkeepkeeepkeep' for treats. If you listen to the sounds a rooster makes when he is alarmed by a hawk and copy that, it works really well for sending them back into the coop
I have to say that my favourite thing is calling them and running toward the coop and then turn around and see them running / flying wildly toward me like feathered missiles! Puts a grin on my face every time.