# Data storage in the model

## Model initialization

The data model for the application is created when the application instance starts up (see [Running the application](/documentation/documentation-en/budowanie-aplikacji/aplikacja-biznesowa/uruchamianie-aplikacji.md)). Once the model is created, it can provide values for fields according to the definition of data sources. And accept values for fields stored locally.

## Data storage location

The data stored in the model can be divided into two types, depending on where it is stored and who manages it.

### Data retrieved from services

If the application uses data stored and managed by the organization’s systems or external systems, it is retrieved through services. The low-code application is not the owner of this data, cannot modify it, and does not control changes in its values.

The values are retrieved from the service and are always up to date, subject to cache (see [Editing the data model](/documentation/documentation-en/budowanie-aplikacji/model-danych/edycja-modelu-danych.md#zrodlo-danych)).

Examples

* customer's current address
  * the customer submits an application to purchase insurance
  * after submitting the application, and before generating the sales contract, the customer changes the address data stored in the bank (usually through a dedicated process)
  * the insurance sales contract contains the updated address - it will be retrieved in the process according to the data definition in the model
* account balance
  * while accepting the instruction, the application verifies whether there are sufficient funds in the account indicated by the customer to cover the servicing costs
  * before actually debiting the funds, the application may verify the funds again to correctly handle the account charge

### Data stored in the model

When data is created and managed by the application, it is stored in the data model. The low-code application owns it, can modify it, and controls changes in its values.

Examples

* requested credit card limit
  * when applying for a credit card, the customer provides the expected limit value
  * the application can change this value during process handling (e.g.
  * reduce it)
* customer's mailing address for process handling
  * when applying for a loan, the customer provides a mailing address
  * by default, the application displays the address stored in the bank’s systems (retrieved from the service)
  * however, the customer can change this address and request correspondence regarding this process to be sent to a different address
  * the application preserves the values entered by the customer

## Data outside the model

The low-code application does not have to store all data in the model. Some data is temporary in nature and is used only to determine the target value or make a decision, e.g.:

* list of the customer's accounts
  * generates the account selection domain from the Value selection from list field component
  * allows the customer to easily select a specific account
  * in the data model we only want to have the account selected by the customer; we do not need the entire list
* customer's age
  * allows a decision to be made about the possibility of purchasing the product (e.g. *Card <26*)
  * is calculated from the PESEL number

Temporary, operational data can be stored in session variables on forms, process variables, or script variables.


---

# Agent Instructions: 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://docs.eximee.com/documentation/documentation-en/budowanie-aplikacji/model-danych/przechowywanie-danych-w-modelu.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.
