1. Home
  2. Blog
  3. AI & digital
AI & digital

AI for stock and demand forecasting in retail and F&B

Too much stock ties up your cash and ends up in the bin; too little sends customers next door. Here is what AI forecasting changes for a Malaysian shop or café, what it costs, and how to start.

By the HumbleBear team · · 8 min read

Cover: AI for stock and demand forecasting in retail and F&B
Short answer

AI can forecast how much of each item you will sell by learning from your past sales: busy days, payday, rainy weeks and festive seasons like Raya and Chinese New Year. You order closer to real demand, so less stock is wasted or left on the shelf, best-sellers run out less, and more cash stays in the bank.

A bakery in Kuantan throws away 30 loaves on a rainy Monday, then sells out of its best-selling buns by 11am on Saturday. A mini market in Kluang still has RM8,000 of festive biscuit tins on the shelf three weeks after Hari Raya. Neither owner is careless. Both are ordering from memory and gut feel, which works until the business grows past what one person can keep in their head.

If that sounds like your shop, AI demand forecasting is one of the most direct ways AI pays for itself: every tray you don't throw away and every tin you don't overstock is cash you keep. This guide is written for the owner deciding whether it's worth doing, and how to start.

What does AI forecasting change for your shop or outlet?

It replaces "order roughly what we ordered last week" with a number for each item, based on how that item actually sells. AI looks at your past sales item by item and finds the patterns behind them: which days are busy, how month-end payday lifts spending, how rain changes walk-in trade, and how sales climb before festive seasons. It then projects those patterns forward into next week's order.

What you get out of it as the owner:

  • Less waste. Bread, kuih, vegetables and dairy ordered closer to what will actually sell.
  • Fewer empty shelves. Your best-sellers stay in stock on Saturday morning, so customers don't walk next door.
  • More cash on hand. Less money sitting in slow stock, more available for wages, rent and suppliers.
  • Faster ordering. Your supervisor checks a suggested order instead of counting and guessing, so ordering takes 15 minutes instead of an hour.

Which items should you start with?

Start with your steady sellers: the items you sell most days and reorder every week. That's where patterns are clearest and where the ringgit adds up fastest.

Start hereHandle these by hand for now
Steady sellers: bread, milk, rice, drinks, cleaning suppliesBrand-new products with no sales history yet
Items sold most daysItems sold a few times a year
Perishables you often throw awayOne-off bulk orders and events
Items with clear weekly or festive patternsItems on heavy promotion this month

For most shops and cafés, 20 items make up the bulk of sales and waste. Forecast those first.

What sales records do you need?

You need at least 12 months of sales by item and by day, plus a note of when items ran out and what was thrown away. With a full year, the forecast has seen each of your festive seasons once.

RecordWhy it helpsWhere you probably have it
Daily sales per item, 12 months or moreThe pattern the forecast is built fromYour POS system or sales invoices
When items ran outShows demand you missedA simple log your staff keep at the counter
Waste and spoilageShows where you over-orderA waste sheet at closing time
Supplier lead timesHow far ahead you must orderPurchase orders and delivery dates
Holidays and school termsMoves demand by weekPublic holiday and school calendars

The sold-out log is the record most shops don't keep, and it's worth starting this week. If your nasi lemak sold out at 10am every day last month, the sales report shows 80 packs, but customers might have wanted 120. Once the forecast knows when you ran out, it can tell you to make more.

How does AI handle Raya, Chinese New Year and Deepavali?

It handles them well once you tell it which weeks were festive weeks, because Malaysian festive seasons move around the calendar each year. Hari Raya Aidilfitri falls about 10 to 11 days earlier each year; Chinese New Year lands between late January and mid-February; Deepavali also moves. A plain "same month last year" comparison gets all of them wrong; a forecast that lines up "two weeks before Raya" with "two weeks before Raya" gets them right.

How to get the most from it:

  • Mark festive weeks by event. Most forecasting tools accept an event calendar; enter Ramadan, Raya, CNY, Deepavali and your local events.
  • Plan Ramadan as its own pattern. A café may see quiet lunches and busy buka puasa takeaways for a month.
  • Use school holidays and payday. A Johor Bahru convenience store near a school sees sales drop in the holidays; many shops see spending rise at month-end.
  • Plan the run-down as well as the build-up. Order the last festive batch smaller and plan your markdowns early. That alone would have saved the Kluang mini market most of its RM8,000.

How do you turn a forecast into an order?

Order enough to cover forecast demand until your next delivery arrives, plus a small buffer, minus what you already have and what's already on the way. AI gives you the demand number; the arithmetic is simple enough to check on a calculator.

Order quantity = forecast demand over (lead time + days until next order) + buffer − stock on hand − stock already ordered

Example: A café in Johor Bahru uses fresh milk. The forecast is 18 litres a day. The supplier delivers 2 days after ordering, and the café orders once a week, so it needs cover for 9 days: 9 × 18 = 162 litres. It keeps a buffer of about 20% of a week's use, around 25 litres. It has 40 litres on hand and nothing on order.

162 + 25 − 40 = 147 litres to order

For perishables, cap the order at what you can sell before it expires.

What does it cost, and how fast does it pay back?

For a single outlet, the saving usually comes from three places: less waste, fewer lost sales, and less cash tied up in stock. Measure all three on your top 20 items for eight weeks, comparing the AI forecast with how you ordered before.

Example (illustrative figures): A bakery-café in Penang trials AI forecasting on 20 items for eight weeks.

What changedBeforeAfterWorth per month
Waste on bread and pastry9% of what it buys6%about RM450
Days its top 3 items sold outabout 8 a monthabout 3about RM300 in extra sales margin
Supervisor's ordering time5 hours a week1.5 hours a weekabout 15 hours, or RM300 at RM20 an hour

That's roughly RM1,050 a month. If the forecasting feature or add-on costs, say, RM150 to RM300 a month, it pays back in the first month. A smaller shop with less waste will save less, so check the numbers on your own top 20 items before you commit to a yearly plan. Our guide to measuring whether AI is paying off shows how to set up the comparison.

There's a cash benefit on top. Every ringgit not sitting in slow stock is a ringgit available for suppliers and wages. See working capital and AI for cash flow forecasting for that side.

What should you do first?

Make the decision in three small steps rather than one big purchase.

  1. This week: start a sold-out log and a waste sheet at closing. Two columns each, kept by whoever closes.
  2. This month: export 12 months of item sales from your POS into a spreadsheet and pick your top 20 items by sales and waste.
  3. Next month: trial a forecasting tool, or the forecasting feature in software you already use, on those 20 items for eight weeks. Keep the one that cuts waste and sold-out days.

Forecasting fits naturally into taking your shop digital: once sales, purchases and stock are recorded in one place, ordering, cash flow and supplier payments all get easier. Our step-by-step guide on how to digitalise a Malaysian SME shows where it fits, and the procure-to-pay process covers the ordering and paying steps around it.

How can Jiannius help you get started?

If an off-the-shelf tool doesn't fit how your shop or kitchen orders, Jiannius Technologies Sdn Bhd, the Malaysian company behind HumbleBear, also takes on AI services and custom builds as scoped projects. That can mean a forecast built around your own item list, outlets and suppliers, or connecting your POS sales to the system you order from so the suggested order is waiting for your supervisor each morning. Start by doing the sold-out and waste logs above for a month; with those numbers in hand, talk to Jiannius about whether a scoped project makes sense for your business.

Frequently asked questions

How much sales history does AI need to forecast demand?

At least 12 months of daily sales by item, so the forecast has seen each season once. Two or three years is better for festive periods that move each year. With less, start with weekly patterns and plan festive stock by hand until you have a full year.

Can AI forecasting work for a small café or a single shop?

Yes, if you sell the same items most days and your POS records sales by item. A single outlet with 50 regular items can save hundreds of ringgit a month on waste alone. An outlet that changes its menu every week will gain less.

Does AI forecasting work for fresh food?

Yes, and that's often where the biggest saving is. Use the forecast to set daily prep and order quantities, cap orders at what you can sell before expiry, and keep a waste log so the forecast keeps improving.

Will AI ordering replace my purchasing staff?

No. It gives them a better starting number and takes most of the counting and guessing off their plate. Their time moves to dealing with suppliers, promotions and events, which is where they add the most value.

Sources