Veeva Systems (VEEV -0.29%) and Salesforce.com (CRM -0.18%) have both achieved tremendous success marketing customer relationship management (CRM) systems. Veeva and Salesforce don't compete against each other in the marketplace very much. In fact, the two companies are partners (Veeva's system is built on Salesforce's platform) with an agreement that prohibits Salesforce from going after pharmaceutical and biotech companies that are Veeva's target customer base.

However, Veeva and Salesforce do battle each other in one way: by competing for investors' limited dollars. So far in 2017, Veeva stock appears to be winning that battle. Its stock is up nearly 60%, while Salesforce shares have risen more than 30%. Which of these two stocks is the better pick for long-term investors now? Here's how Veeva Systems and Salesforce compare. 

2 doors with 1 open

Image source: Getty Images.

The case for Veeva Systems

Everything seems to be going right for Veeva these days. The company reported spectacular first-quarter results, with revenue up 32% year over year to $157.9 million. Earnings soared 188% over the prior-year period to $36 million. Veeva handily beat its guidance and Wall Street analysts' estimates.

The good times should keep on rolling. Veeva provided guidance for the second-quarter and full-year 2017 that projects continued solid growth. Big drugmakers keep on buying the company's systems. Veeva announced that a "top 20 pharmaceutical company" recently decided to go with the full Veeva Vault regulatory information management (RIM) suite and Veeva Vault QualityDocs as enterprisewide standards.

Existing customers are also increasing the number of Veeva applications that they use. Veeva stated that the number of customers in the first quarter using multiple Vault products grew 70% compared to the prior-year period. Attracting new customers plus making current customers happy enough to want more is a surefire recipe for success.

And while Veeva and Salesforce haven't competed much against each other, that could be about to change. Veeva recently announced that it won a large packaged-goods customer. Expanding beyond life sciences is an important growth opportunity for the company.

Wall Street analysts think that Veeva's growth rate will slow down in the next few years. However, they project that slowdown will be to "only" 22% annual earnings growth. That's the kind of growth that many investors would drool over. Even though Veeva stock recently hit an all-time high, I suspect the company's great prospects will drive shares even higher.  

The case for Salesforce

Most of the positives for Veeva also apply to Salesforce. The company posted impressive results in the first quarter as well, with revenue up 25% year over year to $2.39 billion. It beat consensus analysts' earnings estimates. Salesforce even bumped its full-year revenue guidance up by $100 million.

To say that Salesforce dominates the CRM market is an understatement. The company expanded its market share last year by a greater percentage than the other top 10 CRM vendors combined. Salesforce is No. 1 in worldwide market share for CRM systems, sales applications, customer service applications, and marketing applications.

Salesforce.com headquarters

Image source: Salesforce.com.

This dominance seems likely to continue. Salesforce retains its customers pretty well for a software-as-a-service provider. The company's revenue that has been booked from contracts but not earned yet increased 26% in the first quarter, indicating that Salesforce has plenty of customers awaiting implementation. 

Like Veeva Systems, Salesforce stock is trading at all-time high levels. Wall Street analysts project that the company will be able to grow earnings by 28% annually over the next few years. 

Better buy

There's a lot to like about both of these high-flying CRM stocks. However, if I had to pick only one, I'd go with Salesforce. As I mentioned earlier, I think Veeva stock can continue its remarkable run. My decision, though, came down to valuation versus growth prospects.

Veeva shares currently trade at nearly 66 times expected earnings, while Salesforce stock trades at 54 times expected earnings. I agree with the Wall Street consensus that Salesforce's growth prospects are a little better than Veeva's. Because of its lower (although still pricey) valuation and greater growth prospects, Salesforce gets the nod as the better buy.