Answered by the HR Experts
It sounds like this prank could have crossed the line into harassment, even though the person who was offended wasn’t necessarily the intended target. As an employer, you have an obligation to prevent and deal with harassment complaints promptly and thoroughly. To that end, follow your standard procedure to investigate the incident and take appropriate action.

Be sure to document every step of your investigation and resulting actions taken so you can show you fulfilled your obligations. Having a clear record will also help you ensure similar situations are handled consistently in the future.

Going forward, you could prohibit pranks of any sort, but if they remain harmless and inoffensive while also inspiring joy in the workplace, a blanket ban might not be necessary. On the other hand, if most employees don’t enjoy the pranks or they’re significantly disruptive to the workplace, it might be time to lay down some new expectations around professionalism. In either case, employees should understand what lines not to cross and that “just having fun” is no excuse for violating company policies.