Home / Connectors / Xero
Connector

Xero connector: datasets and metric definitionsBeta

Bring in the profit and loss (with your budget), balance sheet, bank summary, general ledger, and open invoices and bills. Matches Xero reports. Updates daily.

6 datasets20 metric definitionsRead-onlyRefreshes daily

When you connect Xero, Quiriz imports the datasets below and adds the metric definitions to Company Context, the one place your company’s definitions live. Every answer that uses one of these metrics uses the same definition, in the app, in Slack and in the Excel, Sheets, PowerPoint, Slides, Word and Docs add-ins. An admin can edit any of them.

DatasetsMetric definitionsQuestionsFAQ

Datasets

DatasetWhat it holds
[Xero] Profit and lossOne row per account per month for this fiscal year and the two before it, matching the Xero Profit and Loss report. amount is as Xero shows it; profit_effect is + for income, - for costs, so SUM(profit_effect) is net income. pl_level: 1 income, 2 cost of goods sold, 3 expenses, 4 other income. budget_amount and budget_profit_effect come from the organization's overall budget in Xero and are empty when it has none or for months it does not cover (a budgeted account with no actual that month has amount 0). basis is Accrual (Xero reports default to accrual; the cash basis is not used).
14 columnsmonth, fiscal_year, account_id, account_code, account_name, account_path, account_type, section, pl_level, basis, amount, profit_effect, budget_amount, budget_profit_effect
[Xero] Balance sheetOne row per account per month-end (today for the current month) for this fiscal year and the two before it, matching the Xero Balance Sheet. Balances are points in time: never add month-ends together. is_cash = bank accounts; is_latest = the newest month-end. Current Year Earnings has no account id. basis is Accrual (Xero reports default to accrual; the cash basis is not used).
12 columnsmonth_end, fiscal_year, account_id, account_code, account_name, account_path, account_type, section, is_cash, is_latest, basis, balance
[Xero] Bank summaryOne row per bank account per month for this fiscal year and the two before it, from Xero's Bank Summary: opening balance, cash received, cash spent and closing balance. Cash received and spent include transfers between the organization's own bank accounts. For total cash over time use closing_balance at each month, never summed across months.
8 columnsmonth, fiscal_year, account_id, account_name, opening_balance, cash_received, cash_spent, closing_balance
[Xero] LedgerOne row per journal line, for this fiscal year and the two before it (it may start later when the ledger line cap is reached: check MIN(txn_date)). Double entry: every journal appears once per account it touches (an invoice has an Income line and a receivables line, both with the customer filled), so never sum amount across sections. amount on income and expense accounts is in the P&L's sign; on balance sheet accounts it is the signed journal amount (debit +, credit -). Revenue by customer = SUM(profit_effect) WHERE pl_level = 1, grouped by customer. Spend by vendor = SUM(amount) WHERE pl_level IN (2, 3), grouped by vendor. customer is filled for sales invoices and received money, vendor for bills and spent money; credit notes, payments and manual journals leave both blank, so totals by customer can be below Revenue. name is the customer or vendor; memo is the journal line description; class and location are the first two tracking category options. For income and expense accounts, SUM(profit_effect) by month equals the Profit and loss dataset. basis is Accrual (Xero reports default to accrual; the cash basis is not used).
22 columnstxn_date, month, fiscal_year, txn_id, txn_type, doc_num, account_id, account_code, account_name, account_path, account_type, section, pl_level, name, customer, vendor, class, location, memo, basis, amount, profit_effect
[Xero] Open invoicesEvery sales invoice with an amount still due today (AUTHORISED invoices), in the base currency (foreign-currency invoices converted at the invoice rate). A snapshot of today: no date filter applies. days_past_due is 0 until the due date. Credit notes, overpayments and prepayments that are not yet applied are not netted, so totals can differ from the Xero aged reports, which net them.
9 columnscustomer, txn_type, doc_num, txn_date, due_date, days_past_due, aging_bucket, amount, open_balance
[Xero] Open billsEvery bill with an amount still due today (AUTHORISED bills), in the base currency. A snapshot of today: no date filter applies. days_past_due is 0 until the due date. Credit notes, overpayments and prepayments that are not yet applied are not netted, so totals can differ from the Xero aged reports, which net them.
9 columnsvendor, txn_type, doc_num, txn_date, due_date, days_past_due, aging_bucket, amount, open_balance

Metric definitions

Each metric is a total over the period you ask about. A metric built from other metrics, such as a rate, divides the totals for the whole period; it does not average daily rates. Dated by is the date column that decides which period a row belongs to.

[Xero] Profit and loss

MetricHow it is calculatedDated byNotes
Xero revenueSum of amount, where pl_level = 1monthIncome accounts, by month, accrual basis. These are the books; Shopify's Net sales, when connected, is the store's own figure.
Xero cost of goods soldSum of amount, where pl_level = 2monthCost of sales (direct cost) accounts, by month.
Xero gross profitSum of profit_effect, where pl_level <= 2monthRevenue minus cost of goods sold, by month.
Xero gross marginXero gross profit ÷ Xero revenuemonthGross profit divided by revenue, as a decimal (0.42 = 42%).
Xero operating expensesSum of amount, where pl_level = 3monthOperating expense accounts, by month (not cost of goods sold, not other income).
Xero operating incomeSum of profit_effect, where pl_level <= 3monthGross profit minus operating expenses, by month.
Xero net incomeSum of profit_effectmonthEvery income and expense account, by month: Xero's net profit.
Xero net marginXero net income ÷ Xero revenuemonthNet income divided by revenue, as a decimal.
Xero budget revenueSum of budget_amount, where pl_level = 1monthBudgeted income, by month, from the organization's overall budget in Xero. Budget totals over a window wider than the budget's own months mix budgeted and unbudgeted months.
Xero budget operating expensesSum of budget_amount, where pl_level = 3monthBudgeted operating expenses, by month. Budget totals over a window wider than the budget's own months mix budgeted and unbudgeted months.
Xero budget net incomeSum of budget_profit_effectmonthBudgeted net income (budgeted income minus budgeted costs), by month. Budget totals over a window wider than the budget's own months mix budgeted and unbudgeted months.
Xero revenue vs budgetXero revenue − Xero budget revenuemonthActual revenue minus budgeted revenue, by month; negative is under budget. Budget totals over a window wider than the budget's own months mix budgeted and unbudgeted months.
Xero net income vs budgetXero net income − Xero budget net incomemonthActual net income minus budgeted net income, by month; negative is under budget. Budget totals over a window wider than the budget's own months mix budgeted and unbudgeted months.

[Xero] Balance sheet

MetricHow it is calculatedDated byNotes
Xero cash balanceSum of balance, where is_cash = 1 AND is_latest = 1Today’s snapshotBank account balances at the newest month-end (today, for the current month). For cash over time, group [Xero] Balance sheet by month_end; never add month-ends together.

[Xero] Bank summary

MetricHow it is calculatedDated byNotes
Xero cash receivedSum of cash_receivedmonthMoney received into bank accounts, by month, from Xero's Bank Summary.
Xero cash spentSum of cash_spentmonthMoney paid out of bank accounts, by month, from Xero's Bank Summary.
Xero net cash movementXero cash received − Xero cash spentmonthCash received minus cash spent, by month (bank transfers between the organization's own accounts net to zero).

[Xero] Open invoices

MetricHow it is calculatedDated byNotes
Xero open receivablesSum of open_balanceToday’s snapshotWhat customers owe today, from the open invoices list, in the base currency.
Xero overdue receivablesSum of open_balance, where days_past_due > 0Today’s snapshotOpen invoice balances past their due date today.

[Xero] Open bills

MetricHow it is calculatedDated byNotes
Xero open payablesSum of open_balanceToday’s snapshotWhat the organization owes vendors today, from the open bills list, in the base currency.

Questions to ask

Ask Xero in plain words

Try the questions on sample data with no signup, then connect Xero read-only and ask your own.

Try Quiriz free →

Frequently asked questions

Does Quiriz change anything in Xero?
No. The Xero connector is read-only. Quiriz reads the data into datasets and never writes back to Xero.
How often does the Xero data refresh?
Once a day. Each dataset shows when it was last updated, and answers use the latest refresh.
Can I change how a metric is calculated?
Yes. The definitions are added to Company Context, where an admin can edit the formula, the filter or the date it uses. A daily refresh never overwrites a definition someone has changed.
Can I combine Xero with other sources?
Yes. An admin can also define a metric from metrics on different datasets. See cross-source metrics.

All connectors: Quiriz connectors. Definitions on this page are generated from the product’s own connector code.