When the stock market retreats, shares of many terrific companies go on sale. The market is already down markedly in 2022 -- the S&P 500, for example, was recently down 17% year to date. There are plenty of attractively priced stocks out there right now -- but if there's a further market pullback, many bargains may be hard to resist.

Here are three solid companies whose stock you might take a closer look at and consider for your long-term portfolio, should they fall further in price.

A kitchen worker is smiling, with crossed arms.

Image source: Getty Images.

1. Salesforce.com

Salesforce.com (CRM -0.99%), the global leader in customer relationship management (CRM), explains that it "empowers companies of every size and industry to digitally transform and create a 360° view of their customers." Customer management is rather important to myriad businesses, as it can involve keeping track of them and their preferences, optimizing communications with them, and delivering personalized experiences. Such things can drive customer satisfaction and keep customers around.

Salesforce is an early software-as-a-service (SAAS) company, with many cloud-based services. It claims more than 150,000 businesses as its customers, ranging in size from small to very large. In its last fiscal year, the company posted revenue growth of 25% year over year to $26.5 billion, and 25% growth in operating cash flow -- though earnings per share were in the red. The company is facing some headwinds -- such as Microsoft's competing CRM offerings and what some see as overdiversification on the company's part.

Still, it remains the top dog in its field and it's still growing its top line by double digits. It generates much of its revenue via subscriptions, which is a business model many investors love, as that revenue is fairly dependably recurring. Also, it benefits from the switching-costs competitive advantage, as it can be hard for customers to switch to another provider once they're using a range of Saleforce services.

Salesforce's stock was recently down 46% from its 52-week high. Should it fall even further, its attractiveness as an investment opportunity will only grow.

2. Pinterest

Pinterest (PINS 0.94%) has seen its shares plummet in recent months. At the time of this writing, the growth stock's shares were down some 74% from their 52-week high.

The company calls itself "the visual discovery engine" -- "where you find and do what you love." More specifically, it's a social media platform where users share products and styles and designs (and recipes and inspirational quotations and fitness tips, among many other things) that they like. It works -- because there are more than 400 million monthly active users (more than half of whom are outside the U.S.), and together they have saved more than 240 billion "pins."

In the company's first quarter, revenue grew 18% year over year to $574.9 million -- in what CEO and co-founder Ben Silbermann referred to as "a challenging macroeconomic and geopolitical environment." He also noted that, "Pinterest made good progress in Q1 executing on our long-term strategy. We continued to scale our native content and creators ecosystem, began beta testing Your Shop, our personalized shopping surface, and released our new open Pinterest API so that any developer can build applications for Pinners, creators, merchants and advertisers." Much of the value in Pinterest is in its potential to monetize its sizable user base -- and the company is clearly working on that -- for example, developing ways to help users find and quickly buy items that interest them.

A big advantage for Pinterest is that it knows a lot about its members, as it can track what they look at, save, and follow. So it's able to offer sellers well qualified potential buyers. Pinterest's user base has shrunk a bit recently, causing investors to worry. Learn more about the company before investing in it -- if you think the shrinkage is a temporary thing, consider buying if the stock falls further. If not, move on to another company.

3. Walt Disney

Finally, there's Walt Disney (DIS -1.62%), which needs little introduction for most folks. But while you probably know a lot about the company, you may not appreciate just how many irons it has in various fires. There are the Disney theme parks, of course, but also Walt Disney Studios, Walt Disney Animation Studios, Pixar Animation Studios, Marvel Studios, 20th Century Studios, Searchlight Pictures, Lucasfilm, ABC TV, FX, National Geographic, ESPN, the Disney+ streaming service, and part of Hulu.

The stock has been hammered, down 43% recently from its 52-week high, but its prospects are certainly not 43% worse than they were some months ago. Indeed, in the company's second quarter, revenue grew by 23% year over year, with its "Parks, Experiences and

Products" division seeing revenue more than double. CEO Bob Chapek noted, "Our strong results in the second quarter, including fantastic performance at our domestic parks and continued growth of our streaming services -- with 7.9 million Disney+ subscribers added in the quarter [totaling a whopping 137.7 million] and total subscriptions across all our [direct-to-consumer] offerings exceeding 205 million -- once again proved that we are in a league of our own."

Some may be punishing Disney in light of Netflix's slowing growth and stock crash, but Disney has a lot going for it, including a slew of potential blockbuster films coming out this year and new technology and operational tools at its parks that can drive more revenue.

Disney is built to last, with many valuable franchises and a diverse set of revenue streams. The stock already looks attractive, with a price-to-sales and a forward-looking price-to-earnings (P/E) ratio well below five-year averages. If shares fall further, they will be only more attractive.

There are many solid and promising stocks that have fallen to attractive levels. Take a closer look at any that interest you, because bear markets are great times to be shopping for shares.