Walmart’s grocery strategy has a missing piece: voice shopping. It is turning to Google to fill the gap.

Amazon customers can shop groceries from Whole Foods by calling out orders in their homes to their Echo devices, but Walmart customers have lacked that option.

Walmart doesn’t make its own smart device like Amazon, so it’s tapping Google Assistant, Google’s AI-powered voice assistant, which is available on more than a billion devices. The two companies announced a partnership on Tuesday that will allow Walmart shoppers to order groceries for pickup and home delivery through Google Assistant.

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.

Grocery wars: Under pressure, Amazon slashes prices at Whole Foods

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,” 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% 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% of Walmart shoppers already use curbside pickup, according to estimates from Cowen.