> For the complete documentation index, see [llms.txt](https://docs.solutioo.de/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.solutioo.de/magento-2-api-connector/erste-schritte/architektur-datenrichtungen-und-status.md).

# Architektur, Datenrichtungen und Status

Der Connector läuft innerhalb von **Business Central**, sendet HTTPS-Anfragen an die **Magento-REST-API** und speichert Zuordnungen, Status und Protokolle in BC.

### Datenfluss

```mermaid
flowchart LR
    subgraph BC[Business Central]
        Items[Artikel & Varianten]
        Stock[Bestand pro Lagerort]
        Sales[Verkaufsbelege]
        Logs[Protokolle]
    end
    subgraph MAG[Magento 2]
        Catalog[Produkte & Kategorien]
        MSI[MSI Sources]
        Orders[Bestellungen]
    end
    Items -->|Upload| Catalog
    Stock -->|Source Items| MSI
    Orders -->|Download| Sales
    Sales -->|Lieferung / Tracking / Rechnung| Orders
    Catalog -.->|Initial- oder Produktdownload| Items
    MAG -->|Ergebnis| Logs
```

### Was bewegt sich wohin?

| Datenbereich                           | Richtung                         | Typischer Auslöser                     |
| -------------------------------------- | -------------------------------- | -------------------------------------- |
| Referenzdaten und Mappings             | Magento → BC                     | Initialdownload                        |
| Artikel, Varianten, Kategorien, Bilder | BC → Magento; teilweise Download | Einzelaktion oder Cockpit              |
| Bestand                                | BC → Magento MSI                 | Einzel- oder Sammellauf                |
| Bestellungen                           | Magento → BC                     | Cockpit oder geprüfter Job             |
| Lieferung, Tracking, Rechnung          | BC → Magento                     | Belegaktion oder Sammellauf            |
| Gutschriften                           | Magento → BC                     | Download; Belegerzeugung eingeschränkt |

### Typischer Prozess

{% tabs %}
{% tab title="Download" %}

1. Benutzer oder geprüfter Job startet einen Bereich.
2. Preflight prüft Konfiguration und Abhängigkeiten.
3. Magento liefert REST-Daten.
4. BC legt Daten an oder aktualisiert sie.
5. Fachprotokoll und Zielzustand werden kontrolliert.
   {% endtab %}

{% tab title="Upload" %}

1. BC-Datensatz oder Sammellauf wird gewählt.
2. Aktivstatus und Pflichtfelder werden geprüft.
3. Der Connector erzeugt Magento-JSON.
4. Magento erstellt oder aktualisiert das Zielobjekt.
5. ID, Zeitstempel und Meldung werden gespeichert.
   {% endtab %}
   {% endtabs %}

### Status richtig lesen

{% hint style="warning" %}
**Synced**, **Synced At**, **Magento ID** und **Status Reason** beschreiben den letzten dokumentierten Lauf. Sie beweisen keinen aktuellen Gleichstand beider Systeme.
{% endhint %}

Prüfen Sie bei wichtigen Vorgängen immer den BC-Datensatz, das passende Fachprotokoll und den tatsächlichen Magento-Zustand.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.solutioo.de/magento-2-api-connector/erste-schritte/architektur-datenrichtungen-und-status.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
