Amazon.com (AMZN -2.56%) passed up an opportunity to highlight its grocery delivery service when it failed to use its Prime Day extravaganza to promote the benefit.

The two-day sale was a huge success, and Amazon included Whole Foods Market again so that Prime members could save while shopping at the supermarket. But Walmart (WMT 0.46%) should still be able to differentiate itself from the e-commerce leader based on its delivery service.

Instead of trying to be Amazon-lite by becoming yet another online shopping website, Walmart should focus on groceries because they are in its wheelhouse, and prioritizing them plays to its strengths.

Walmart employee delivering groceries via truck

Image source: Walmart.

Costly e-commerce growth

Walmart is expected to lose $1 billion on its U.S. e-commerce business this year on as much as $22 billion in revenue, according to Recode. It is supposedly creating tensions within the company between the team under Marc Lore, the founder of online shopping site Jet.com that Walmart purchased several years ago for $3.3 billion, and those running the more analog portions of the business.

Walmart is reportedly considering all options, including the sale of some online assets that it purchased relatively recently, like ModCloth and Bonobos. The latter was said to have already been shopped around, but Walmart ultimately decided against it.

It just folded Jet.com into the larger Walmart business, no longer having it serve as a separate unit. And for all the attention Walmart's digital efforts receive, particularly as they relate to Amazon, most of the $514 billion in sales that it generated last year came from its brick-and-mortar stores. Those physical locations also just posted their best same-store sales growth in nine years with comps hitting 3.4% in the first quarter.

A bridge too far

There is a purpose to Walmart's e-commerce business beyond just generating profits, though that is obviously the goal. Getting consumers to shop its platform helps draw them into its stores, which generates additional sales. Its traditional store-based business allows it to underwrite the growth of its e-commerce site, much as Amazon uses the profits from its web services division to finance its unprofitable global retail operations.

So if there is a worthy rival to Amazon in e-commerce, it is Walmart, even if it badly trails its rival in total online retail sales. Amazon accounts for 37.7% of all online sales, according to eMarketer, while No. 2 Walmart has just a 4.7% share. This yawning chasm suggests that -- instead of trying to be Amazon's equal -- Walmart would be better served by becoming the biggest and best online grocer. Staying in its lane by concentrating most of its efforts on groceries might just be how it beats Amazon, regardless of its other digital efforts.

Playing to its strengths

Walmart has a sprawling physical presence that it can use to its advantage. CEO Doug McMillon recognizes this, recently telling a conference sponsored by Fortune, "When you have a store environment and you have fresh or perishable food so close to people, those stores then become dual store and pick centers." Pick centers, according to the Fortune article, are where online orders are filled for delivery or pickup. McMillon told the conference that the majority of Walmart's 4,500 stores "function in that way, and that's an advantage for us." 

And because Walmart knows groceries best, a strategy that focuses on them would be closely linked with the stores, its greatest asset.

The retailer has 3,100 stores that offer grocery pickup, including innovations like towers where customers can collect their online grocery orders. More than half of the stores will offer same-day delivery by the end of the year. Walmart is also trying a new delivery service that puts customers' fresh food orders into their refrigerators. And it is investing in automated order fulfillment and driverless delivery technology.

Leveraging these assets gives it superiority in groceries versus Amazon, which will likely have to partner with other retailers if it hopes to have anywhere near the same physical footprint as Walmart. By putting food ahead of its other online ambitions, Walmart can beat Amazon.com at the e-commerce grocery game.