You're fired! How to decide when a tweet goes too far

President Trump, in his address to Congress this week, honored Carryn Owens, the widow of William "Ryan" Owens. Chief Owens is the highly-decorated Navy Seal who was killed in a raid in Yemen on January 29th. Carryn received a heartfelt two-minute standing ovation from the crowd. Many hearts in the room and across the nation surely went out to her.

Not all hearts were so kind, though. Take Dan Grillo, a principal in the Chicago-area Liberty Advisor Group and a former Clinton and Obama volunteer. After the Congressional address, Grillo tweeted the following heartless and insensitive message: "Sorry, Owens' wife, you're not helping yourself or your husband's memory by standing there and clapping like an idiot. Trump just used you."

Grillo was fired the day after this ill-considered tweet, and that firing seems warranted for reasons the company gave in a statement.

The company described Grillo's tweet as "offensive and inappropriate," and said it was "inconsistent with the company's values." The company's statement went on to say, "Regardless of whether the comments in the tweet were intended to cause the hurt and anger that they ultimately generated, they were unacceptable to us, and the individual who issued the tweet is no longer affiliated with Liberty."

The company's decision was only strengthened by the fact that Grillo had named the company in his Twitter profile. So the company was at considerable risk for being associated with the tweet.

Grillo's firing, in my opinion, is a clear case of when an ill-advised tweet should lead to a dismissal. But under what less-clear circumstances should such a tweet or post result in a firing?

Should the only criterion be that a tweet or post that is offensive, inappropriate and inconsistent with the values of the company will lead to a firing? Should it matter that a post, like Grillo's, elicits widespread and uniformly negative attention?

It stands to reason that a company would give more weight to a tweet that is offensive, against the values of the company, and widely distributed. But what about when an employee makes a racist or sexist comment while having drinks with colleagues after work? If senior management later hears of the comment should they fire the employee even if they are confident that no one outside of that group of employees heard it?

That would depend chiefly on what matters most to the company. If the company is mostly concerned with its public image and risk management then they might reprimand but not fire the employee who makes the inappropriate comment over drinks. Less exposure means less risk of negative publicity.

But if the company is chiefly concerned with having a values-based culture, and sees its positive public image as a reflection of that culture, then they would have solid grounds for firing the employee even if the offensive comment is not heard outside of the company. A company cannot say that certain values matter if there are no consequences for action against those values. And a company surely cannot say that character and values matter if they not only employ but promote jerks and give them greater rewards, responsibilities, and ability to affect others.

Should it matter how sympathetic or not the target of the inappropriate comment is? Carryn Owens was as sympathetic as a person could be. But what if the target of the tweet was as unsympathetic as could be? What if, for example, the tweet mocked Martin Shkreli, the former CEO of Retrophin, who was described as "the most hated man in America" when, in 2015, he notoriously defended raising the price of Daraprim from $13.50 to $750 a pill?

A tweet targeting a sympathetic figure is surely more upsetting than a tweet targeting a jerk. But if the tone and content of the message is cruel, unkind or otherwise not the kind of thing that someone who gets the company's values would say, then it would seem that even an offensive tweet targeting an unsympathetic person should result in a firing.

Finally, how much weight should be given to the employee's condition or state of mind at the time of the offensive tweet? What if an employee is in an unusually bad way at the time of the offensive tweet?

Returning to our barroom hypothetical, if the bad condition is a result of imbibing, then little to no weight should be given to it. One should not be excused from an offense based on a condition that one has brought about him- or herself.

But what if the employee at the time of the tweet had just received news of a devastating loss or had just started taking a new medication that unexpectedly interferes with his or her judgment?

That should count more than being drunk or high, but if the tweet were sufficiently offensive and contrary to the company's values, the question could be raised whether an employee in any condition would be having such thoughts, let alone tweeting them out. And if character is what truly matters in a company then due weight should be given to the fact that character is sometimes most clearly revealed in difficult or challenging situations.

This is a suggestive list of factors to consider when deciding whether to fire an employee for an offensive tweet. Grillo's firing was a sad but easy case. Other cases might be less clear and more difficult, so each company more and more has to decide what criteria it will use in deciding whether to say, "You're fired."

Commentary by Joseph Holt, an associate teaching professor at the University of Notre Dame's Mendoza College of Business who specializes in business ethics and leadership. Follow him on Twitter @busethicsdude.

For more insight from CNBC contributors, follow @CNBCopinion on Twitter.