When the Paneer Supplier Didn’t Show Up at 7 PM

When the Paneer Supplier Didn’t Show Up at 7 PM

Backup Supplier Automation for Late and Short Deliveries

A supplier who usually delivers on time sends a message an hour before opening: out of stock today. Or the van arrives with six boxes instead of ten. The owner starts calling around, often to the first number that answers, and pays whatever is asked. A backup supplier plan decided in advance, with the numbers ready, turns that scramble into one tap.

When an order counts as failed

The automation watches every open purchase order and marks it failed when any one of these happens:

  • Staff set its status to Out of Stock or Short Supply.
  • The promised time has passed by more than a grace period and the order is still marked Ordered. I start with 2 hours for perishables, half a day for packaging and 1 day for dry goods.
  • The received quantity is below 80% of what was ordered. Only the shortfall becomes a new order.

Watching both status and time matters. Many suppliers never send a message; they simply do not turn up.

How urgent is the gap?

Not every failure is an emergency. The automation measures urgency in hours, not in feelings:

hours to stock-out = stock now ÷ (average daily use ÷ opening hours)

UrgencyRuleWhat matters most
Critical8 hours or less of stock, or less than the main supplier’s next delivery timeSpeed, then reliability
SoonUp to 3 days of stockA balance of reliability, price and speed
CalmMore than 3 days of stockLanded price, then reliability

Example, with illustrative numbers: 6 kg left, 18 kg used per day, 12 opening hours. Hourly use is 1.5 kg, so stock runs out in 4 hours. That is Critical, and the fastest reliable backup goes to the top, even if it costs more.

Ranking backup suppliers the right way

The same list of suppliers is sorted differently depending on urgency. When stock runs out in hours, a cheaper supplier who delivers tomorrow is useless. When there are days of stock, paying extra for speed is wasted money.

For the Soon case, the automation uses a blended score:

  • Score = 0.5 × on-time rate + 0.3 × price score + 0.2 × lead score
  • Price score = 1 − (price + delivery charge) ÷ highest landed price among the options
  • Lead score = 1 − lead hours ÷ longest lead time among the options

Example: Supplier A is on time 90% of the time, costs ₹1,050 landed and delivers in 6 hours. Supplier B is on time 70% of the time, costs ₹950 and delivers in 24 hours. A scores 0.60 and B scores about 0.38, so A is offered first despite the higher price. The top two are offered.

A supplier with fewer than three past orders is labelled “new, little history” and given a neutral 70% on-time rate, so one bad or lucky delivery does not decide their rank.

Five tabs in one Google Sheet

  • Purchase Orders: PO Number, Item, Supplier, Qty, Unit, Order Date, Promised At, Status, Received Qty, Received At
  • Supplier Options: Item, Supplier, Price, Delivery Charge, Lead Hours, Phone, Telegram Chat ID
  • Stock and Use: Item, Stock Now, Unit, Average Daily Use over 14 days, Opening Hours
  • Supplier Score: Orders, On Time, Short Supplied and their percentages, written only by the automation
  • Switch Log: every failure, its urgency, the supplier chosen and the new order number

Start Supplier Options with the top 30 items by spend. For each one, ask the owner a single question: if this supplier fails, who do you call? Items with only one answer go on a weekly single-supplier risk list.

What the owner gets on Telegram

The alert shows the failed order, stock now, daily use, the projected time stock runs out, and the ranked backups with price, lead time, on-time rate and order count. Three buttons follow: order from backup 1, order from backup 2, or wait for the main supplier.

Tapping a backup creates a new purchase order for the remaining quantity, marks the old one Cancelled-Switched, logs the switch, and sends or prepares the message for the supplier. Tapping wait sets a time to check again. Nothing is ordered without the owner’s tap.

The n8n build, in short

Two entry points feed one chain. A Google Sheets trigger catches status changes to Out of Stock or Short Supply. A schedule runs every 30 minutes during business hours to catch overdue and short orders. A Remove Duplicates step, keyed on the PO number, makes sure one failure produces one alert even if both paths catch it. Code steps calculate hours to stock-out and rank the options by urgency, and Telegram sends the message with buttons.

A second workflow handles the button taps, and a third runs every night at 11 pm to recalculate each supplier’s on-time and short-supply rates from the last 90 days. The n8n documentation covers these triggers and the Telegram node. Shops with fewer than 50 open orders can do the same with Google Sheets and about 180 lines of Apps Script.

Tests before going live

TestWhat to doWhat should happen
Status changeMark a test order Out of StockAlert within about a minute
OverduePromised 3 hours ago, still OrderedAlert at the next sweep
No duplicateTrigger both paths for one orderExactly one alert
CriticalStock near zeroFastest backup first
CalmA week of stockCheapest landed price first
No backupItem with one supplier“No backup listed”, added to risk list
Short supplyReceive 6 of 10Alert for 4 units only

Errors that are easy to avoid

  • Alerts repeating every 30 minutes, because duplicates were checked on row number. Key them on PO number.
  • 999 hours to stock-out, because a new item has no usage history yet. Treat it as Calm and say so in the alert.
  • Promised times read as text, because dates were typed in mixed formats. Set the column format and data validation.
  • Buttons that do nothing, because the Telegram bot’s webhook points at an older workflow. One bot, one active webhook.

Supplier management beyond the emergency

The Supplier Score tab is the quiet benefit. After a few months it shows, in numbers, which supplier is reliable and which one only looks cheap. That record is exactly what to bring to a price conversation, and a purchase brief built from price history puts it on one page. Before adding any new backup supplier, especially one found online, run a GST number check before paying an advance. And if you run two branches, the quickest backup may be your own: an inventory transfer between branches often covers a gap faster than any supplier.

When my team sets this up, the person who receives deliveries is trained to mark Received, Short Supply and Out of Stock as it happens, because the whole system depends on that one habit. After two weeks, we read the Switch Log together and adjust the grace periods.

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.

Leave a Comment

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