Businesses around the globe are engaging consumers on social media, attempting to establish a voice in an increasingly connected world. Building a reputable brand can be a difficult and time-consuming venture.

However, in this new era of customer engagement, there are unprecedented risks. Despite all of the work, one slip-up online can ruin your brand’s reputation.

Brands have been interacting with customers on social media for over a decade now. While reading about embarrassing social media faux pas can give an intense feeling of schadenfreude, these accounts can also be informative; there are now clear do’s and don’ts when it comes to social media.

Social media managers are now fortunate to have the advantage of learning from major mistakes within the last few years. Here are three lessons to keep in mind when engaging with customers online:

Lesson one: Don’t fight fire with fire

Don’t use a belligerent tone when responding to vitriolic complaints online. The most dramatic example of a business destroying its reputation in this manner is the infamous Amy’s Baking Company fiasco.

After appearing in a negative light on the television show “Kitchen Nightmares.” Amy and Samy Bouzaglo were heckled by a flood of displeased customers and trolls. The couple’s restaurant was lambasted on Yelp and Facebook, and they were not tolerant of criticism.

When a PR crisis hits your company, it is necessary to respond to legitimate complaints in a constructive manner. Clearly abusive comments should be muted. Amy’s Baking Company diverged from these best practices when they wrote “You are all little punks . . . All of you, just fools. We have God on our side, you just have your sites].”

The meltdown escalated, eventually resulting in all-caps tantrums, including gems like “I AM NOT STUPID ALL OF YOU ARE [sic].” Though the Bouzalgos later claimed that their social media accounts were hacked, many users cast doubt on this.

While giving abusive users a taste of their own medicine may be tempting, it is not advisable. It is oftentimes better to handle complaints privately. Product or service complaints can be resolved in a private channel.

Direct or private messages allow customer service to get more information about the situation without static from onlookers. This is not an effective way to handle trolls, however, since it is a simple matter for users to post private messages for others to see. Again, don’t feed the trolls. If hostile users begin making actual threats, it may be time to get law enforcement involved.

Lesson two: respond to complaints in a timely manner

One example of how NOT to handle a PR crisis can be seen in the ongoing controversy surrounding Atrium Medical for their use of hernia meshes made out of polypropylene. These meshes have been degrading and shrinking inside patients, causing innumerable complications including intestinal blockages, major organ damage, and worse.

Atrium’s response? Absolute silence. Despite this controversy, Atrium has not responded in any way whatsoever. To this day, there is no information about possible complications listed on their online brochure for hernia meshes. This lack of communication extends to social media. On Twitter, for instance, their account has been utterly inactive since 2011.

As a result of negligence and a lack of communication, the company is being sued on behalf of those who are suffering complications. Atrium’s lack of communication regarding the dangers of the meshes, as well as any response to thousands of upset patients, will likely cause further damage to the company.

Lesson three: be careful with social media automation

Reaching out and engaging customers on social media is the best new way to sell. Marketers know this and are often tempted by the possibilities of social media automation.

In recent years, however, automation has led to extremely embarrassing mistakes. Besides making interactions impersonal and awkward, automation can also land your brand in hot water.

The NFL Patriots learned this firsthand two years ago, when they used automation to congratulate themselves for reaching one million followers. Followers received shoutouts, featuring automatically generated images of jerseys with users’ names displayed on them. Unfortunately, one of these accounts contained hate speech. The Patriots received a great deal of well-deserved heckling and issued an apology. Publically thanking followers is not necessarily a bad practice, but when a user’s name is “@IHATEN*****S”, it might be prudent to reconsider.

Social media automation should be used sparingly. Scheduling posts is fine, but when it comes to responding to customer complaints, live interaction is a must. According to the University of Southern California’s Online Applied Psychology program, U.S. companies lose approximately $41 billion every year due to poor customer service. Delegating customer service duties to a chatbot is clearly a bad choice.

These experiences should guide current social media managers in the right direction. Maintaining a positive, constructive demeanor is essential to customer service online. Do not ignore customer complaints in hopes that controversy will die down without intervention.

Finally, excessive automation should be avoided, since it can reflect poorly on your brand. With these lessons in mind, you can continue to build on your brand’s reputation without fear.