The same occupancy sensor behaves very differently depending on where it is mounted. A wall-switch sensor replaces the light switch. It is a straightforward install and a good fit for a small private office, but it only sees what someone at the doorway can see. Partitions, a tall cabinet, or a door swung into the view will hide the desk.
A ceiling sensor looks down on the whole room. Use it for larger or oddly shaped rooms, restrooms with stalls, and open offices. For a hallway or a warehouse aisle, a corner or high mount with a long-range pattern covers the length of the space.
Read the coverage map before you buy. The pattern for major motion, a person walking, is larger than the pattern for minor motion, a person typing. Do not let the sensor see out the door, or hallway traffic will keep turning the lights on.
Turn the breaker off before you install one. A line-voltage sensor is a job for a licensed electrician.
Shop occupancy sensors on eBay