> 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/magento2_en_us/getting-started/architecture-data-directions-and-status.md).

# Architecture, Data Directions, and Status

The connector runs within **Business Central**, sends HTTPS requests to the **Magento REST API**, and stores mappings, statuses, and logs in BC.

### Data Flow

```mermaid
flowchart LR
    subgraph BC[Business Central]
        Items[Items & Variants]
        Stock[Inventory per Location]
        Sales[Sales Documents]
        Logs[Logs]
    end
    subgraph MAG[Magento 2]
        Catalog[Products & Categories]
        MSI[MSI Sources]
        Orders[Orders]
    end
    Items -->|Upload| Catalog
    Stock -->|Source Items| MSI
    Orders -->|Download| Sales
    Sales -->|Shipment / Tracking / Invoice| Orders
    Catalog -.->|Initial or Product Download| Items
    MAG -->|Result| Logs
```

### What Moves Where?

| Data Area                           | Direction                      | Typical Trigger                     |
| ----------------------------------- | ------------------------------ | ----------------------------------- |
| Reference data and mappings         | Magento → BC                   | Initial download                    |
| Items, variants, categories, images | BC → Magento; partial download | Single action or Cockpit            |
| Inventory                           | BC → Magento MSI               | Single or batch run                 |
| Orders                              | Magento → BC                   | Cockpit or validated job            |
| Shipment, tracking, invoice         | BC → Magento                   | Document action or batch run        |
| Credit memos                        | Magento → BC                   | Download; document creation limited |

### Typical Process

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

1. User or validated job starts an area.
2. Preflight checks configuration and dependencies.
3. Magento delivers REST data.
4. BC creates or updates records.
5. Business log and target state are verified.
   {% endtab %}

{% tab title="Upload" %}

1. BC record or batch run is selected.
2. Active status and required fields are checked.
3. The connector generates Magento JSON.
4. Magento creates or updates the target object.
5. ID, timestamp, and message are stored.
   {% endtab %}
   {% endtabs %}

### Reading Status Correctly

{% hint style="warning" %}
**Synced**, **Synced At**, **Magento ID**, and **Status Reason** describe the last documented run. They do not prove current parity between both systems.
{% endhint %}

For important operations, always verify the BC record, the corresponding business log, and the actual Magento state.


---

# 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/magento2_en_us/getting-started/architecture-data-directions-and-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.
