SAN FRANCISCO -- Every few years, companies must make a pivot from their service, product or business model to stay relevant. When selling to small and medium-sized businesses, a pivot can be especially challenging due to the fickleness of the customer.

But not making a pivot can be far worse, putting a company’s future at risk.

At Small Business Web Summit in San Francisco this week, speaker after speaker took the stage and described a painful-yet-necessary pivot early in their company’s evolution. While pivots range from shuttering a product to launching one, they all require a courageous business leader to make a risky bet.

Here are a couple pivots that paid off.

With WePay, it all started at a bachelor party. Rich Aberman founded the peer-to-peer online payment company after having trouble collecting money from friends to pay for his brother’s bachelor party. PayPal wasn’t cutting it, and so Aberman helped launch WePay and raised millions in funding.

Over the years, though, Aberman hit upon an epiphany: Peer-to-peer payment is really hard to do, he told attendees at Small Business Web Summit. Meanwhile, rival Venmo was gaining momentum after being acquired by Braintree in 2012, which, in turn, was acquired by PayPal in 2013.

In 2014, WePay pivoted away from being a standalone product sold to the end-user and become a feature used by tech partners behind the scenes. WePay is now essentially an API-based online payments platform.

Related: Zero One: Winning the Customer Experience Battle

While WePay retired a product, other pivots call for building new ones. Consider the case of Constant Contact, an email marketing company for small businesses that came under a MailChimp attack, said Alignable CEO Eric Groves at Small Business Web Summit.

MailChimp launched a freemium model that undercut Constant Contact's business. After leaving Constant Contact in 2010, Groves co-founded Alignable based on what business owners told him -- they wanted someone to introduce them to other nearby business owners. And so Groves had a pivot in mindset from what he had learned and launched Alignable as a social network for local business owners.

When a competitor shows up and disrupts a market, business leaders will have to pivot or die. But that’s not how it’s supposed to be. Companies should be designing a pivot before times get tough, Groves said.

Constant Contact was too slow or too late to build a new product to defend against MailChimp, Groves said. Instead, every company needs to be developing a new product to disrupt itself even as the original product takes off.

Call it the forward-thinking pivot: It’s better to plan your own disruption before a competitor comes along and does it for you.

Based in Silicon Valley, Tom Kaneshige writes the Zero One blog covering digital transformation, AI, marketing tech and the Internet of Things for line-of-business executives. He is eager to hear how your pivot went. You can reach him at tom.kaneshige@penton.com.