If they've been sleeping/roosting in a building for any length of time, they usually return to that building every night on their own. I've never had to lure or herd chickens or ducks into the coop once they've slept there for longer than 3-4 days. When switching to a different location, it's often easy to get them trained to the new place by confining them to the coop/building for a week until they are used to sleeping there.