# Offline Solutions

The Jigx platform syncs all data to a local SQL database from where it is used in [Expressions](/building-apps-with-jigx/logic/expressions.md) and user interfaces ([jigs](/building-apps-with-jigx/ui/jigs-_screens_.md)). Once the data syncs, it is available without the need for an internet connection.

Data is synced to the device from one of five supported locations:

* [Dynamic Data](/building-apps-with-jigx/data/data-providers/dynamic-data.md): A built-in Jigx data source that automatically syncs data in real time between devices and the cloud.
* [REST](/building-apps-with-jigx/data/data-providers/rest.md) Services: REST-based web services that return data in JSON format.
* [Microsoft Azure SQL](/building-apps-with-jigx/data/data-providers/microsoft-azure-sql.md): Either Azure SQL Database or Microsoft SQL Server.
* [Salesforce](/building-apps-with-jigx/data/data-providers/salesforce.md): A Jigx provider for syncing Salesforce.com data.
* SOAP: A data provider for syncing data from SOAP-based services such as SAP.

When the app is online, data is synced from the cloud to the local SQLite database, from where it is accessed using data sources in jigs.

The command is put on a [queue](/building-apps-with-jigx/data/offline-remote-data-handling.md) when data is saved to the cloud. The queue is immediately executed when the device is online, and the data is sent to the applicable cloud service. When the device is offline, the cloud commands continue to be added to the queue until the device goes online.

The best practice for a robust offline solution is to sync as much data as is needed as early as possible in the usage cycle. This is typically when the solution launches. After that, the solution design should ensure the latest data is synced to the device to avoid just-in-time data loading.

Refer to the [Data lifecycles in Jigx](/building-apps-with-jigx/data/data-lifecycles-in-jigx.md) and [Syncing remote and loading local Data](/building-apps-with-jigx/data/syncing-remote-and-loading-local-data.md) sections to understand how to build robust solutions that go offline.

{% hint style="warning" %}
When a Jigx solution switches from offline to online, the queue is processed on a first-in-first-out basis. Jigx does not do conflict resolution. It assumes that the cloud-based system will handle its own data integrity.
{% endhint %}


---

# 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.jigx.com/building-apps-with-jigx/data/offline-solutions.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.
