Salesforce (CRM 1.05%) and Veeva Systems (VEEV 1.02%) represent two very different ways to invest in the cloud-based customer relationship management (CRM) market. Salesforce, the largest cloud-based CRM company in the world, provides its services to a wide range of industries. Veeva, which was founded by Salesforce's former senior VP of technology Peter Gassner, only provides CRM services to life science companies.

Both companies also lock in their clients with additional cloud-based services. Salesforce offers additional tools for sales, marketing, analytics, and enterprise communications. Veeva provides other services for storing data, analyzing trends, and tracking the latest clinical trials and regulations.

Five people hold a cardboard cutout of a blue cloud.

Image source: Getty Images.

Both stocks closed at their all-time highs in 2021. But today Salesforce and Veeva trade about 40% and 50% below those levels, respectively. The bulls fled as their growth cooled off, the macro headwinds intensified, and rising interest rates drove investors away from tech stocks. But could either of these out-of-favor cloud stocks make a comeback this year?

Salesforce expects slower growth with healthier margins

Salesforce's revenue rose 18% to $31.35 billion in fiscal 2023 (which ended on Jan. 31), decelerating from its 25% growth in fiscal 2022 as its adjusted net income increased 12% to $5.22 billion. That slowdown was mainly caused by the challenging macro environment, which forced companies to rein in their spending on big cloud software deals, and was exacerbated by competitive and currency headwinds.

As Salesforce's growth cooled off, it struggled with an exodus of its top leaders, including its co-CEO Bret Taylor, chief strategy officer Gavin Patterson, chief marketing officer Stephanie Buscemi, Slack CEO Stewart Butterfield, and Tableau CEO Mark Nelson. It was also targeted by two activist funds that took multibillion-dollar stakes in the company. All that drama, along with Salesforce's abrupt decision to lay off 10% of its workforce earlier this year, raised red flags.

Salesforce expects that slowdown to continue with just 10% revenue growth this year, and it withdrew its previous long-term goal of generating at least $50 billion in annual revenue in fiscal 2026.

However, Salesforce's adjusted operating margin also expanded 380 basis points to 22.5% in fiscal 2023 as its adjusted EPS rose 10%. In fiscal 2024 it expects its adjusted operating margin to rise to 27% as its adjusted EPS grows another 36%. It's confident it can achieve that accelerating profit growth by aggressively cutting costs across all of its businesses. At $186 per share, Salesforce looks reasonably valued at 26 times its adjusted EPS forecast for fiscal 2024.

Veeva expects slower growth with lower near-term margins

Veeva's revenue rose 16% to $2.16 billion in fiscal 2023 (which also ended on Jan. 31), cooling from its 26% growth in fiscal 2022, as its adjusted net income grew 15% to $696 million. It blames that slowdown on macro headwinds, which drove its clients to rein in their spending on large projects, book larger R&D deals which took longer to recognize as revenue, and reductions to sales rep teams across the life sciences sector. A strong dollar also curbed its overseas growth.

Unlike Salesforce, Veeva didn't announce any layoffs, struggle with an exodus of top executives, or attract the interest of hungry activist investors. In its latest prepared remarks, CEO Peter Gassner said that Veeva "always operated" with a "disciplined, long-term approach to investing in the right people and the right markets for profitable growth and not swinging to extremes in difficult times or boom times." In contrast, Salesforce CEO Marc Benioff recently admitted his company had "hired too many people leading into this economic downturn" in a letter to its employees.

Veeva expects its revenue to only rise 9%-10% in fiscal 2024, for its adjusted operating margin to decline from 38.5% to about 34%, and for its adjusted EPS to grow by about 1%. Therefore, Veeva is also bracing for tough headwinds this year, but it will continue to invest in its long-term growth instead of fretting over its near-term profits. It also expects its growth to accelerate again in fiscal 2025. But at $180 per share, Veeva still trades at 42 times its adjusted EPS forecast for fiscal 2024.

The better buy: Salesforce

Salesforce isn't as disciplined as Veeva, but I believe it's a better buy because it's larger and more diversified and its margins are expanding. Its stock is also reasonably valued relative to its near-term growth. Veeva is still a promising long-term investment, but it's too expensive compared to Salesforce and other comparable cloud-based stocks. Its prospects might brighten if its revenue growth stabilizes and its operating margins improve, but it will likely underperform Salesforce this year.