Loyal drinkers of Cherry Sprite have robots to thank for their favorite sugary concoction.

For years, Coca-Cola has invested in AI technology in hopes it would give the company a better idea of what its customers want. It’s currently exploring an AI-powered virtual assistant—think Apple’s Siri and Google’s Alexa—to interact with people at certain vending machines, according to Forbes. In the case of Cherry Sprite, a high-tech vending machine wound up convincing executives to make an entirely new product.

During an April 2017 call with investors, CEO James Quincey said the company was using self-serve vending machines to track which combinations were most popular. If any stood out, the people at Coke would consider its market potential. The “Freestyle” machines allow people to mix-and-match flavors to create more than 150 sparkling and still beverages. The company says there are more than 40,000 Freestyle units in the US, together serving 14 million drinks each day.

“As a consequence, during the quarter we began bottling Sprite Cherry and Sprite Cherry Zero as the first national launch of new beverages in response to their popularity,” Quincey said.

Connecting with consumers to drive the creation of new products is a glimmer of light during a time when soft drink companies such as Coca-Cola and PepsiCo are facing an intense backlash to sugar. In America, soda consumption has been in decline for years—so much that sales of bottle water have eclipsed it.

Moving forward, Coca-Cola anticipates using artificial intelligence in ways expected to go well beyond vending machines. For example, right now the soft drink company depends on ad creatives to develop product narratives and storylines. But Coca-Cola is now exploring whether, by mining social media and consumer data, an AI bot could also create ads.