Skip to content

Integration / Symfony + Magento 2

Comarch XL and Magento 2: data exchange without ERP locks

A fashion company keeps its stock, order and delivery data in Comarch XL and sells through a Magento 2 store. We put a separate data bus between the two that exchanges orders, statuses, invoices, prices and stock in both directions. The store never queries the ERP directly, so customer traffic does not lock the Comarch XL database.

Data bus build

Zero locks
on the ERP database
the store never queries Comarch XL directly

Starting point

Querying the ERP straight from the store was too risky

Comarch XL is the source of data on stock, orders and deliveries, and its table structure is very complex. The Magento 2 store needs that data continuously, but connecting it straight to the ERP database raised two problems. The store code would have to know the internals of Comarch XL and change along with them. Customer traffic, in turn, would turn directly into queries against the ERP database, loading it and locking tables the whole company relies on. The integration had to connect the two systems while keeping the ERP database out of the store's reach.

What we did

A separate data bus that takes on the ERP's complexity

We built a data bus on Symfony that carries every exchange between the store and the ERP. It is the only part that knows how Comarch XL is structured.

  1. 1

    A layer between the store and the ERP

    The bus sits between Magento 2 and Comarch XL and takes on all the complexity of the ERP's tables. The store talks to it over a REST API and does not need to know how data is stored in Comarch XL. The bus also keeps load off the ERP database, because store customer traffic never reaches it directly.

  2. 2

    Orders from the store to the ERP

    Orders placed in Magento 2 travel through the bus to Comarch XL. The store never writes to the ERP database itself; it hands the order to the bus, which knows how to store it in the Comarch XL structure. That keeps the store code independent of how the ERP's tables are built.

  3. 3

    Statuses, shipping and invoices back to the store

    In the other direction, the bus sends order statuses, shipping data and invoices to Magento 2. We turn the invoices into PDFs that go to customers. Customers see the current state of their order in the store, while Comarch XL remains the source of that information.

  4. 4

    The catalogue with prices and stock on the same route

    The catalogue with prices and stock levels reaches the store through the same bus. All data exchange between the store and the ERP follows one route. The store shows prices and availability from Comarch XL without querying it every time a customer opens a product page.

Outcome

The store has ERP data, and the ERP database feels no traffic

Magento 2 and Comarch XL exchange data both ways: orders go to the ERP, while statuses, shipping data, invoices, prices and stock come back to the store. All of it runs through the data bus, so the store never queries Comarch XL directly and customer traffic neither loads the ERP database nor locks its tables. The store code does not depend on the ERP's internals, because only the bus knows how Comarch XL is structured.

  • Two-way exchange of orders, statuses and invoices
  • Invoice PDFs generated for customers
  • Zero locks on the Comarch XL database

We can connect your store to the ERP without loading its database

We integrate Magento 2 with Comarch XL and other ERP systems through a layer that shields the database from store traffic. Tell us what data should flow between your systems.