X-Sitter can work directly with the database of a JTL-Wawi (Microsoft SQL Server). The connection is used in two directions:

- **JTL as the target:** orders from your sales channels and marketplaces are handed over to the JTL order import. Tracking numbers are read back from the JTL delivery notes and shipments and reported to the sales channel.
- **JTL as the source:** orders, articles, categories, images, prices and stock are taken over from a JTL-Wawi into X-Sitter. Stock from the X-Sitter warehouse can be written back to JTL.

This page shows what you set up yourself. The detailed JTL settings (platforms, order import, price groups) are described in [JTL settings](/jtl/jtl-settings.md).

![Screenshot: Administration › Jobs & connections, tab "Connections" with a connection of type JTL in the list](/jtl/images/jtl-connection-overview.png)

## Before you start

- The JTL module must be active for your company. Contact X-Sitter support to activate it.
- Your JTL-Wawi SQL server must be reachable from the internet. You need: host, port, instance, database user, password, database name and the JTL version. Your JTL administrator or IT service provider can give you these details.
- To manage jobs and connections you need access to **Administration › Jobs & connections** (*Administration › Jobs & Verbindungen*). See [Jobs & connections](/administration/jobs-and-connections.md). Clients can only use this mask after their logistician has released it.
- Write down the exact names of the shipping methods and payment methods in your JTL-Wawi. They must match character by character.

## Step by step

### 1. Create the SQL connection

1. Open **Administration › Jobs & connections** (*Administration › Jobs & Verbindungen*) and switch to **Connections** (*Verbindungen*).
2. Click **New connection** (*Neue Verbindung*).
3. Choose the **Company** (*Firma*) the connection belongs to – your own company or one of your clients.
4. Choose the **Type** (*Typ*) **JTL**. The form for the SQL access data appears.
5. Fill in the access data (see the table below) and optionally a **Comment** (*Bemerkung*).
6. Optional: under **Share with** (*Teilen mit*) choose another company. That company can then select the connection in its own jobs without seeing the access data.
7. Click **Save** (*Speichern*).

![Screenshot: "New connection" form with type JTL selected and the SQL access fields host, port, instance, user, password, database name and JTL version](/jtl/images/jtl-connection-new-connection.png)

Once a JTL connection exists for a company, its users can also maintain the access data themselves under **Company Settings › JTL › SQL - Connection** (*Firmen Einstellungen › JTL › SQL - Verbindung*), see [JTL settings](/jtl/jtl-settings.md).

### 2. Set up platforms and order import

Map your sales channels to JTL platforms and choose which JTL platforms are imported. See [JTL settings](/jtl/jtl-settings.md).

### 3. Create and activate the jobs

1. In **Administration › Jobs & connections** open the **Jobs** list and choose the company.
2. Create the JTL job you need (for example "send orders to JTL", "tracking from JTL", "import orders from JTL", "import articles from JTL", "write stock to JTL").
3. Open the job, select the JTL connection and fill in the job fields.
4. Switch the **Status** on and save.

If a job you need is not offered in the list, contact X-Sitter support.

![Screenshot: Job mask of a "send orders to JTL" job with the connection selection and the "JTL data" block](/jtl/images/jtl-connection-job-mask.png)

### 4. Activate the tracking feedback

For every sales channel that hands orders over to JTL, also activate the matching "tracking from JTL" job and select the JTL connection there. Only then are tracking numbers reported back to the sales channel.

## Fields and options

### SQL access data

| Field | Meaning |
|---|---|
| **Host** / **Port** / **Instance** (*Instanz*) | Address of the SQL server, its port and the SQL Server instance of the JTL-Wawi |
| **User** (*Benutzer*) | SQL database user |
| **Password** (*Passwort*) | Password of the database user |
| **Database Name** (*Datenbank Name*) | Name of the JTL database, usually `eazybusiness` |
| **JTL Version** | Version of your JTL-Wawi |
| **kBenutzer** | JTL user that is entered as the editor of imported orders. Easier to set under **Order Import**, see [JTL settings](/jtl/jtl-settings.md) |
| **kWarenlager** | Internal number of the JTL warehouse. Your JTL administrator can tell you the value |
| **nPlattform** | JTL platforms whose orders are imported. Easier to set under **Order Import** |

### "JTL data" block in the jobs that send orders to JTL

All jobs that hand orders from a sales channel to JTL share this block:

| Field | Meaning |
|---|---|
| Connection | Which JTL connection receives the orders |
| **Address data for JTL** (*Adress-Daten für die JTL*) | Only fill in if all orders of this company should be grouped under one JTL customer: address ID and company ID in the Wawi, company name, salutation, name, address, country |
| **JTL - shipping method** (*JTL - Versandart*) | Shipping method in JTL. Must match the name in JTL exactly |
| **JTL - payment method** (*JTL - Zahlart*) | Payment method in JTL, must exist in JTL |
| **Free shipping possible?** (*Versandkostenfrei möglich?*) | Whether orders may be transferred without shipping costs |
| **Submit product prices** (*Produktpreise übermitteln*) | Whether item prices are transferred to JTL |
| **Comment** (*Kommentar*) | Text that is transferred with every order |
| **Platform Id** (*Plattform Id*) | JTL platform the orders are assigned to |
| **Number prefix** (*Nummern Prefix*) | Prefix in front of the order number in JTL |

![Screenshot: The "JTL data" block of a job with shipping method, payment method and the address data for one JTL customer](/jtl/images/jtl-connection-jtl-data-block.png)

### Important fields in the other JTL jobs

| Job (purpose) | Important fields |
|---|---|
| Import orders from JTL | **Import from which point in time** (*Ab welchem Zeitpunkt importieren*), status after import, product type, **Overwrite number for supplier** (*Nummer für Lieferant überschreiben*), **Import route** (*Import Weg*: by platforms in the JTL menu or by supplier) |
| Create delivery notes in JTL | Logistician JTL, **Processing Layer** (*Verarbeitungsebene*: order or product), status after the delivery note, **Override shipping provider** (*Versanddienstleister überschreiben*) |
| Tracking for JTL orders | JTL connection of the logistician, **Override tracking carrier** (*Tracking Carrier überschreiben*), processing layer |
| Check stock in another JTL | Which JTL field to check (supplier number or article number), status with and without stock |
| Start a JTL workflow | Name of the JTL workflow, type (order or delivery), status that triggers it |
| Import articles from JTL | JTL categories (one per line), category tree, filter by attribute, import inactive products, delete deactivated products, take over stock |
| Stock from the logistician's JTL | Category name in the Wawi, category tree, map articles to |
| Write stock to your own JTL | **Initial reconciliation** (*Initial Abgleich*, switched off again after the first run), **Book into supplier warehouse** (*In Lieferantenlager buchen*), JTL Wawi warehouse (leave empty for the standard warehouse "1") |

## What is synchronised

| Data | Direction | How often |
|---|---|---|
| Orders from your sales channels into the JTL order import | X-Sitter → JTL | every few minutes |
| Tracking number, shipping method, weight, shipping date, cancellation | JTL → X-Sitter → sales channel | every few minutes during the day |
| Orders from JTL platforms | JTL → X-Sitter | every few minutes |
| Orders to another JTL (e.g. of the logistician) and stock check there | JTL → JTL | every few minutes |
| Create delivery notes and close orders in JTL | X-Sitter → JTL | every few minutes during working hours |
| Start JTL workflows | X-Sitter → JTL | every few minutes during working hours |
| Stock from the logistician's JTL | JTL → X-Sitter warehouse | every minute |
| Warehouse stock into your own JTL | X-Sitter → JTL | every few minutes |
| Articles, categories, characteristics, prices, images, storage places, manufacturers | JTL → X-Sitter | mostly every minute |

## Statuses

A sales channel order that runs through JTL typically goes through these statuses (see [Order statuses](/orders/order-statuses.md)):

1. **Open** (*Offen*) – the order has been imported.
2. **In shipping** (*im Versand*) – the order has been handed over to JTL.
3. The tracking number is read from JTL.
4. **Sent** (*Versendet*) – the tracking number has been reported to the sales channel.

Further statuses: **Stock check** (*Lager Prüfung*) and **Stock checked** (*Lager geprüft*) when the stock is checked in another JTL, and **Error** (*Fehler*).

JTL orders appear in the normal [order overview](/orders/order-overview.md).

![Screenshot: Order overview filtered on orders handed over to JTL, with status "in shipping" and a tracking number](/jtl/images/jtl-connection-order-overview.png)

## Good to know / Troubleshooting

| Message / symptom | Cause | Solution |
|---|---|---|
| Orders do not reach JTL, nothing happens | The job has no connection selected | Open the job and select the JTL connection |
| **No matching JTL database connection was found!** (*Es wurde keine passende JTL-Datenbank Verbindung gefunden!*) | The company has no JTL connection | Create the SQL connection (step 1) |
| Orders are not transferred | No orders in the status the job transfers | Check the status set in the job |
| The order hangs in the JTL XML import | The shipping method or payment method does not exist in JTL | Enter both exactly as they are named in JTL |
| No tracking in X-Sitter | The external order number in JTL does not match the number X-Sitter expects, or no shipment was booked in JTL | Make sure the transferred order number and the queried order number use the same setting in both jobs; book the shipment in JTL |
| **Keine Daten hinterlegt...** on a JTL WaWi page | The company has no JTL connection | Create the SQL connection |
| The SQL server cannot be reached | Host, port, instance or access data are wrong, or the server is not reachable from outside | Check the access data with your JTL administrator |
