One winter’s day, Nicole Morgenthau received an email that jolted her. She owns Finch Knitting and Sewing Studio in Leesburg, Va., and the note threatened her beloved store with a potential boycott.

An angry supporter of President Trump was compiling a list of businesses openly hostile to customers who voted for him. The question: Was Finch Knitting “an anti-election establishment?”

Ms. Morgenthau searched her brain. Her four-year-old store, which is bright and cozy, had never endorsed a political candidate. She had, however, listed the store on the Pussyhat Project site, offering knitting supplies like pink yarn and knitting needles along with instructions on how to knit the cat-ear caps that were popular at the Women’s March in Washington. Still, she had not publicized the march itself in her store or on the shop’s Facebook page.

“The business is my baby,” Ms. Morgenthau said. “I was immediately worried about it being threatened.”

Big retailers including L. L. Bean, New Balance and Nordstrom have recently been caught in the cross hairs of polarizing politics that have affected sales.

But unlike corporations with crisis management firms at their behest, small-business owners have to rely on their own wits to respond and salvage sales and relationships.

Ms. Morgenthau responded by email to the Trump supporter, hoping to build rapport. “We are not and never have been hostile to any human being,” Ms. Morgenthau’s letter began. It ended with these words: “Just remember you belong here.”

Next, Ms. Morgenthau posted the threatening letter and her response on the shop’s Facebook page, which ended up getting hundreds of supportive comments from people across the country. She also posted information with the local business association.

“There needed to be some kind of public record,” said Ms. Morgenthau, whose business logged $389,000 in sales last year. “And I also felt that my local business community should know.”

A crisis was most likely averted by her conciliatory actions. Boycotters never appeared. Instead, supportive customers began flooding into her store, some coming from other states. Weekend sales began soaring more than 60 percent.

In this era when emotions are running high and even basic business decisions can be perceived as politicized, business owners and marketers offer several examples on how to avoid or respond to boycotts and political issues. Here are some factors to keep in mind:

Decades of Boycotts

Boycotts are an American tradition dating back to the Boston Tea Party. The term wasn’t used until the 1880s, though, when an American journalist in Ireland popularized the name rather than “ostracism,” the prevailing word.

“The term boycott spread like wildfire,” said Lawrence B. Glickman, a Cornell University history professor. “And within three months, it was being used in Salt Lake City.”

From then on, boycotts — ranging from the Jim Crow-era boycott of streetcars in the early 1900s to the mass civil rights demonstrations of the 1960s — have been an American staple. “We’re in another moment like that again,” Mr. Glickman said.

Small businesses benefit from having some advantages. “Buy local” campaigns have gained steam in recent years, helping lift small-business sales and creating stronger communities.

“Conversely, anything big is bad right now,” said Thomas C. O’Guinn, a professor of marketing at the University of Wisconsin-Madison’s business school. “Anything small is considered differently, since there’s no faceless behemoth.” Customers, he added, are also more apt to know store employees or even the owner.

Even grass-roots boycott efforts, like the site and hashtag #GrabYourWallet, which has gone after Trump-related products, do not usually take aim at small businesses.

Still, small-scale efforts to shun a local business can directly affect the bottom line. “Small businesses are living on the edge,” said Maurice Schweitzer, a professor of operations, information and decisions at the Wharton School of the University of Pennsylvania. “Two months of bad sales can send them under. So the challenge is difficulty adapting.”

In recent months, social media has helped spread news — and misinformation — very quickly, to the detriment of some businesses. For instance, Comet Ping Pong, a pizza restaurant in northwest Washington, was the site of a gunfire attack in December after fake news articles said the location was harboring young children as sex slaves as part of a child-abuse ring led by Hillary Clinton. Even a pizzeria in Brooklyn was unwittingly pulled into the hoax.

After his posts on a personal Facebook account resulted in a barrage of calls for a boycott, the owner of Twelve Rounds Brewing in Sacramento temporarily stepped away from operations.

Showing Trump Pride

Some business owners, however, have been able to carefully balance their political beliefs with the demands of running and owning a business.

Cherie Corso, owner of the e-commerce site, has been in business for seven years. Her company sells beauty products with fewer chemicals. Ms. Corso works with chemists to create her products and is adding new items like organic Himalayan soap to her site.

She is also a Trump supporter, and she posted a picture on her website of Mr. Trump with a quartz crystal that she gave him during a book signing at Trump Tower. The result: G2’s Facebook page has been inundated with hundreds of negative messages for the last few years.

For the most part, however, the decision has been a wash for her bottom line. Now, business mostly comes from red states like Texas and less from blue states like New York.

“We’re only going through life once,” said Ms. Corso, a former model. “And I’m not afraid to put my political views on my website. For every customer, I’ve lost, I’ve gained one.”

Outspoken on Issues

Some online businesses have been fully prepared to court controversy, regardless of the effect on sales.

Mitch Goldstone, co-founder of ScanMyPhotos, an e-commerce company that digitizes family photos, has always taken strong political stances, unafraid of how it could affect his 26-year-old business based in Irvine, Calif.

He even appeared on CNN in 2015, after Mr. Trump declared his candidacy, to explain why he was opposed to him. These actions resulted in hundreds of angry phone calls for a few days, he said.

Still, Mr. Goldstone did not back down from his outspokenness. He offered to scan photos free for all customers for one month if Mr. Trump won the general election.

Mr. Goldstone kept his word. And ScanMyPhotos has now scanned thousands of photos, he said, and won over some Trump supporters as paying customers.

“You have to speak up and have a voice,” said Mr. Goldstone, whose business employs 20 people. “I’m trying to demonstrate the value of integrity. And I need to keep my word.”

Mr. Goldstone also benefits from a huge market. His company has digitized 300 million photos so far, he figures, but 3.5 trillion photos in the country are still in paper form.

What Marketers Say

In general, though, experts advise small-business owners to avoid politics. Some potential boycotts of unwitting targets, like Finch Knitting, turn out for the better, but it had the backing of a community. Instead, to raise visibility, volunteer work can help businesses, experts advise.

“Small brands should stay out of politics,” said Robert Passikoff, founder of the marketing research firm Brand Keys in New York City. “They’re not brand equity building blocks. And you can end up in reactive spin mode.”

Mr. O’Guinn, the University of Wisconsin professor, echoed Mr. Passikoff. “Branding has become so politicized,” he said. “It’s too big a risk.”

Experts also recommend building strong customer relationships. That effort served Ms. Morgenthau well in a tough time. “Knitting is a community craft,” she said. “And everything we offer is a way to have relationships.”

“Being a good neighbor is more important when you’re a small business,” explained Mr. O’Guinn. “It’s the beauty of grass-roots capitalism.” Reaching out to fellow citizens, doing good acts and donating to charities makes a business less vulnerable.

If your business is targeted, though, don’t ignore it, he added. Instead, sit down and work out a solution with those leading the boycott. Be open and forthright, and avoid criticizing the other side’s viewpoints. “The worst thing is to be morally superior,” Mr. O’Guinn said.