Owners with two branches know this feeling: one shop is out of an item and orders more from the supplier, while the other shop has the same item sitting untouched on its shelf. The money is spent twice and the stock is still in the wrong place. A nightly inventory transfer check fixes that by comparing both branches the right way and proposing what to move before anyone places a new order.
Forty pieces in one branch and ten in the other does not mean the first branch has too much. If the first branch sells ten a day and the second sells one a week, it is the opposite. The number that makes branches comparable is days of cover: how many days the stock on hand will last at the current rate of sales.
days of cover = stock ÷ average daily sales over the last 14 days
If an item has not sold at all, its cover is treated as unlimited, so it is never pulled from a branch that is not selling it anyway.
An item becomes a transfer candidate when one branch has too much cover and the other has too little, and the receiving branch actually sells it:
| Setting | Starting value | Meaning |
|---|---|---|
| High cover | 30 days | The giving branch has more than it needs |
| Low cover | 5 days | The receiving branch will run out soon |
| Minimum daily sales | Set per shop | The receiving branch must really sell the item |
The quantity is chosen so both branches end up with the same days of cover:
Example, with illustrative numbers: the main shop has 6 tins of an item and sold 28 in the last 14 days, so it sells 2 a day and has 3 days of cover. The second branch has 44 tins and sold 14, so it sells 1 a day and has 44 days of cover. Together they hold 50 tins and sell 3 a day, a target of about 16.7 days each. The main shop needs about 33 tins for that, so 27 tins move from the second branch. If both branches had 10 days of cover, nothing would move.
Moving stock costs something: fuel, a driver’s time, a vehicle. So transfers are totalled by direction, and if the value going one way is less than the cost of the trip, they wait for the next night and travel together with other items. Nobody drives across town for two tubes of glue.
Each branch’s billing export is copied into its own stock tab every evening at closing. A Settings tab holds the high cover, low cover and minimum daily sales values. A Code Map tab gives every product one shared code across both branches, because two billing systems rarely use the same item codes. Transfer Orders lists what the driver loads in the morning, and Transfer Log records what actually arrived.
The working sheet of each branch shows an In Transit note, such as “27 out” at the sender and “27 coming” at the receiver, so nobody reorders stock that is already on the way.
At 10 pm, after both branches have closed, an n8n workflow reads both stock tabs. Before doing anything, it checks that each branch’s export is dated today. If one is missing, it stops and tells the owner, because comparing today’s stock in one shop with yesterday’s in the other produces wrong transfers.
Both stock lists are joined on the shared item code. An item missing from one branch is listed separately and never treated as zero stock. A code step calculates cover and transfer quantities, and a second one applies the trip-cost check. An AI step then arranges the approved items into a loading order, one trip per direction with heavy items first, and flags any sale that looks like a one-off bulk order, such as a single customer buying 30 pieces. It cannot change any quantity.
The owner receives the list on Telegram with the value of each transfer, the flagged one-off sales and the missing-items list, and chooses Approve, Edit or Skip tonight. Approved transfers are written to Transfer Orders. When the receiving branch marks them Received with the actual count, the In Transit notes clear and any difference is logged the same evening. The n8n documentation covers the schedule, merge and Telegram steps used here.
Shops that do not need the full workflow can do this in Google Sheets alone. A Compare tab pulls both branches’ stock with XLOOKUP, calculates cover for each, and one formula marks the direction:
=IF(AND(H2>30,I2<5),"Move to Second",IF(AND(I2>30,H2<5),"Move to Main",""))
Here H and I hold each branch’s days of cover. A nightly Apps Script trigger can email only the flagged rows.
Demand shifts with the season, so the settings should too. Before a rainy season, raise the low cover line for products that sell when it rains, and in peak weeks shorten the sales window from 14 days to 7 so the numbers react faster. The same thinking that plans stock around a local festival calendar applies here.
With three or more branches, compare each item across all of them, move from the branch with the highest cover to the one with the lowest, and repeat until no pair crosses the limits or the moves stop being worth a trip. Each route then needs its own trip cost and one loading list in stop order, which pairs naturally with a delivery route planner.
Each month the owner gets four numbers: how many transfers ran, the total stock value moved, the supplier orders that were avoided, and how many one-off sales were flagged. Stock that one branch would have written off as dead stock often sells normally in the other. And when a supplier delivery fails, the other branch is usually the fastest backup supplier available.