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

# ERP integration overview

> How Omnilinker reads products, prices and stock from your on-premise ERP, and what you need to set it up.

The ERP integration keeps Omnilinker in step with the ERP system you run on your own premises. A small Windows
program, the ERP Sync agent, reads changes from your ERP database and sends them to Omnilinker. Omnilinker then
updates your catalog and inventory.

## How it works

The ERP Sync agent is a Windows service plus a tray app, installed together on a computer in your network. One agent
serves one connection.

```mermaid theme={null}
flowchart LR
  subgraph site["Your network"]
    db[("ERP database<br/>(SQL Server)")]
    agent["ERP Sync agent<br/>(Windows service + tray app)"]
  end
  subgraph cloud["Omnilinker"]
    erp["ERP Integration"]
    targets["Catalog and Inventory"]
  end
  db -- "changes read by the agent" --> agent
  agent -- "change events, outbound HTTPS" --> erp
  erp --> targets
```

* **The agent does the ERP work.** It connects to your ERP database, detects what changed and queues each change in
  a local outbox. It then sends the queued changes to Omnilinker over HTTPS. If the internet connection drops, the
  changes wait in the outbox until it comes back.
* **Your ERP credentials stay in your network.** You enter the database connection details in the agent, not in the
  web app. The agent stores them in an encrypted file on its own computer, protected with Windows data protection
  (DPAPI). Omnilinker never asks for, stores or receives your ERP database password.
* **All connections go out from your network.** The agent calls Omnilinker; Omnilinker never connects into your
  network. The agent signs in with an agent API key that you generate for the connection.
* **Omnilinker never runs ERP code.** The ERP-specific logic (the provider) runs only inside the agent. The agent
  uploads a description of its provider, including the ERP fields it can read, and the mapping screens in Omnilinker
  are built from that description.

## What syncs

Data flows one way: from your ERP to Omnilinker. Omnilinker does not write back to your ERP yet.

| Data                                                    | Where it lands in Omnilinker       | Needs WFM\_INT change tracking |
| ------------------------------------------------------- | ---------------------------------- | ------------------------------ |
| Products                                                | Catalog products                   | No                             |
| Brands                                                  | Catalog brands                     | No                             |
| Bundle composition (the components of a bundle product) | Catalog bundle products            | No                             |
| Price levels                                            | Catalog price levels               | No                             |
| Product prices                                          | Prices per product and price level | Yes                            |
| Warehouses                                              | Inventory warehouses               | Yes                            |
| Stock                                                   | Inventory stock per warehouse      | Yes                            |

The agent detects changes in one of two ways, set per connection:

* **Hash scan** (the default) compares ERP records with what it sent before. It makes no changes to your ERP
  database. It covers products and brands. Price levels are read once a day in either mode.
* **WFM\_INT change tracking** uses your ERP's own change-tracking framework. It detects changes faster and also
  covers prices, warehouses and stock. Turning it on writes rows to the ERP's change-tracking framework
  tables, never to your business data, and needs your consent in the tray app. See
  [Requirements](/erp/requirements#sql-server-login) for exactly what it writes.

Price levels and warehouses must be mapped to their Omnilinker counterparts before prices and stock can be applied.
See [Reference items](/erp/reference-items).

<Note>
  Orders are not synced. The ERP integration does not send marketplace or Omnilinker orders to your ERP, and it does
  not read orders from it.
</Note>

## Supported ERP systems

| ERP system     | Status                                        |
| -------------- | --------------------------------------------- |
| Wapro          | Available. See [Wapro](/erp/providers/wapro). |
| Subiekt GT     | Not available yet                             |
| Comarch Optima | Not available yet                             |
| Enova          | Not available yet                             |

The **Provider** list in the web app also shows Subiekt GT, Comarch Optima, Enova and Custom. Only Wapro has a working
agent provider today, so choose **Wapro** when you create a connection.

## Set up the integration

Check the [requirements](/erp/requirements) first, then work through these steps. Setup is split between the tenant
admin, who works in the web app, and the IT person who installs the agent.

<Steps>
  <Step title="Create a connection">
    In the web app, create the connection and generate its agent API key.
    See [Create a connection](/erp/create-connection).
  </Step>

  <Step title="Install the agent">
    Install the ERP Sync agent on a Windows computer that can reach your ERP database.
    See [Install the agent](/erp/install-agent).
  </Step>

  <Step title="Run the setup wizard">
    Enter the agent API key and your ERP database details in the agent.
    See [Setup wizard](/erp/setup-wizard).
  </Step>

  <Step title="Configure sync">
    Choose what syncs, map fields and map price levels and warehouses.
    See [Sync configuration](/erp/sync-configuration), [Field mappings](/erp/field-mappings) and
    [Reference items](/erp/reference-items).
  </Step>
</Steps>

Once the agent is running, see [Monitoring](/erp/monitoring) to check that changes arrive.
