Founded in 2011, Chewy (CHWY 2.99%) started with a nearly impossible task: Go up against the retail and e-commerce giants of the world to create a niche marketplace for pet owners. I believe it's safe to say that the company officially succeeded against incredibly long odds.

Chewy will report completed financial results for 2023 on March 20, so investors don't know the final numbers yet. But the company is on pace to report around $11 billion in full-year net sales in 2023 -- and almost three-quarters of these sales are for consumable products such as pet food. Therefore, it's clearly taken market share from the entrenched incumbents over the past decade.

Chewy is taking market share in the pet industry for a variety of reasons. First, pet owners are increasingly shopping online -- this is the secular trend pushing sales growth forward. Second, this e-commerce platform offers automatic shipments on a schedule. And its customers seem to appreciate this feature, considering 75% of sales are from autoship customers. Third, it prides itself on customer service, which can help it stand out from the crowd.

What's most impressive for Chewy, however, is how the company has become profitable. The pet-food business is very competitive, and profit margins are consequently thin. Moreover, being a dedicated e-commerce platform comes with elevated expenses for shipping and logistics.

However, Chewy opened its first automated distribution center in 2020 and has since opened several more. The importance of its investment in automation can't be overstated.

The chart shows that the company's profit margins dramatically improved right as it flipped the automation switch.

CHWY Revenue (TTM) Chart

CHWY Revenue (TTM) data by YCharts

Chewy is a huge, profitable e-commerce platform for pet owners. And this is a huge part of the investment thesis for this stock. However, many investors may not know that it just started addressing an $11.5 billion market that's something else entirely. And it could hold the keys to the future of this business.

Chewy: the software company?

For years, Chewy's management has talked about the opportunity in pet health but from a business-to-consumer perspective. The platform already offers health solutions such as educational content, prescription medicines, telehealth services, and insurance.

But now, Chewy is focusing on pet health from a business-to-business perspective. Its target customer here is the estimated 30,000 veterinary clinics across the country.

At its investor day presentation in December, Chewy's management said it's launching operating-system software for vets called Rhapsody. This cloud-based software allows vets to manage their businesses with features such as scheduling, messaging, expenses tracking, task management, and more.

More than this, Chewy offers another software solution called Practice Hub. This integrates with Rhapsody or another management software so that vets can provide patients with the products they need. In other words, Practice Hub is just an e-commerce portal for vets so that they don't have to hold excessive inventory at their clinics. They can just place orders for what they need with Chewy through their existing management software.

The benefits of Chewy's shift toward software are easily apparent. It expands the company's addressable market by allowing it to focus on enterprise customers. And it potentially boosts its retail business as vets get onboard.

The president of Chewy's health division, Mita Malhotra, said the shift allows the company to "unlock the $11.5 billion in click product sales [total addressable market] that we don't participate in today and make us even more strategic to our already existing supply relationships."

Why all of this matters

In case anyone is wondering, when a company with $11 billion in sales unlocks an $11.5 billion opportunity, like Chewy did, it's a big deal. Growth from its software business could be quite meaningful if adoption takes off.

This is a big deal for investors today as well. As of this writing, Chewy stock has dropped to an all-time low (cheap) valuation. The chart shows the trend for the price-to-sales (P/S) ratio valuation.

CHWY PS Ratio Chart

CHWY PS Ratio data by YCharts

With this valuation, the market is either saying that Chewy won't grow, or it will fail to generate profits for shareholders. The market could even be saying both. But as I've pointed out, Chewy's software business could create a new recurring revenue stream, as well as catalyze growth for its e-commerce business.

Furthermore, growth for its e-commerce business could allow Chewy to grow its nascent digital advertising business, which is a high-margin opportunity.

Bigger scale for its retail operations is good for Chewy's profits, given its operational improvements from automation. And higher-margin opportunities such as advertising and software could also boost the bottom line.

In summary, the market could be totally wrong about Chewy because of its new enterprise software business. And that could easily make this a market-beating stock if the company succeeds.