Starting later this month, voice shopping for pickup will be available at more than 2,100 Walmart stores and online delivery at more than 800 Walmart stores. Walmart customers’ purchase histories will be linked to Google Assistant, so the assistant will know which type of products customers prefer.

The tie-up with Google gives Walmart a better chance to win over customers who buy groceries through voice assistants. Although voice shopping makes up a tiny fraction of retail spending today, analysts expect it to become more popular in the coming years. And Walmart does not want to get left behind.

“We continue to innovate for the future and look to technology,” said Tom Ward, senior vice president of digital operations at Walmart US.

Walmart also plans to expand voice shopping to other platforms beyond Google in the future.

But Walmart will still trail Amazon in the voice shopping race. Amazon’s Echo accounts for more than 60 percent of smart speaker sales, according to a study last year by market research firm eMarketer.

It’s Walmart’s latest move to protect groceries, its biggest weapon in its fight against Amazon.

Groceries make up more than half of Walmart’s annual sales and push customers to make frequent trips to stores. Over the past few years, Walmart has invested billions of dollars to offer shoppers the option to order groceries online and pick them up from stores, or have them delivered to their home.

Those efforts have been widely successful: Around 13 percent of Walmart shoppers already use curbside pickup, according to estimates from Cowen.