The controversial "race together" campaign came straight from Starbucks CEO Howard Schultz. REUTERS/David Ryder Starbucks' campaign that encouraged baristas to write "#racetogether" on coffee cups and talk about racial tension with customers was a massive failure.

Critics branded it as insensitive and tone-deaf, and it was mercilessly lampooned on late-night TV. Starbucks' head of communications was forced to temporarily suspend his Twitter account following a barrage of attacks, which only further frustrated critics, and some people blasted the company for weighing in on race at all when only two of its 19 executives are black.

Many people questioned how the idea could have ever gotten past the board room at a Fortune 500 company.

It turns out that the campaign came straight from Starbucks CEO Howard Schultz, and senior executives had doubts about it from the beginning, Austin Carr reports at Fast Company.

Schultz began exploring ways for the company to weigh in on race in late 2014, according to Carr, who interviewed several Starbucks executives, including Schultz, for the story.

"Schultz couldn’t get his mind off the racial protests dominating the national headlines in the wake of the grand jury decision in Ferguson, Missouri, not to indict Darren Wilson, the police officer who killed Michael Brown," Carr writes.

He called a meeting with Corey duBrowa, Starbucks' communications chief, and Scott Pitasky, head of partner resources, on December 10 and told them he wanted to hold a race forum with employees at the company headquarters.

In an interview with Carr, Pitasky recalled wondering whether it was a good idea. But they jumped on board anyway and decided to hold the forum.

"More than 400 people soon gathered on the ninth floor of Starbucks’s headquarters, and Schultz kicked things off: 'If we just keep going about our business and ringing the Starbucks register every day, then I think we’re in a sense part of the problem,'" Carr writes.

The company held several more forums, and eventually Schultz decided he wanted to do even more to involve Starbucks in the national discussion on race.

He shared the idea at a board meeting in mid-January, and after an hours-long discussion that at times turned tearful, the board approved his plans for a broader initiative, according to Carr.

Executives were concerned that the campaign could have some unintended consequences, but for some reason didn't do any market research to see how it might be perceived by the public, Carr writes.

A couple months later, the "#racetogether" hashtag was born.

Baristas were asked to write the hashtag on coffee cups beginning March 15 and to engage customers in discussions on race relations if they asked about it.

The campaign backfired within the first 24 hours, but Starbucks decided to continue it anyway.

"We made a tactical mistake. So what?" Schultz told Carr. "We’re moving forward."

Read more about the story behind "race together" at Fast Company.