FinOps / Accounting
Automating the Month-End Close: Invoice Reconciliation with FOCUS 1.2
The month-end close used to involve painful "fuzzy matching" of cloud usage to invoices. FOCUS 1.2 changes that with the new InvoiceId column. This tutorial shows you the SQL logic to automate invoice reconciliation.
Automating the Month-End Close: Invoice Reconciliation with FOCUS 1.2

For years, the "Month-End Close" has been a nightmare for Cloud Accountants. The bill from AWS says $100,000. The Cost and Usage Report (CUR) rows sum up to $99,950 or $100,020. Why? Rounding errors, tax adjustments, support credits, and timing differences.

FOCUS 1.2 solves this with a single, powerful column: InvoiceId.

The Old Way: The "Fuzzy Match" Nightmare

Previously, analysts had to group usage by account and month, then try to match it to PDF invoices. It never matched perfectly because usage data (CUR) is a technical stream, while invoices are legal documents generated at a specific snapshot in time.

The New Way: The InvoiceId Link

In FOCUS 1.2, the cloud provider populates the InvoiceId column on every usage row. This indicates exactly which legal invoice that specific hour of compute was billed on.

The SQL Logic for Reconciliation

You can now write a query that perfectly mimics the invoice generation process:

SQL

SELECT
  InvoiceId,
  InvoiceIssuerName, -- e.g., 'Google Cloud'
  BillingAccountName,
  PricingCurrency,
  SUM(BilledCost) AS Data_Export_Total,
  SUM(x_TaxAmount) AS Tax_Total
FROM focus_billing_export
WHERE ChargePeriodStart >= '2025-11-01'
GROUP BY 1, 2, 3, 4
HAVING Data_Export_Total > 0
ORDER BY InvoiceId;

Handling Adjustments and Credits

Often, reconciliation breaks because of credits applied after the month closed. FOCUS 1.2 handles this with the ChargeClass column. Filter for ChargeClass = 'Correction' or ChargeClass = 'Tax' to isolate line items that modify previous invoices. By summing BilledCost where InvoiceId matches your PDF, you include these corrections automatically.

Benefits for Finance

  1. Speed: Reduce month-end close from 5 days to 5 minutes.

  2. Auditability: Every dollar on the General Ledger can be traced back to a specific Resource ID.

  3. Trust: Engineering and Finance finally look at the same numbers.

Implementation Tip: If you are migrating to FOCUS 1.2, verify your provider supports the InvoiceId column (available now for AWS, Azure, and GCP) and update your ERP ingestion pipelines to use this as the primary key for reconciliation.

See, Understand, Optimize -
All in One Place

Atler Pilot decodes your cloud spend story by bringing monitoring, automation, and intelligent insights together for faster and better cloud operations.