Check out the latest Kroger and Microsoft earnings call transcripts.

Kroger (KR 0.19%) recently partnered with Microsoft (MSFT 0.48%) to test out two data-driven connected stores. The two renovated stores will use a smart retail system powered by Internet of Things (IoT) sensors and digital shelves, which display prices, promotions, and nutritional information on screens in front of products. Kroger introduced the shelves, which are already being used in nearly 100 stores, last year. The test stores will help guide shoppers through the aisles to the products they want to buy.

All those devices will be tethered to Microsoft's cloud platform Azure, which is already Kroger's preferred cloud platform. Microsoft and Kroger will also jointly market a commercial retail as a service (RaaS) product to the grocer's industry peers.

A smart retail display in a supermarket.

Image source: Getty Images.

Microsoft CEO Satya Nadella stated that the partnership "brings together Kroger's world-class expertise in the grocery industry with the power of Azure and Azure AI." Nadella claimed that the partnership would "redefine the shopping experience for millions of customers at both Kroger and other retailers around the world" and set a "new standard for innovation in the industry."

Kroger CEO Rodney McMullen claims that the partnership will aid Kroger's efforts to build "a seamless ecosystem driven by data and technology" to provide its customers with "personalized food inspiration." McMullen also stated that Kroger was "excited to collaborate with Microsoft to redefine grocery retail."

Why Kroger needs Microsoft

Kroger has felt pressure from superstores like Walmart (NYSE: WMT) and warehouse retailers like Costco (NASDAQ: COST) in recent years. Amazon's (NASDAQ: AMZN) acquisition of Whole Foods in 2017 and its expansion into online groceries also represented a major threat to Kroger's business.

To counter those headwinds, Kroger launched its three-year "Restock Kroger" turnaround plan in late 2017, which leveraged data analytics to optimize its prices and products, expanded its lineup of private label brands, and tethered more services to its digital ecosystem.

Those digital efforts -- which include the pickup service ClickList, the direct-to-consumer shipping platform Ship, partnerships with courier services like Instacart, and an investment in British online grocer Ocado -- boosted Kroger's digital revenues by 60% annually during the third quarter. It even started testing out fully driverless delivery vehicles last year.

A man shops for groceries.

Image source: Getty Images.

All of Kroger's data needed to be processed on a cloud platform, and Microsoft's Azure was the natural choice since partnering with Azure's larger rival, Amazon Web Services (AWS), would support the growth of Amazon's marketplace. Other retailers burned by Amazon -- including Walmart, Costco, and Walgreens -- also turned to Azure instead of AWS.

Trading short-term pain for long-term growth

Many of Kroger's Restock efforts are causing its near-term operating expenses to rise. But over the long term, they should reduce its operating expenses as its automation and analytics efforts reduce its dependence on human employees.

That's why Kroger's two pilot stores are extensions of its Restock program. The IoT sensors can gather shopping data from customers, and the digital shelves can quickly adjust their prices and promotions based on real-time data. Those technologies could help Kroger and Microsoft eventually launch a cashierless store -- which the latter is already developing for Walmart.

Kroger's Restock efforts and its partnership with Microsoft could widen it moat against Amazon, which is still struggling to convince its Prime users to buy groceries online. The number of Amazon Prime members who bought groceries online at least once a month fell from 2017 to 2018, according to UBS analysts, which was surprising, since Amazon aggressively expanded Whole Foods' two-hour delivery services over the past year.

A win-win partnership

The future looked bleak for Kroger after Amazon acquired Whole Foods. However, its sales growth stabilized over the past year, and it wisely upgraded its technology to remain competitive. Kroger hasn't pulled off an impressive digital turnaround like Walmart yet, but Microsoft could tilt the scales in its favor.

Deeper ties with Kroger should also help Microsoft compete against Amazon in the cloud platform market, where the two market leaders are still drawing battle lines across multiple industries. It could also help Microsoft remain the preferred cloud provider for any brick-and-mortar retailer that wants to see Amazon bleed.