It’s a brand’s worst nightmare: a high-profile event is generating a huge amount of social media buzz and one of your employees, thinking that she’s logged into her own Twitter account, inadvertently posts an embarrassingly insensitive tweet through the company account that h.

That’s precisely what happened last night to KitchenAid. An employee whose name has not been released was apparently watching the U.S. presidential debate and decided to post a foolish tweet about the president’s grandmother. Instead of posting it to her personal account, she posted it to the KitchenAidUSA account, which has more than 25,000 followers.

The tweet was quickly deleted, but as is always the case on Twitter, once posted, it’s too late. The damage was done and KitchenAid is in crisis management mode, having issued an apology and reassuring the public that the employee responsible “won’t be tweeting for us anymore.”

While it’s impossible for brands to completely eliminate all risk when engaging with consumers through social channels like Twitter, incidents like this don’t have to happen. Here are five lessons companies can learn from KitchenAid’s flub.

1. Finding good people is tough.

Filling social media job openings may be a lot easier for companies than, say, filling design and development job openings, but that doesn’t mean that finding good people capable of representing a brand through social channels is easy.

While the unnamed KitchenAid employee who posted the embarrassing tweet in question apparently intended to tweet through a personal account, the crass nature of the tweet leaves little doubt that this was probably not the type of person a brand would want tweeting on its behalf.

2. Team management of accounts can be perilous.

For large brands, having one individual manage important social media accounts may not seem viable. But group management of those accounts isn’t without its risks either.

In KitchenAid’s case, it’s clear that, at a minimum, there was not enough oversight of the team responsible for managing the company’s Twitter account. There may also have been inadequate thought given to how many, and which, members of the team needed the ability to post tweets.

3. Names matter.

We do not know the name of the KitchenAid employee who created this crisis, and it would probably be inappropriate for KitchenAid to reveal it now. But the situation highlights one of the risks of letting social media employees remain faceless: when they do something stupid, the brand takes the full brunt of the backlash. If “employees are the brand,” as some suggest, shouldn’t we know who they are?

Many brands, of course, take a different approach than KitchenAid: they make specific employees — names and all — the faces of their social media presences. This, of course, carries with it its own set of risks, but it also arguably creates a greater sense of responsibility and, in theory, increases accountability.

4.  24/7 is challenging.

While the information we have about KitchenAid’s Twitter mishap is limited, it’s worth considering that the embarrassing tweet was posted in the evening. Was the employee who posted it tweeting from home? Was he or she supposed to be tweeting at that time? Whatever the answers to these questions, one thing is clear: the 24/7 nature of social media presents new issues that brands need to address.

5. Rules are a necessity.

Following the above, it would appear that the individuals responsible for managing KitchenAid’s Twitter account were subject to limited rules — or the rules weren’t being followed.

What rules should brands develop around the management of their social media accounts? That obviously depends, but a few common sense ones worth considering include:

  • Employees should not tweet from personal accounts while “on the job.”
  • Software used for managing brand social media accounts should never be used with personal accounts.
  • Employees must log out of brand social media accounts when they go off-duty.

Once created, rules must obviously be enforced, with serious violations resulting in immediate removal from social media management duties.