Unleashed and Xero COGS and stock on hand
A cheat sheet for how Unleashed's Xero connection turns stock movements into journals, which COGS and Stock on Hand accounts they hit, how values are calculated, and why they differ from your invoices.
When you use Unleashed with Xero, stock movements don't just change your inventory: they also create accounting journals that affect Cost of Goods Sold (COGS) and Stock on Hand (SOH). This page explains when journals are created, which accounts are used, how values are calculated, and why the numbers in Xero differ from your sales invoices. Use it when you're troubleshooting unexpected postings, setting up account mappings, or making sense of your margins.
Good to know
These journals are created by Unleashed's own connection to Xero. Supply Lens creates the sales orders, and sometimes the shipments and stock adjustments, that trigger them.
The core accounting principle
- Stock bought from suppliers is a current asset (Stock on Hand) until it's sold.
- Once sold, the cost of that stock moves to Cost of Goods Sold, an expense on the profit and loss (P&L) statement.
When a sales shipment completes
When a sales shipment is completed in Unleashed, Unleashed creates a bill in Xero labelled Stock Journal:
| Account | Entry | Effect |
|---|---|---|
| Stock on Hand | Credit (negative) | Reduces the asset on the balance sheet |
| Cost of Goods Sold | Debit (positive) | Recognises the expense on the P&L |
Value used: Average Landed Cost (ALC) × quantity shipped.
Transactions that create stock journals
| Unleashed transaction | COGS impact | SOH impact |
|---|---|---|
| Sales Shipment | Debit (increase) | Credit (decrease) |
| Stock Adjustment (out) | Debit (increase) | Credit (decrease) |
| Stock Adjustment (in) | Credit (decrease) | Debit (increase) |
| Stock Count (variance) | Debit or credit | Credit or debit |
| Stock Revaluation | — | Debit or credit |
| Assembly (with NDP or costs) | Debit or credit | Credit or debit |
Which COGS account is used
Unleashed chooses the COGS account in this order:
- Product, if a COGS account is specified on the product.
- Customer, if a COGS account is specified on the customer.
- Default, from the Xero integration configuration in Unleashed.
Product group level is not currently supported. It's a common feature request.
How the journal looks in Xero
With COGS accounts assigned on products
A shipment of three products, each with a different COGS account:
| Description | Account | Amount |
|---|---|---|
| Stock Movement | 322 - COGS Electronics | £20.00 |
| Stock Movement | 323 - COGS Freight | £20.00 |
| Stock Movement | 321 - COGS Consumable | £20.00 |
| Stock on Hand | 602 - Stock on Hand | -£60.00 |
The total always balances to £0.00.
Without product-level assignment
All products fall back to the default COGS account:
| Description | Account | Amount |
|---|---|---|
| Stock Movement | 300 - COGS (Default) | £60.00 |
| Stock on Hand | 602 - Stock on Hand | -£60.00 |
Average Landed Cost
ALC = Total Stock Value / Total Stock Quantity
ALC is recalculated whenever:
- stock is received (on a purchase order);
- additional costs are added (cost lines);
- assemblies are completed;
- stock adjustments occur.
Shipment value = the sum of (product ALC × shipped quantity).
Splitting COGS
| Split by | Use case | Supported? |
|---|---|---|
| Product | Granular margin analysis | Yes: assign a COGS account on the product |
| Product group | Category-level P&L reporting | No (feature request) |
| Customer | Channel or customer profitability | Yes: assign a COGS account on the customer |
| Warehouse | Location-based reporting | No |
Xero account types you need
| Unleashed account | Xero account type |
|---|---|
| Stock on Hand | Current Asset |
| Cost of Goods Sold | Direct Costs / Expense |
| Sales | Revenue |
Quick reference: debits and credits
| Action | COGS | Stock on Hand |
|---|---|---|
| Sell or ship stock | Debit ↑ | Credit ↓ |
| Receive stock | — | Debit ↑ |
| Write off stock | Debit ↑ | Credit ↓ |
| Find extra stock | Credit ↓ | Debit ↑ |
Troubleshooting
Stock on Hand doesn't match between Unleashed and Xero
- Check for failed exports in the Xero queue.
- Make sure all transactions are approved in Xero.
- Look for manual amendments made directly in Xero.
COGS is going to the wrong account
- Check the hierarchy: product, then customer, then default.
- Check the product record has the correct account assigned.
The journal value differs from the invoice
- The invoice is the selling price (revenue).
- The journal is the Average Landed Cost (cost).
- They should be different: the difference is your margin.