> ## Documentation Index
> Fetch the complete documentation index at: https://docs.chift.eu/llms.txt
> Use this file to discover all available pages before exploring further.

# Ledger Preview

The **Preview** feature for ledger entries allows you to **safely test and validate synchronization flows** without committing any actual ledger entries to the target accounting system. It acts like a sandbox mode for data synchronization, showing exactly which ledger entries would be created **without writing any real data**.

<Warning>
  For now, only Point of Sale to Accounting (*Export des ventes vers la
  comptabilité - Par catégorie OU Taux de TVA*) is supported.
</Warning>

## Purpose & business value

* **Risk reduction:** Preview data before activating a flow, avoiding duplicates or errors.
* **Confidence building:** See exactly which ledger entries would be created.
* **Debugging & compliance:** Access execution logs to troubleshoot issues and verify accounting accuracy.
* **Time & support savings:** Reduces failed integrations and support tickets.

## How it works

### 1. Initiate preview

Start a preview from the flow configuration modal by clicking **Aperçu des écritures comptables**.

<img width="80%" style={{ display: 'block', margin: 'auto' }} src="https://mintcdn.com/chift/YfM6CGx7RnGBih-K/assets/docs/syncs/preview/01.png?fit=max&auto=format&n=YfM6CGx7RnGBih-K&q=85&s=ebb2c165710bc7b7ae02b3f326e859b7" alt="Flow configuration modal with preview button" data-path="assets/docs/syncs/preview/01.png" />

### 2. Select date range

Choose a date range for the preview. Only historical data can be selected (max 1 year).

<img width="80%" style={{ display: 'block', margin: 'auto' }} src="https://mintcdn.com/chift/YfM6CGx7RnGBih-K/assets/docs/syncs/preview/02.png?fit=max&auto=format&n=YfM6CGx7RnGBih-K&q=85&s=a9839c4c8bac46bced19f5a42afdf919" alt="Date range selection dialog" data-path="assets/docs/syncs/preview/02.png" />

### 3. System processing

The preview runs asynchronously, generating simulated ledger entries. You will be notified by email when the preview is ready.

<img width="80%" style={{ display: 'block', margin: 'auto' }} src="https://mintcdn.com/chift/YfM6CGx7RnGBih-K/assets/docs/syncs/preview/03.png?fit=max&auto=format&n=YfM6CGx7RnGBih-K&q=85&s=e4b0218adf080ed30e77a9101e5ae80e" alt="Preview processing status" data-path="assets/docs/syncs/preview/03.png" />

### 4. Email notification

Once the preview finishes, the system sends an email with a link to view the results or errors.

<img width="80%" style={{ display: 'block', margin: 'auto' }} src="https://mintcdn.com/chift/YfM6CGx7RnGBih-K/assets/docs/syncs/preview/04.png?fit=max&auto=format&n=YfM6CGx7RnGBih-K&q=85&s=a846cfe8aee064a8173774d795c53aa6" alt="Email notification with preview results link" data-path="assets/docs/syncs/preview/04.png" />

### 5. Review results

Access the preview results through two tabs:

**Ledger tab:** Displays formatted journal entries (debits, credits, accounts, descriptions).

<img width="80%" style={{ display: 'block', margin: 'auto' }} src="https://mintcdn.com/chift/YfM6CGx7RnGBih-K/assets/docs/syncs/preview/05.png?fit=max&auto=format&n=YfM6CGx7RnGBih-K&q=85&s=4f69ceb5ac4f9a2ef29f910518ab72c5" alt="Ledger tab showing journal entries" data-path="assets/docs/syncs/preview/05.png" />

**Logs tab:** Shows execution details, errors, and debug information.

<img width="80%" style={{ display: 'block', margin: 'auto' }} src="https://mintcdn.com/chift/YfM6CGx7RnGBih-K/assets/docs/syncs/preview/06.png?fit=max&auto=format&n=YfM6CGx7RnGBih-K&q=85&s=b5aa9fc0d52a8b215d68e65b4e2ecc95" alt="Logs tab showing execution details" data-path="assets/docs/syncs/preview/06.png" />

### 6. Decision

Based on the preview results, you can activate the flow, adjust configurations, or run another preview.

## Feature highlights

### Status tracking

The system tracks preview status throughout the process:

| Status      | Description                                       |
| ----------- | ------------------------------------------------- |
| **pending** | Preview is running                                |
| **ready**   | Preview completed successfully, results available |
| **viewed**  | User has accessed the preview results             |
| **failed**  | Preview encountered an error                      |

### Additional features

* **Secure access:** Each preview is scoped to the requesting user and time-limited.
* **Email notifications:** Users are notified when a preview completes or fails, with links to view results or errors.
* **Ledger entry validation:** Verify that ledger entries are balanced (debits = credits) before committing.

<Info>Preview result links expire after 7 days.</Info>
