89 days
capital payback: the time it takes money in stock to return as profit
It was 105 days. Capital now turns over 4.1 times a year instead of 3.5.
Case study · Building and launching AI agents for supply chain
We built and launched a team of AI agents for a home goods importer. The main goal: see, forecast and speed up capital payback. The second goal: prevent cash gaps and stockouts. The company sells through its own online store and on more than 10 marketplaces. Every 4 hours, the AI agents check 260+ products and 40+ batches in transit. They show which purchase will return money faster. They work out in advance when to pay and how much. And they warn when it is time to order. A person always makes the decision.
89 days
It was 105 days. Capital now turns over 4.1 times a year instead of 3.5.
$184,000
About $100,000 a month. Profit grew 21% over the same period.
$34
It was $29. The same capital earns 18% more.
159
Cash gaps and stockouts are visible in advance. At the peak of the season, only 4–5 of 120 fast-moving products were out of stock.
Amounts, sales volumes, products and product names are changed under NDA. Percentages and time in days are real. How we calculated
Summary in 30 seconds
Main goal
An importer pays the factory months before the first sale. So the owner has two main questions. In how many days will the invested money come back with profit? And will there be enough money for the next payments? We built the whole project around these two questions.
This is how many days it takes money in stock to return as profit. Now it is 16 days faster.
This is how many times a year money goes around the loop: pay the factory, sell, get the money back.
The same capital earns 18% more. The company did not add money to the business.
The AI capital agent shows how much money sits in each product and in how many days it will come back. Fast money is green, slow money is red. You also see frozen capital separately: products that barely sell.
The AI agents calculate the payback of each future batch before you order it. The AI payments agent shows payments 7, 30 and 90 days ahead, and the heaviest day. You see a cash gap weeks ahead, not on the payment day.
You choose the supplier, the delivery method and the batch size by how fast the money comes back. The purchase queue fits the budget. Purchases that return money faster or prevent a stockout go first.
The AI payments agent plans the payments for each batch 3 months ahead: payment for goods, balance payments and delivery on arrival. You see the heaviest week today. If money will fall short that week, the team moves purchases in the queue early. Or it agrees on a payment delay with the supplier.
payment for goods payment for delivery
Example with sample data, amounts in thousands of dollars. The “Payment calendar” screen shows the same payments by day.
The challenge
This is what a buyer’s week looked like before the AI agents. Laziness was not the problem. A person simply cannot recount 260 products, 40 batches in transit and stock for more than 10 platforms every day.
Order
Today’s order decides what you will sell in 3 months. You only see a mistake when the batch arrives or the product runs out.
Stockout
A fast-moving product ran out on all platforms at once. Its listings dropped in search. Competitors took the top spots.
Payback
The warehouse is full of slow sellers. Money sits in boxes. Nobody knows in how many days it will come back.
Cash gap
The factory asks for the balance after production. The carrier waits for payment on arrival. Both need money on the same day. Nobody knows exactly how much the next month will need.
Spreadsheets
The purchase plan lives in Excel and in one person’s head. That person goes on vacation, and purchasing stops.
Profit
Revenue grows, but free cash does not. Nobody can say which product really makes money after delivery and returns.
With AI agents, the morning looks different. At 08:04 the AI agent has already sent its findings to Telegram.
People keep the decisions: what to order, from whom and when to pay.
Stockout risk
The company sells on more than 10 marketplaces and platforms. All channels share one stock. When a product runs out, it disappears from all platforms at once. And marketplaces punish this hard.
Sales drop to zero on all platforms at once. Shoppers see “out of stock”.
Marketplace algorithms push up products that are in stock and sell steadily. They push listings without stock down.
Ad views bring no sales when there is no stock. You have to pause the ads, and the campaign history is lost.
Shoppers switch to similar products. A competitor gets your sales and reviews and moves up.
The new batch arrives, but the listing is now at the bottom. To win back its rank, you need discounts, ads and weeks of time. In season, when competition is tough, this is especially hard.
with AI agents without a warning competitor
An illustration, not client data.
The classic study by Gruen, Corsten and Bharadwaj (2002) looked at retail stock. On average, about 8% of products were out of stock. Only 15% of shoppers put off the purchase until the product came back. The rest bought from another seller, chose another brand or left without buying.
In the busiest autumn weeks, 4–5 of 120 fast-moving products were out of stock. That is about 4%.
Why this is hard
Off-the-shelf forecasting tools assume a simple case: one warehouse, one supplier, delivery in a week. Here everything is different.
One shared stock for all channels. A stockout hits all platforms at once.
From order to warehouse. Air takes 28 days on average, rail 64, sea 113. Sometimes it takes 8 months.
The factory will not sell less. Often it is more than you need right now.
Each one sells as one product. But in the warehouse it is several different products.
The old and new models sell under different codes. For the forecast, this is one product.
Out of season, a product barely sells. That does not mean it is dead.
Prepayment on order, balance after production, delivery on arrival. Some payments are partial.
Own warehouses, marketplace fulfillment and warehouses for defective goods. You cannot sell defective goods.
Each rule is simple on its own. The hard part: they must all add up to one answer. How much to order today, when to pay and what it costs.
Solution
An AI agent is a program that collects data on its own, draws conclusions and tells you what to do. We built a team of five AI agents. Each one owns its part of purchasing. They run every 4 hours, never go on vacation and order nothing without your “yes”.
Orders, stock, unit costs. 2 years of history, about 310,000 orders
17 warehouses, including marketplace fulfillment. Defective goods count separately
Batch statuses, dates, factory invoices, delivery cost for each item
The National Bank of Ukraine rate updates every hour
The AI agent writes on its own: what to order, pay for or pick up
Any question about the data, in plain words
Forecast, products, shipments, money, purchase queue, payments
Makes the decision. The AI agents never order or pay on their own
Every 4 hours, it collects orders, stock in 17 warehouses, batches in transit, payments and exchange rates. It splits bundle sales into the products inside. It merges different SKUs of one product.
For each product, it calculates the sales rate, days of stock and the last day to order. It accounts for the season and for rising sales. It is the first to spot a stockout risk.
It calculates capital payback for each product and for the whole warehouse. It sizes the batch with the factory minimum order in mind. It compares suppliers and delivery methods by how fast the money comes back. It fits the purchase queue into the budget.
It tracks each batch: production, dispatch, arrival, carrier warehouse. It builds a 90-day payment calendar: prepayment, balance after production, delivery on arrival. It shows the heaviest day, so there is no cash gap.
It answers any question about the data in plain words. It runs “what if” scenarios. It runs on Claude, a language model by Anthropic.
Every 4 hours, the AI data agent collects orders, stock, batches in transit and payments.
The AI forecast agent compares two dates: when the product runs out and when a new batch can arrive.
The AI purchasing agent calculates how much to order and what it costs. It also shows how many days the batch takes to pay back with each supplier.
The AI payments agent puts prepayments, balance payments and delivery on dates for 90 days. The purchase queue fits the budget, so there is no cash gap.
The AI agent writes to Telegram, and the AI assistant answers questions. A person makes the decision.
Early warnings
For each product, the AI forecast agent compares two dates. First, when the product runs out at the current sales rate. Second, when a new batch can arrive if you order today.
Without an AI agent. The order went out when 20 days of stock remained. The batch took 60 days. The product was out of stock for 40 days, listings dropped in search, and shoppers went to competitors.
With an AI agent. The AI agent sent an alert on day 11, when 69 days of stock remained. The batch arrived, and 144 units were still in stock.
stock last day to order: 1,104 pcs
stock last day to order: 1,104 pcs
Last day to order = sales rate × lead time × 1.15. The 15% buffer covers swings in demand and delays on the road. If sales speed up, the AI agent uses the latest 3-week rate. If a product does not sell now because of the season, the AI agent uses the rate for the same period last year.
Example: lead time 60 days, sales 20 pcs a day. The last day to order comes when 69 days of stock remain. This is the chain of alerts for one product.
Forecast screen
The AI forecast agent adds the product to the plan. You already see how much money to set aside: a batch of about 1,000 pcs, $16,000.
Telegram
75 days of stock left. The last day to order is close.
Telegram and purchase queue
Prepayment to the supplier on its terms, for example 30% on order: $4,800.
Telegram and payment calendar
Comes 0–3 days before production ends, if the goods are not fully paid. Balance of 70%: $11,200.
Payment calendar
The batch arrives while about 9 days of stock are still left. No stockout.
If a batch is late, the AI agent writes “Arrival overdue”. If it will not arrive before the stock runs out, the product moves to the “Won’t arrive in time” group. There you see how many days the product will be out of stock. You also see how much profit the company will lose. This gives you time to bring part of the batch by air, or to raise the price and stretch the stock.
The buyer sets the prepayment percentage from the supplier’s terms. The AI agents use it in the purchase queue: how much we pay now and how much after production.
How payback speeds up
A dollar that sits in the warehouse without sales does not work. While a batch is on its way, the money is frozen. AI agents speed up turnover in three ways. They stop you from buying too much. They pick purchases that pay back faster. And they plan payments so there is no cash gap.
The faster money goes around the loop, the more times a year it earns profit. AI agents shorten the loop in two ways. They stop you from buying too much. And they show which purchase will return money faster.
The AI purchasing agent calculates this number for each product and each supplier. A batch with a 38-day payback returns money almost three times faster than a 110-day batch. So over a year, the same money makes three loops instead of one.
The AI payments agent knows that money goes out in parts: prepayment on order, balance after production, delivery on arrival. So you see how much money you need now. You also see how much you need in one month and in three.
Desk lamp. Sells 15 units a day, 450 in stock.
Payback 152 days
Payback 98 days
Option B costs $1.30 more per unit. But the money comes back 54 days sooner. And $5,790 stays free for another purchase.
We made up the figures in this example. The calculation is real: this is how the AI purchasing agent works it out.
There is always less money than you want to spend on stock. You enter the budget. The AI purchasing agent queues purchases by how fast they return money. Urgent items that prevent a stockout stay pinned at the top. The list splits into “pay now” and “waiting”.
Budget
$155,000
$150,770 allocated
Pay now: $150,770. Waiting for the next budget: $49,500.
Telegram
Every 4 hours, the AI agents recheck all products and batches. The AI agent sends new findings to Telegram on its own: what to order, what to pay for, what to pick up. You do not need to open the system to see what is urgent.
October 17
🔔 AI purchasing agent: alerts (5)
🔴 Critical (3)
• Order urgently: Wok pan 32 cm
12 days of stock, below lead time (45 d × 1.15). Order now.
• Arrival overdue: Ningbo HW Factory
Planned arrival passed 4 days ago, and the shipment is still not delivered.
• Pick up from carrier: Yiwu KT Trading
5 days at the carrier warehouse. Pick up the goods and close the shipment.
🟡 Warnings (2)
• Reorder soon: Spice organizer
58 days of stock, approaching the reorder point (lead time 50 d).
• Pay for production: Foshan LX Lighting
3 days to production end, only 30% paid. Top up to avoid delaying dispatch.
🔔 AI purchasing agent: alerts (1)
🔴 Critical (1)
• Production overdue: Chaozhou CR Ceramics
Production deadline passed 3 days ago, yet the shipment is still in
“manufacturing”.
AI assistant
Not everything fits into ready-made reports. You can ask the AI assistant an unusual question. It finds data on products, sales, forecasts and shipments on its own. It answers in seconds. It works in the browser and on the phone.
Which products are at risk of a stockout, and what will the purchase cost?
2 products are urgent:
1. Wok pan 32 cm. 12 days of stock, lead time 45 days. Batch of 1,400 pcs, $18,900.
2. Lunch box, 3 tiers. 19 days of stock, lead time 50 days. Batch of 1,650 pcs, $12,870.
Total $31,770. Also, a batch of desk lamps is on its way, but it arrives in 27 days. The stock lasts 21 days. The lamp will be out of stock for about 6 days.
What if sales grow 30% in November?
Then the electric hot plate and the spice organizer join the urgent list. Their stock will last 65 and 45 days instead of 85 and 58. Both will fall below the reorder point.
This calculation uses your +30% assumption. It is not a forecast from actual sales.
What is on its way from Ningbo HW Factory now?
2 batches. Rail: 6,100 pcs, planned arrival was October 13, 4 days late. Sea: 10,600 pcs, arriving November 19. On arrival, you need to pay $13,600 for delivery.
AI agent findings on screens
The AI agents work inside a CRM that we built around the client’s process. The screens show their findings. We replaced the products, suppliers and amounts.
The AI forecast agent sorts products by stockout risk. You see what to order urgently, what won’t arrive in time, what it’s time to order and what is already in transit. Click a tile to keep only that group in the list.
The AI agents’ findings for one product: stock, in transit, days of stock, landed cost, profit for the year and a purchase recommendation. Below are prices from three suppliers with their minimum orders, and the shipment history.
The AI shipments agent tracks each batch: ordered, production, shipped, delivered. Each tile shows how much is paid and how much is still due. Delays show in red.
The AI capital agent shows the payback of the whole portfolio and of each batch. You see how much money sits in stock and in how many days it comes back. Fast money is green, slow money is red. A separate tab shows frozen capital.
You enter the budget and the prepayment from the supplier’s terms. The AI purchasing agent puts pinned items first and sorts the rest by how fast they return money. Then it splits the list into “pay now” and “waiting”.
The AI payments agent shows when and how much to pay factories and carriers 7, 30 and 90 days ahead. It also shows the heaviest day. So you see a cash gap in advance. The agent counts real payments, including partial ones.
Results
We compared 8 weeks from July 27 to September 21: before the season, when demand is flat. Then the company stocked up for the season on purpose. The AI agents helped it do this without slowing down turnover.
| Metric | Before | After | Result |
|---|---|---|---|
| Capital payback | 105 days | 89 days | 16 days faster |
| Capital turnover per year | 3.5 times | 4.1 times | +18% |
| Monthly profit per $100 in stock | $29 | $34 | +18% |
| Money in stock over 8 weeks | $1,817,000 | $1,633,000 | −$184,000 ≈ $100,000 a month |
| Weekly profit, same 8 weeks | $75,100 | $90,500 | +21% |
| Early purchase warnings | over 12 weeks, in Telegram and on the forecast screen | 159 | |
| Fast movers out of stock at peak season | 4–5 of 120 products | ≈ 4% busiest autumn weeks | |
| Profit vs last year, August to October | revenue −8%, orders −21% | +7% | |
| Margin, August to October | 38% | 44% | +6 points |
| Pre-season stock-up, October | $1,633,000 | $2,113,000 | +$480,000 into stock payback did not grow |
Want to see the payback of your own capital? Start with a 60-minute consultation. We will review your purchasing and show what to hand over to AI agents first.
Book a consultationHow the project went
We connected the accounting system. We loaded 2 years of history, about 310,000 orders. We brought the catalog and stock from 17 warehouses together.
Stock forecast and stockout risk for each product. Shipment tracking with statuses, dates and minimum orders.
Capital payback by product and for the warehouse. Batch sizing. Delivery cost for each item.
The AI agent writes to Telegram. The AI assistant answers questions. A purchase queue with a budget. Supply and payment calendars.
240+ improvements from team feedback. A staff handbook: 46 articles in three languages.
Bundles, one product under different SKUs, defective goods in separate warehouses. At first, the forecast was wrong on exactly these products. Now the AI data agent splits bundle sales into the products inside. It merges the SKUs of one product and does not count defective goods as stock.
Production plus transit, four types of transport. The AI agent counts lead time from the payment of the first factory invoice, not from the order date. Otherwise the arrival forecast was off by weeks.
Prepayment on order, balance after production, delivery on arrival. Some payments are partial. The AI payments agent counts real payments, not the shipment status.
In the first weeks, the AI agents ran next to the manual plan. We checked the numbers on specific products and removed false alarms. For example, the factory minimum order inflated the recommendations. Now it is only the lower limit.
Out of season, a product barely sells, but it is not dead. For such products, the AI forecast agent uses the rate for the same period last year.
Who it fits
FAQ
They divide the money in stock by the profit per day. The result is the number of days it takes for the invested money to come back with profit. The AI agents calculate it for each product, for the whole warehouse and for each future batch before you order it.
The AI payments agent shows all batch payments 7, 30 and 90 days ahead, and the heaviest day. Prepayment, balance after production and delivery each sit on their own date. The purchase queue fits the budget. So the team does not take on payments it cannot make.
It is five programs, each with its own job: data, forecast, purchasing and capital, shipments and payments, answers to questions. Every 4 hours they collect data on their own and draw conclusions. They report them in Telegram and on screens.
They compare the date a product runs out with the arrival date of the next batch. A product moves to “Time to order” weeks before the last day to order. Then alerts come in Telegram. If a batch is late, the AI agent counts the days out of stock and the lost profit.
The first AI agents went live after 4 weeks. Telegram alerts and the AI assistant came after 10 weeks. After that, we fine-tune the system to your process based on team feedback.
In the first month, we need access and regular checks with your buyer on specific products. After that, the team enters shipments and payments and makes decisions. Nobody has to calculate in spreadsheets anymore.
Orders and stock from your accounting system. Suppliers, prices, lead times and prepayment terms. If some data is missing, we start with what you have and add the rest as we go.
No. The AI agents calculate, warn and answer questions. A person places orders and makes payments. The AI assistant only reads data and cannot change it.
The calculation includes a 15% buffer for swings in demand and lead times. The AI agents recalculate everything every 4 hours. If a batch is late or sales speed up, an alert comes to Telegram at the next check.
Yes. The AI agents calculate the numbers with clear rules, so you can check each one by hand. Claude, a language model by Anthropic, understands questions in plain words. If an answer relies on an assumption, the AI assistant says so.
No. The buyer stops recounting spreadsheets. Their time goes to talks with factories, quality and new products.
SellerUp · AI automation for e-commerce
A 60-minute consultation on your purchasing
We will find where your money sits, where a stockout is likely and what to hand over to AI agents first. You get a written plan within 48 hours. The price is $249. We credit it towards the next piece of work if it starts within 30 days.
Where to start
A working session on your processes. We look at your purchasing, capital payback, payments and stockout risk. You get a written plan: what to automate first, in what order and what it costs in hours and money.
Consultation · 60 minutes, online
$249 $399
Credited towards the next piece of work if it starts within 30 days
Book a consultation or leave a request belowConsultation request