What happened

Salesforce (CRM -0.18%) shareholders beat the market this week as the stock gained 14% through Thursday trading compared to a 0.5% increase in the S&P 500, according to data provided by S&P Global Market Intelligence. The boost erased some of the software giant's recent losses, but shares remain lower by about 25% so far in 2022.

The rally was powered by a positive earnings update, which convinced many investors that Salesforce is on a bullish growth path.

A person in an office looks at a laptop.

Image source: Getty Images.

So what

Salesforce announced on Tuesday that revenue reached $7.41 billion in the selling period that ended in late April. That translated into a 24% sales spike, which beat most investors' expectations.

Salesforce is seeing solid demand from enterprises that are shifting more parts of their businesses to a cloud services platform.

Salesforce also reported a 14% increase in operating cash flow, which is a key growth metric for cloud services businesses.

Now what

Investors were even more excited to hear Salesforce's brighter outlook for 2022 and beyond. Management raised its sales and earnings forecasts this week while targeting improving profitability and cash flow trends.

There's more clarity around those financial targets, too, given that Salesforce has a large volume of contracted, but not yet billed, sales. Co-CEO Marc Benioff said this $42 billion backlog demonstrates "our resilience and the momentum in our business."

Salesforce isn't generating huge profits today. Operating income was barely positive this quarter. But the strong growth trends, plus management's commitment to increasing operating margin, suggests earnings will soon follow cash flow higher.

If that happens, the stock might continue rebounding from its lows and outperforming the market over the long term.