We have a few thousand layer hens here... When they are first starting to lay we confine them to the hen house. We then "train" them to use the nest boxes by walking the hen house once an hour picking up any floor eggs (to discourage other birds from laying in the same spot), coaxing birds that are about to lay towards the nest boxes, and breaking up any nests or depressions that they've made in the litter.
This works rather well for us. We have a nest box for every 10 hens, and even with 2500 hens, after they are trained we only find a couple dozen eggs on the floor each day.