Inventory & Cash Flow Forecasting
AI-Powered Demand Planning & Working Capital Management
The Cash Flow Problem
Every business owner knows the feeling: revenue is growing, orders are coming in, but the bank account keeps shrinking. The gap between when you pay suppliers and when customers pay you — the cash conversion cycle — is where businesses live or die. AI cannot eliminate this gap, but it can predict it, plan for it, and help you optimize it.
This chapter covers two interconnected topics: inventory forecasting (making sure you have the right products at the right time) and cash flow forecasting (making sure you have enough cash to operate). Both rely on pattern recognition — exactly what AI does best.
Inventory Forecasting: The Goldilocks Problem
Too much inventory ties up cash and risks obsolescence. Too little inventory means stockouts, lost sales, and unhappy customers. The goal is "just right" — and AI gets you closer than any manual process.
The Data You Need
Effective inventory forecasting requires historical data. The more you have, the better AI can identify patterns:
| Data Type | Source | Why It Matters |
|---|---|---|
| Sales history | Shopify, Amazon Seller Central, QuickBooks, POS system | The foundation — what sold, when, how much |
| Seasonality patterns | 2-3 years of monthly sales | Reveals predictable peaks and troughs |
| Lead times | Supplier agreements, purchase order history | How long between ordering and receiving inventory |
| Promotional calendar | Marketing team, historical promotions | Sales spikes from promotions are not organic demand |
| External factors | Weather data, economic indicators, competitor actions | Demand drivers outside your business |
Open data/inventory-history.json in the code panel. This file contains 24 months of SKU-level sales data for an e-commerce business selling home goods. Notice the seasonal patterns — sales spike in November-December (Black Friday, holiday season), dip in January-February, and have a secondary peak in May-June (summer home improvement).
US Seasonal Patterns
Understanding the major demand cycles is critical for inventory planning:
| Period | Driver | Typical Impact |
|---|---|---|
| **Black Friday / Cyber Monday** (Late Nov) | Holiday shopping kickoff | 200-400% spike in e-commerce |
| **Holiday Season** (Nov-Dec) | Gift buying, year-end spending | Highest revenue quarter for most retail |
| **Post-Holiday** (Jan-Feb) | Returns, reduced spending | 30-50% drop from Q4 peak |
| **Back-to-School** (Jul-Aug) | School supplies, electronics, clothing | Category-specific spikes |
| **Amazon Prime Day** (Jul) | Platform-specific promotional event | Significant for Amazon sellers |
| **Tax Refund Season** (Feb-Apr) | Consumer spending boost from refunds | Moderate lift in discretionary categories |
| **Summer** (May-Aug) | Outdoor, home improvement, travel | Category-specific |
AI Forecasting Tools
| Tool | Best For | Integrations | Pricing |
|---|---|---|---|
| Inventory Planner (Sage) | Shopify and e-commerce businesses | Shopify, Amazon, WooCommerce, BigCommerce | From $99/mo |
| Netstock | Mid-market distribution and manufacturing | QuickBooks, NetSuite, SAP Business One | From $1,000/mo |
| Blue Yonder | Enterprise supply chain and demand planning | SAP, Oracle, large ERP systems | Enterprise pricing |
| Amazon's Demand Forecasting | Amazon FBA sellers | Amazon Seller Central | Included with selling plan |
| Shopify Analytics | Small-medium Shopify stores | Native to Shopify | Included with plan |
| Forecastly | Amazon sellers — restock planning | Amazon Seller Central | From $49/mo |
AI Forecasting Prompts
Basic demand forecast: "Using the 24-month sales history in this data, forecast demand for each SKU for the next 3 months (July, August, September). Account for the seasonal patterns visible in the data. Present the forecast in a table with columns: SKU, avg monthly sales, seasonal adjustment factor, and forecasted units for each month."
Reorder point calculation: "For each SKU in this inventory data, calculate the reorder point using this formula: Reorder Point = (Average Daily Sales x Lead Time in Days) + Safety Stock. Use a safety stock of 2 weeks of average sales. Lead time is 21 days for domestic suppliers and 45 days for overseas suppliers. Flag any SKUs where current inventory is below the reorder point."
Amazon and Shopify: Platform-Specific Considerations
Amazon FBA Inventory Management
For Amazon FBA (Fulfillment by Amazon) sellers, inventory management has additional constraints:
Prompt: "My Amazon FBA business has these 15 SKUs with the following 12-month sales history and current FBA inventory levels. Calculate: (1) weeks of cover for each SKU, (2) which SKUs need restocking before Q4, (3) which SKUs are at risk of aged inventory surcharges, (4) estimated storage fees for the next 3 months at current levels. Present as a table sorted by urgency."
Shopify Inventory
Shopify's built-in analytics provide basic inventory insights, but AI-powered tools like Inventory Planner add:
Cash Flow Forecasting
Cash flow forecasting is arguably more important than profit forecasting. Profitable businesses go bankrupt when they run out of cash — it happens more often than you would think.
The Three Cash Flow Components
| Component | What It Covers | Key Drivers |
|---|---|---|
| Operating Cash Flow | Cash from core business operations | Collections from customers, payments to suppliers, payroll, taxes |
| Investing Cash Flow | Cash spent on or received from long-term assets | Equipment purchases, property, investments |
| Financing Cash Flow | Cash from or to lenders and owners | Loan proceeds, loan repayments, dividends, equity issuance |
Open data/cash-flow-history.csv to see 12 months of actual cash flow data for a mid-size distribution business. The operating section shows the real working capital dynamics — note how accounts receivable collections lag behind revenue recognition, creating periodic cash crunches despite healthy profits.
The Cash Conversion Cycle
The Cash Conversion Cycle (CCC) measures how many days it takes to convert inventory investment back into cash:
CCC = Days Inventory Outstanding + Days Sales Outstanding - Days Payable Outstanding
| Metric | Formula | Good Target | What It Means |
|---|---|---|---|
| DIO | (Avg Inventory / COGS) x 365 | 30-60 days | How long inventory sits before selling |
| DSO | (Avg Accounts Receivable / Revenue) x 365 | 30-45 days | How long customers take to pay |
| DPO | (Avg Accounts Payable / COGS) x 365 | 45-60 days | How long you take to pay suppliers |
A shorter CCC means cash comes back faster. Amazon's CCC is famously negative — they collect from customers before paying suppliers, which funds their growth.
Prompt: "Calculate the Cash Conversion Cycle for this business using the last 12 months of data. Show DIO, DSO, and DPO individually. Compare to the industry average for distribution companies (DIO: 45 days, DSO: 38 days, DPO: 42 days). Identify which component is the biggest opportunity for improvement and suggest two specific actions."
AI Cash Flow Forecasting Tools
| Tool | What It Does | Integrations | Pricing |
|---|---|---|---|
| Float | Cash flow forecasting and scenario planning | Xero, QuickBooks Online | From $59/mo |
| Pulse | Cash flow management for small businesses | Manual or QuickBooks | From $29/mo |
| Dryrun | Cash flow forecasting with scenario modeling | QuickBooks, Xero, FreshBooks | From $49/mo |
| Jirav | FP&A platform with cash flow forecasting | QuickBooks, Xero, NetSuite | From $500/mo |
| Centime | AP/AR automation with cash flow forecasting | QuickBooks, NetSuite | Custom pricing |
Building a 13-Week Cash Flow Forecast
The 13-week cash flow forecast is the standard short-term forecasting tool used by CFOs, turnaround professionals, and lenders:
Prompt: "Create a 13-week rolling cash flow forecast template with these categories: Opening Cash Balance, Operating Receipts (split by customer collections, other income), Operating Disbursements (split by payroll, rent, suppliers, insurance, utilities, taxes, other), Net Operating Cash Flow, Investing (capex), Financing (loan payments, line of credit draws), Net Cash Flow, Closing Cash Balance. Include a 'variance' column comparing forecast to actual for the current week."
Scenario Planning
AI excels at running multiple scenarios quickly:
| Scenario | Key Assumptions | Purpose |
|---|---|---|
| Base case | Current trends continue, no major changes | The working forecast |
| Best case | 15% revenue increase, DSO improves by 5 days | Upside planning (hiring, expansion) |
| Worst case | 20% revenue decline, largest customer delays 30 days | Stress testing — can the business survive? |
| Seasonal stress | Q1 revenue drops 40% from Q4 (normal seasonality) | Planning for predictable cash crunches |
Prompt: "Using this 12-month cash flow history, create three scenarios for the next quarter: base case (current trends), optimistic (revenue +15%, DSO improves 5 days), and pessimistic (revenue -20%, largest customer pays 30 days late). For each scenario, show the weekly closing cash balance and flag any weeks where the balance drops below $50,000."
Working Capital Optimization
AI can identify specific levers to improve working capital:
Accounts Receivable
Accounts Payable
Key Takeaways
This is chapter 5 of AI for Commerce & Finance (Global).
Get the full hands-on course — free during early access. Build the complete system. Your projects become your portfolio.
View course details