With the JTL Fulfillment Network (FFN) connection, X-Sitter works as a **fulfiller** for merchants in the JTL network. After you have connected your JTL account, X-Sitter reads the merchants, their products, their inbound deliveries (as advance notices) and their outbound orders (as orders), and reports shipments, goods receipts and stock back to FFN.

This page covers the connection itself. Afterwards you assign the merchants to your clients ([FFN merchants](/jtl/ffn-merchants.md)) and switch on the order processing ([FFN order processing](/jtl/ffn-order-processing.md)).

![Screenshot: Page "Fulfillment - Connection" with the green "Connected" status and the "Reconnect" button](/jtl/images/ffn-connection-overview.png)

## Before you start

- You need a JTL account that is registered as a fulfiller in the JTL Fulfillment Network.
- Your user needs the permission **JTL › FFN Connection** – ask your administrator. If the menu is missing for your company, contact X-Sitter support to activate the JTL module.
- You do not need any API keys. X-Sitter's access to JTL is already set up; you only confirm it in your JTL account.

## Step by step

### 1. Connect

1. In the sidebar open **ERP Systems › JTL › FFN Connection** (*ERP-Systeme › JTL › FFN Verbindung*). The page is titled **Fulfillment - Connection** (*Fulfillment - Verbindung*).
2. Click **Request all permissions & connect now** (*Jetzt alle Rechte anfordern & verbinden*).
3. You are redirected to JTL. Log in with your JTL account and confirm the access for X-Sitter.
4. Back in X-Sitter you see **The connection was successfully established** (*Die Verbindung wurde erfolgreich hergestellt*).

![Screenshot: "Fulfillment - Connection" page before the first connection with the button "Request all permissions & connect now"](/jtl/images/ffn-connection-connect-button.png)

### 2. Check the connection status

When you open the page again, it shows the status of the connection at the top:

| Status | Meaning | What to do |
|---|---|---|
| **Connected. Access token valid until … , last renewed …** (*Verbunden. Zugriffstoken gültig bis … , zuletzt erneuert …*) | Everything is fine | Nothing |
| **The access token has expired** (*Der Zugriffstoken ist abgelaufen*) | The access is renewed automatically every 10 minutes | If the message stays, click **Reconnect** |
| **Last token refresh failed: …** (*Letzter Token-Refresh fehlgeschlagen*) | JTL refused the renewal | Click **Reconnect** (*Verbindung neu herstellen*) and confirm the access in JTL again |

X-Sitter keeps the connection alive automatically. You only have to reconnect if one of the warnings above stays.

### 3. Assign merchants and switch on processing

1. Assign each FFN merchant to a client: [FFN merchants](/jtl/ffn-merchants.md).
2. Create the FFN jobs for the client in **Administration › Jobs & connections** (*Administration › Jobs & Verbindungen*), see [Jobs & connections](/administration/jobs-and-connections.md):
   - **FFN orders** (*FFN - Aufträge laden*) – orders, goods receipts and stock, see [FFN order processing](/jtl/ffn-order-processing.md),
   - **FFN products** (*FFN-Produkte laden*) – first import of the merchant's products, with the fields **Can view the item** (*Darf Artikel sehen*), **Owner** (*Eigentümer*) and category,
   - **FFN product updates** (*FFN - Produkt Updates*) – keeps the products up to date, with the field **Owner**.
3. Set the cut-off dates in the **Takeover by X-Sitter** card (see below).

### 4. The "Takeover by X-Sitter" card

As soon as the connection exists, a second card **Takeover by X-Sitter** (*Übernahme durch X-Sitter*) appears on the same page.

**Orders and goods receipts** (*Aufträge und Wareneingänge*)
A table lists every merchant with an active order job: **FFN merchant** (*FFN-Händler*), **Company** (*Firma*), the cut-off date **Orders and goods receipts from** (*Aufträge und Wareneingänge ab*) and the link **Edit job** (*Job bearbeiten*). A merchant without a date shows the badge **no cut-off date – the job does nothing** (*kein Stichtag – der Job tut nichts*). The date itself is set in the job, see [FFN order processing](/jtl/ffn-order-processing.md).

**Notifications** (*Avisierungen*) – the advance notice import
1. Under **Import ASNs from** (*Avise importieren ab*) choose a date.
2. Click **Save cutoff date** (*Stichtag speichern*).

From this date on, FFN inbound deliveries of all assigned merchants are created as [advance notices](/inbound/advance-notices.md) in X-Sitter. Leave the field empty to switch the import off. This date applies to your whole company, not per merchant.

![Screenshot: Card "Takeover by X-Sitter" with the merchant table, one merchant without cut-off date, and the "Import ASNs from" field](/jtl/images/ffn-connection-takeover-card.png)

## What is synchronised

| Data | Direction | How often |
|---|---|---|
| Waiting outbound orders → orders (after a stock check), acknowledgement in FFN, cancellations from FFN | FFN ↔ X-Sitter | every minute, only with a cut-off date in the job |
| Shipment notification with quantities, parcels and tracking numbers | X-Sitter → FFN | every 5 minutes |
| Goods receipts for FFN advance notices, closing the advance notice | X-Sitter → FFN | every 5 minutes, only with a cut-off date in the job |
| Stock reconciliation per article | X-Sitter ↔ FFN | every hour, if switched on in the job |
| Products (first import) | FFN → X-Sitter | every minute |
| Product updates | FFN → X-Sitter | every hour |
| Inbound deliveries → advance notices | FFN → X-Sitter | every 3 minutes, only with the date "Import ASNs from" |

## Good to know / Troubleshooting

| Message / symptom | Cause | Solution |
|---|---|---|
| An error text instead of the success message after returning from JTL | JTL did not complete the login | Start the connection again |
| **Last token refresh failed: … The refresh token is invalid.** | The access was used or revoked elsewhere, or it expired after a long pause | Click **Reconnect** |
| No orders arrive | Merchant not assigned, order job inactive or without cut-off date, or not enough stock | See [FFN order processing](/jtl/ffn-order-processing.md) |
| No advance notices arrive | No date under **Import ASNs from**, or the merchant is not assigned | Set the date and check the [merchant assignment](/jtl/ffn-merchants.md) |

!!!
You can receive problems with the FFN connection (expired access, failed import of orders or advance notices) as a Telegram message. Subscribe to **JTL-FFN - error** (*JTL-FFN - Fehler*), see [Telegram notifications](/account/telegram-notifications.md).
!!!
