Quick Answer
Your inventory account is marked for rebuild because 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.
When you add a transaction out of sequence, the FIFO logic breaks:
Example of the problem:
- January 31: You calculate COGS (the bot locks in this date)
- February 15: You discover a sale from January 15 you missed
- Problem: The January 15 sale should have been matched to January purchases,
but you calculated COGS after February purchases arrived
- Result: Your profit calculation is wrong—you matched the wrong purchases to
the wrong sales
The rebuild flag catches this and you can fix it with the inventory bot.
Key Causes for Rebuild Flag
1. Recording a Backdated Transaction
You record a transaction with a date before the last COGS calculation date.
When it Happens | Example |
After calculating COGS | You calculate on Feb 28 |
Then add an earlier transaction | You record a Jan 15 sale you forgot |
The bot flags the account | Marked for rebuild |
2. Manually Editing the Inventory Book
You (or someone else) manually edits a transaction in the Inventory Book after the
bot created it.
What You Did | Why It's Dangerous |
Changed a quantity in Inventory Book | Breaks the link to your Financial Book |
Modified a property or date | Invalidates the FIFO matching |
Deleted a transaction | Audit trail is incomplete |
Rule: Only edit the Financial Book. The Inventory Book is managed by the bot
and maintains your audit trail.
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 You Should Do
Step 1: Understand why it was flagged
- Check if you added a backdated transaction (date before last COGS calculation)
- Check if you manually edited anything in the Inventory Book
- If neither, contact support (it's rare)
Step 2: Decide if the transaction is correct
- Is the transaction date accurate?
- Are all the properties (quantity, good, purchase_code, etc.) correct?
- If not, fix it in the Financial Book and re-check it
Step 3: Recalculate
- Click Reset (clears previous COGS calculations)
- Click Calculate Cost of Sales (recalculates with correct order)
Done. The rebuild flag clears automatically.
Example: Coffee Shop Inventory
You're tracking coffee beans. Here's what happened:
Timeline:
- 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 Financial Book and check ✅ it
- Bot detects: Jan 28 sale date < Jan 31 calculation date → flags account for
rebuild
Your action:
1. Verify the Jan 28 sale transaction is correct in Financial Book
2. Click Reset in Inventory Bot menu
3. Click Calculate Cost of Sales again
4. The bot recalculates with the correct order: Jan sales first, then Feb sales
Result:
- FIFO matching is now correct
- Rebuild flag is cleared
- 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 automatically fixes the problem when you recalculate—you don't
need to do anything except reset and calculate again.
Never ignore this warning. FIFO accuracy is essential for correct profit
reporting and tax compliance.
