How Lowe’s is finally emerging as a strong e-commerce player

Lowe’s has spent decades helping customers make repairs to their homes. Now it’s successfully carrying out its own fix-up job: its e-commerce business.

The retailer had a blowout first quarter, helped by outside factors such as the COVID-19 outbreak prompting people to buy new appliances like freezers and make repairs and renovations like installing decks and repainting their homes since they were going to be spending so much more time there.

In the quarter ending May 1, comparable sales at Lowe’s U.S. stores rose a staggering 12.3%, giving it rare bragging rights of having bested its arch-rival Home Depot, where they were up 7.5%.

But Lowe’s strong numbers didn’t just stem from a favorable macro environment. The single biggest factor helping Lowe’s take advantage of the surge in home improvement spending was an e-commerce operation that is far better than it was last year. That is helping it begin to narrow the gap with Home Depot, which is the fourth largest online retailer in the U.S. with annual digital sales of about $10 billion.

In the quarter, Lowe’s online sales grew 80% (including a 150% surge last month), something chief executive Marvin Ellison says is the result of more than a year of big investments to bring Lowe’s e-commerce up to par with other major retailers.

The improvements have included better search capability, more stability, and better interaction with employees’ hand-held devices so they can tell customers in real-time on the store floor if something is in stock or online. And most crucially, it has allowed Lowe’s to offer curbside pickup of online orders, critical at a time when many shoppers are reluctant to go into stores, at least for an extended period of time. Lowe’s was not set up for that service prior to the pandemic, but the company got it up and running within days.

“That would have been impossible a year ago because we did not have the IT [information technology] infrastructure nor the mobile devices in the store,” Ellison tells Fortune. In recent quarters, Lowe’s online sales were growing at the same rate as store sales, far from the surge other retailers were seeing, notably Home Depot.

But Ellison, who became CEO two years ago after a few years at the helm of J.C. Penney, made fixing Lowe’s e-commerce a top priority, a move that has proved prescient given the pandemic.

Another way the more robust e-commerce will help Lowe’s in the near future: reducing how much merchandise it puts in stores, notably slower selling items, and selling them online instead to facilitate social distance. “We can push a lot more SKU’s [shelf-keeping units, or items] online more quickly,” he says. “With our current process, it takes too long to load product online. I want it to take minutes and hours, not days and weeks.”

Until recently, basic features like giving customers the ability to schedule a delivery in a narrow time window hadn’t been available. Lowe’s was set to be done with “re-platforming” its e-commerce site in the second quarter, but the company accelerated the improvements when the outbreak hit the U.S.

Lowe’s saw strong demand in the quarter for COVID-related items such as cleaning supplies and appliances like refrigerators and freezers. Kitchen and bath renovations lagged since people were more hesitant to invite people into their homes. 

It also benefitted from being more rural than Home Depot: Some 25% of Lowe’s stores are in rural markets, while business in cities was much more affected by the lockdowns.

As things inch toward normalization, Lowe’s knows that cleanliness and spaciousness will be essential to winning customers’ business. For instance, in its garden centers, which are large and a big draw for customers, it has removed some shelving and certain products to make it easier to get around and not bump into others. And Lowe’s has reduced business hours to allow for more frequent and thorough cleaning.

“Retailers adhering to cleanliness is going to be a determining factor for customers on where they go to show,” says Ellison.

More must-read retail coverage from Fortune: