Festival Demand Forecasting Automation and a Bakery Festival Sales Forecast

Festival Demand Forecasting Automation and a Bakery Festival Sales Forecast

Festival Demand Forecasting Automation for Sweet Shops and Bakeries

Every festival, a sweet shop makes one of two mistakes: trays of leftover sweets on the day after, or an empty counter by evening while customers walk out. Both come from guessing. Festival demand forecasting automation replaces the guess with the shop’s own past sales, lined up the right way, and sends a production plan to the owner ten days before each festival for approval.

Line up festivals by day offset, not by date

Festivals move on the calendar every year, so comparing the same calendar date across years compares the wrong days. The fix is to count days from the festival itself. The day of the festival is offset 0, the day before is −1, two days before is −2, and so on.

day offset = (sale date − festival date) in days

Now “three days before the festival” means the same thing every year, whatever the date. For a big festival I look at a window from 5 days before to 1 day after. Shorter festivals use 3 days before to 1 day after, and bakeries usually only need about 2 days before up to the festival day.

Four tabs the shop keeps

Daily Sales has one row per item per day: Date, Item, Quantity Sold, Leftover at closing, Sold Out Time, and an Estimated flag for old rows filled from memory or notebooks. Festival Calendar is filled once a year with Festival, Date, Days Before and Days After. Pre-Orders records Customer, Item, Quantity and Pickup Date. Production Plan is written by the automation: Item, Date, Planned quantity and the raw material needed.

The most important column is Sold Out Time. Without it, the history only shows what the shop had, not what customers wanted.

Correcting for sold-out days

If an item sold out at 5 pm, the real demand was higher than the quantity sold. The automation estimates it from the hours the item was actually on the counter:

  • Open hours = closing time − opening time
  • Sold hours = sold-out time − opening time
  • Corrected demand = quantity sold × (open hours ÷ sold hours) × 0.8

Example, with illustrative numbers: a shop open from 8 am to 9 pm has 13 open hours. An item that sold 90 kg and ran out at 5 pm was on sale for 9 hours. Corrected demand = 90 × 13 ÷ 9 × 0.8 = 104 kg. The 0.8 keeps the estimate cautious, because evening sales are rarely as strong as afternoon sales.

Rows marked Estimated count at half weight, so remembered numbers never outweigh real ones.

From history to this year’s plan

For each item and each day offset, the automation takes the weighted average of the last two years. It then applies a growth factor, which compares this year’s normal weeks with last year’s normal weeks for the same item, so a shop that has grown 15% plans 15% more.

Last comes a buffer that depends on shelf life:

Item typeBuffer
Long-life sweets, such as dry fruit barfi10%
Cakes and bread5%
Fresh cream items and anything that spoils within a day0%

Anything that spoils the same day gets no buffer at all. Pre-orders cover those instead.

Pre-orders change the plan as they arrive

Pre-orders are the clearest signal a shop gets. When bookings for an item and pickup day reach 70% of the planned quantity, the plan is raised:

new planned = planned × 0.6 + booked, rounded up

The 0.6 is the share of festival sales that walks in without booking. It differs per shop and is learnt by comparing the Pre-Orders tab with Daily Sales after each festival. For example, if 50 kg is planned and 36 kg is already booked, the new plan is 50 × 0.6 + 36 = 66 kg, and the kitchen gets an alert at once.

How the n8n workflow runs

A Schedule Trigger runs every morning at 6 am. It reads the Festival Calendar and continues only when a festival is exactly ten days away. It then reads Daily Sales for the same festival in the previous two years within the festival window, and two Code nodes do the work above: one lines rows up by day offset and corrects sold-out days and estimated rows, the other applies growth and buffers.

An AI step reads the free-text Notes tab, for example a road closure or a new competitor nearby, and may suggest a change only when it can quote a written reason from those notes. With empty notes, it suggests nothing. The plan then goes to the owner on Telegram with Approve, Edit and Reject buttons and a confidence label. Approved quantities are written to Production Plan with the raw material for each tray, using the same per-batch recipe amounts as bakery recipe scaling with baker’s percentage. A separate trigger watches the Pre-Orders tab for the 70% rule.

Every Google Sheets step retries three times with a five-second wait, and an error workflow sends the owner a Telegram alert if anything fails. When a shop has only one year of history, the plan is marked Low Confidence and the buffer is raised slightly. The n8n documentation covers the Schedule, Telegram and AI Agent nodes used here.

Back-test before trusting it

Before using the forecast live, run it as if it were ten days before a festival that has already happened, using only the data that existed then, and compare the plan with what actually sold. I run this on at least two past festivals. The usual fixes after back-testing are setting the buffer on fresh cream items to zero and making sure office gift-box bookings are entered in Pre-Orders, because they are the easiest orders to miss.

Mistakes that break the forecast

  • Comparing calendar dates instead of day offsets.
  • Leaving Sold Out Time empty, so every sold-out day looks like low demand.
  • Using production quantities as demand, which repeats last year’s overproduction.
  • Adding buffers to items that spoil the same day.
  • Ignoring pre-orders until the festival morning.
  • Letting the AI step change quantities without a written reason.
  • Skipping the leftover entry after the festival, which is the data next year depends on.

Which platform, and what it costs

n8n and Activepieces can both be self-hosted for free, with a small charge only for the AI step. Make and Zapier can run the same flow but bill by operations or tasks. A shop that wants zero cost can use Google Sheets with Apps Script: a daily time trigger, a Day Offset column, a pivot table by item and offset, and an email when a festival is ten days away, without the AI step.

The festival rush also brings its own risks, so it is worth knowing how to check a fake UPI payment screenshot before handing over large orders. Shops that already plan around a local festival calendar will find most of the inputs are already in place, and the same production plan can feed menu costing so festival prices are set on real costs.

The one number to start writing down today is the sold-out time of every item. Even a shop that is not ready for automation will have a far better forecast next year because of it.

Radha Krishna

I am Radhakrishna, Founder and lead author at UpcomingTools.com, where I write Business Guides and Automation Guides for low investment automation in India. With 3 to 5 years offline experience serving small businesses only through trust and referrals, I now build software only workflows for lead follow up, bookings, quotes, stock, invoices and reporting and fix failed runs, expired tokens and unsafe AI and RAG answers. Every guide and workflow is written and decided by me, personally checked and live tested before publishing. I build in your own accounts on live, so your keys stay yours, show a rough demo before build and give 3 to 6 months free support with free tool help and ZERO SERVICE CHARGE for eligible starters.

1 Comment

    […] festival orders are where scaling matters most, so it pairs well with a festival demand forecast made a few weeks ahead. Home bakers selling regularly should also have their FSSAI registration in […]

Leave a Comment

UpcomingTools logo - Nation First, Build The Best, Pass The Test