> For the complete documentation index, see [llms.txt](https://help.modelreef.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.modelreef.io/help/xero-integration/data-library-mapping.md).

# Data Library Mapping

This article explains how data imported from Xero is stored in the Model Reef Data Library and how that mapping supports reusable variables and assumptions.

You will learn:

* How each mapped account becomes a Data Library series.
* How variables reference those series.
* How updates from Xero propagate through the model.
* How to work with imported series when building forecasts.

***

## From Xero account to Data Library entry

When you import actuals from Xero after mapping the COA, Model Reef:

{% stepper %}
{% step %}

### Create Data Library entries

Model Reef creates a **Data Library entry** for each mapped account, containing:

* Account code and name.
* Time series of values per period.
* Units and frequency.
* Tags or metadata indicating the Xero source.

Each Data Library entry is the canonical source for that account’s historical series inside the model.
{% endstep %}

{% step %}

### Link entries to variables

Model Reef links the Data Library entry to one or more **variables** in the model.

These links ensure the historical series from Xero is available to variables that use it for reporting and forecasting.
{% endstep %}
{% endstepper %}

***

## Variables referencing Xero series

For each mapped account, Model Reef either creates or updates a variable that:

* Lives in the mapped branch.
* Has the mapped variable type (Revenue, COGS, Opex, Staff, Asset, Liability, Equity, Tax, Dividend).
* Has the relevant category and subcategory for reporting.
* References the Data Library entry for its historical values.

You can then add forecast logic on top of the imported series, for example:

* Extend revenue using growth drivers.
* Project expenses with drivers or inflation.
* Convert historical margins into forward assumptions.

The historical part of the variable is anchored by the Data Library series from Xero. The forward part is driven by your modelling choices.

***

## Viewing Xero sourced series in the Data Library

In the Data Library view you can:

* Filter entries by source, for example show only Xero sourced series.
* Search by account code, account name or tags.
* Inspect the time series for each imported account.
* See which variables reference a given series.

This is useful for auditing and for understanding how raw accounting data feeds into the model.

***

## Editing or adjusting imported series

In most cases you will treat Xero sourced series as **read only historical data** and build adjustments via separate variables or drivers.

If you need to adjust data for one-off reclassifications, management adjustments not yet posted in Xero, or normalisations for unusual periods, you can either:

* Adjust the values in the Data Library entry directly (with care and documentation).
* Create separate adjustment variables that overlay or offset the imported series.

For transparency, the second approach is often preferable in formal reporting contexts.

***

## Propagation of updates

When you rerun an actuals import or refresh from Xero:

* Model Reef updates the Data Library entries with any new or changed values.
* Variables that reference those entries automatically pick up the updated historical series.
* All statements, dashboards and valuations are recalculated.

You do not need to manually touch each variable to reflect new actuals. The Data Library acts as the central hub.

***

## Using Xero series as drivers

In some models you may also use Xero sourced series as **drivers**, for example:

* Using historical sales to drive demand forecasts.
* Using historical cost patterns to calibrate forward COGS or Opex assumptions.
* Using historical payroll to inform future staffing models.

Because Xero series are Data Library entries like any other, you can reference them in formulas and driver configurations just as you would with manually created drivers.

***

{% hint style="info" %}

### Practical tips

* Keep Xero sourced Data Library entries clearly tagged so they are easy to distinguish from manual drivers and external series.
* Avoid overwriting historical values from Xero unless there is a clear, documented reason to do so.
* Use adjustment variables rather than editing raw series when you need to present adjusted vs reported views.
* Use visual checks and sample reconciliations to confirm the imported series match Xero reports.
  {% endhint %}

***

## Related articles

* [Crop Yield Forecasts](/use-cases/agriculture-and-primary-production/crop-yield-forecasts.md)
* [Combine Multiple External Data Sources](/how-tos/data-workflows-and-automation/combine-multiple-external-data-sources.md)
* [Fundamental Data Mapping](/help/stock-ticker-fundamentals/fundamental-data-mapping.md)
* [Data Library Viewer](/syntax/understanding-the-interface/data-library-viewer.md)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://help.modelreef.io/help/xero-integration/data-library-mapping.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
