and once he barks, mark that behavior with ( anything you use to mark good behavior depending on training method, i use "good". Couldn't find a clicker) and treat. And encourage him to bark.
At least that's how my GSD Tyson picked up.
and make sure you teach him to stop as well, you don't want to wake up all night at his barking.