Find a Job


Back to list


ML-powered Demand Forecasting Solution

Blue Bottle Coffee is committed to providing a connection between people and delicious coffee. Their network of cafes stretches across the United States and Asia, and they are dedicated to making life more beautiful through the enjoyment of a high-quality cup of coffee.


Blue Bottle Coffee, a prominent presence within the third-wave coffee scene, sought to refine their approach to the sale of pastries such as croissants, cookies, and waffles in their chain of cafes.

In the past, the cafe leaders of Blue Bottle were responsible for ordering pastries multiple times a week in order to ensure that customers could always acquire a plentiful and recent supply. To meet the requirements of the upcoming week, they made estimations based on data from prior sales, existing stock, and forecasts of development.

When Blue Bottle had only a few cafes located in the Bay Area, the manual ordering system worked well. However, as their presence grew to more than 70 cafes around the world, it became clear that a more efficient and reliable solution was needed in order to accurately predict future pastry requirements.

Inaccurate orders could lead to pastries either prematurely selling out if under-ordered or contributing to waste if over-ordered.

  • Underordering left some of Blue Bottle’s customers unhappy, increasing churn.
  • Overordering contributed to food waste and resulted in loss of profit.
  • Suboptimal utilization of pastry undermined Blue Bottle’s bottom line.

Blue Bottle Coffee has collaborated with Provectus to create a demand forecasting system. This is intended to enhance the accuracy of pastry orders, reduce food waste and help Blue Bottle Coffee to achieve its sustainability objectives.


Provectus proposed building a demand forecasting solution for Blue Bottle, powered by AI and ML, that could generate accurate pastry ordering forecasts by assessing historical sales data, current inventory, and growth projections.

To ensure the success of the project, Provectus partnered closely with Blue Bottle’s engineering team to review and enhance their machine learning models, and also accessed the data that was intended to be used to train the model in order to improve training efficiency, increase ordering accuracy on new data, and reduce bias.

In addition, Provectus orchestrated computational workflows and data processing pipelines to facilitate faster and more efficient data/ML manipulations in the system. To make it easier for Blue Bottle’s engineers to work with the system, they also developed a library of call methods to help them prepare data, train models, and generate forecasts.

A new prediction ordering system consisting of three pipelines was built from scratch:

  1. Model Data Pipeline — to migrate data from Amazon Redshift to Amazon S3
  2. Training Pipeline — to train, enhance, and store the best performing demand forecasting models in Amazon S3
  3. Forecasting Pipeline — to generate demand predictions by using data stored in Amazon S3 and to push prediction results to Amazon S3 and Amazon RDS for reporting

Blue Bottle Coffee has implemented an ecosystem where ML models are trained and predictions are generated using Amazon SageMaker Training and Amazon SageMaker Batch Transform. Data is uploaded to Amazon S3 by cafe leaders on a weekly basis.

Additionally, the team of developers at Blue Bottle Coffee has a separate Model Development Pipeline to evaluate, compare, and select the best performing ML models for deployment with Amazon SageMaker. The user-friendly UI allows developers to continually improve the accuracy of the predictions, and enables cafe leaders to view the demand forecasts and make manual edits if needed.

Provectus has created a predictive ordering system which has assisted Blue Bottle in correctly forecasting pastry demand, which is beneficial to their zero waste objectives and financial bottom line.


Blue Bottle Coffee has received a ML-powered demand forecasting solution to generate more accurate order predictions for pastries. This resulted in an 8% improvement in pastry ordering accuracy in July compared to the previous month.

The predictive ordering system enables cafe leaders to quickly access the latest demand suggestions and order predictions, eliminating the need to manually estimate the number of pastries to order for a given day or week.

This system has allowed Blue Bottle to accurately forecast demand, reduce overstock waste, and improve food utilization – all to help the company to save costs, reduce their ecological footprint, and keep customers satisfied. Ultimately, the predictive ordering system has helped Blue Bottle to grow by spending less and paving the way for further growth in new markets.

How much did you like this article?

You might like


Data Platform for Real-Time Analytics

Learn more arrow


Automated Fraud Detection Using AI

Learn more arrow


IDP Platform for BI & Analytics

Learn more arrow

Back to list

Find your next job at Provectus

If you dream of working with cutting-edge technologies that drive positive change on a global scale and want to contribute to open source projects, we'd love to hear from you!