Skip to content

Rebuild Inventory

Understand why inventory accounts get flagged for rebuild and how to fix FIFO accuracy with the Inventory Bot.

When an inventory account is marked for rebuild, it means you recorded a transaction with a date earlier than your last COGS calculation. The bot flags it to prevent incorrect profit calculations.

The problem this solves

FIFO (First-In, First-Out) cost matching depends on perfect chronological order. Adding a transaction out of sequence breaks the FIFO logic:

  • January 31: You calculate COGS (the bot locks in this date)
  • February 15: You discover a sale from January 15 that you missed
  • Problem: The January 15 sale should have been matched to January purchases, but COGS was already calculated with February purchases in the mix
  • Result: Your profit calculation is wrong — the wrong purchases were matched to the wrong sales

The rebuild flag catches this so you can fix it with the Inventory Bot.

Key causes for the rebuild flag

Backdated transactions

You recorded a transaction with a date before the last COGS calculation date.

When it happensExample
After calculating COGSYou calculate on Feb 28
Then add an earlier transactionYou record a Jan 15 sale you forgot
The bot flags the accountMarked for rebuild

Manual edits to the Inventory Book

Someone manually edited a transaction in the Inventory Book after the bot created it.

What you didWhy it’s dangerous
Changed a quantity in the Inventory BookBreaks the link to your Financial Book
Modified a property or dateInvalidates the FIFO matching
Deleted a transactionAudit trail is incomplete

What the rebuild flag means

When you see “Account flagged for rebuild,” the bot is telling you: “I detected out-of-order transactions. Before I can calculate COGS again, I need to reset my previous work and recalculate from scratch with the correct timeline.”

What to do

Understand why it was flagged — check if you added a backdated transaction or manually edited the Inventory Book. If neither, contact support.

Verify the transaction is correct — confirm the transaction date is accurate and all properties (quantity, good, purchase_code, etc.) are correct. If not, fix it in the Financial Book and re-check it.

Recalculate — click Reset (clears previous COGS calculations), then click Calculate Cost of Sales (recalculates with the correct order). The rebuild flag clears automatically.

Example: Coffee Shop Inventory

You’re tracking coffee beans. Here’s what happened:

  • Jan 31: Calculate COGS for January — bot marks Jan 31 as calculation date
  • Feb 15: Realize you missed recording a sale from Jan 28
  • Feb 15: Record the Jan 28 sale in the Financial Book and check it
  • Bot detects: Jan 28 sale date is before Jan 31 calculation date — flags account for rebuild

Your action:

  1. Verify the Jan 28 sale transaction is correct in the Financial Book
  2. Click Reset in the Inventory Bot menu
  3. Click Calculate Cost of Sales again
  4. The bot recalculates with the correct order: January sales first, then February sales

Result: FIFO matching is correct, the rebuild flag is cleared, and your COGS and profit numbers are accurate.

Key takeaway

The rebuild flag is the bot’s way of protecting you from incorrect FIFO calculations. It fixes itself automatically when you reset and recalculate.