Starbucks is going to start using artificial intelligence (AI), rolling out a new cloud-based program called Digital Flywheel to its mobile app in the Autumn.

It’s meant to analyse what Starbucks’ loyalty members buy to predict what they’re likely to buy in the future.

It will make suggestions based on history of mobile ordering, weather conditions, time of the day and week, and if it’s your birthday.

Starbucks also hopes it will mean people make more impulse purchases.

The increase in people using their phone to order online has triggered a trend of using AI and customer data and will grow as businesses automate how people order coffee.

But can AI always — or ever — make the right guess?

Starbucks’ AI program heavily relies on calculating probability of choices based on order history as well as occasions and temperature.

For example, people are more likely to choose coffee Monday morning, but hot chocolate on a cold, rainy day.

However, it is questionable whether people would always stick to their previous choices when it comes to coffee.

Last year GlobalData research found that 34 percent of people often try different varieties of coffee; rising to 37 percent for Starbuck’s key demographic, millennials.

Millennials are also more likely to want to experiment with new and unusual flavors, according to a recent GlobalData survey.

While people are hard to predict, the real benefit of the program is not about getting them to like Starbucks more because it makes matching suggestions of what they have in mind.

It is about adding fun and a tech edge to the brand — and you can be sure this will only be the beginning for Starbucks.

It will not take long before a robot barista is smart enough to serve a drink that consumers are going to buy, before they even place the order.