Data Flow
This page describes how data moves between Logidav and all connected external systems -- inbound, outbound, and internal transformations.
Main Data Flow
Inbound Flows
Orders from Magento
The primary order pipeline pulls new and updated orders from Magento 2:
| Command | Schedule | What It Does |
|---|---|---|
menzzo:v2:sales | Every 10 min | Imports new orders from Magento |
menzzo:v2:sales:update | Every 30 min | Syncs status changes on existing orders |
menzzo:v2:sales:payment | Periodic | Processes payment confirmations |
Data imported: orders, line items, customer information, shipping addresses, payment status.
Products from Magento
| Command | Schedule | What It Does |
|---|---|---|
menzzo:v2:products | Every 2 hours | Syncs the product catalog |
Data imported: product attributes, prices, descriptions, images, availability status.
Marketplace Orders
Orders from third-party marketplaces (Amazon, Cdiscount, ManoMano) are imported through ErpBundle:
- Each marketplace has its own import command
- Orders are normalized into the same internal
Sale+SaleProductformat - Marketplace-specific fields (marketplace order ID, channel) are preserved for routing
Supplier Data
Supplier bundles (BigbuyBundle, VidaxlBundle, etc.) import:
- Product catalogs and pricing
- Stock levels at supplier warehouses
- Delivery lead times
All inbound data goes through the same pipeline: Import → Normalize → Persist → Events → Queue. This ensures consistent processing regardless of the data source.
Outbound Flows
Shipments to Carriers
When orders are ready to ship, Logidav generates shipping labels and tracking numbers:
| Carrier | API Client | What Is Sent |
|---|---|---|
| ChronoPost | ChronoPostApi | Label generation, pickup scheduling |
| BRT | BrtApi | Label generation, tracking updates |
| GLS | GlsApi | Label generation, tracking |
| Geodis | GeodisApi | Heavy-item shipping, pallet labels |
| DPD | via carrier service | Parcel shipping labels |
Data exported: recipient address, parcel dimensions/weight, service level, tracking numbers returned.
Stock and Products to Marketplaces
Logidav pushes product and inventory data back to marketplaces:
| Data Type | Direction | Frequency |
|---|---|---|
| Stock levels | Logidav → Marketplaces | Near real-time via queues |
| Product prices | Logidav → Marketplaces | On change (event-driven) |
| New products | Logidav → Marketplaces | On creation |
| Tracking numbers | Logidav → Marketplaces | After shipment |
Order Status to Magento
Status updates flow back to Magento as orders progress:
- Order confirmed → Magento status update
- Order shipped → tracking number pushed to Magento
- Order refunded → credit memo created in Magento
Payment Operations
Payment-related outbound flows:
- Capture charges after shipment confirmation
- Process refunds on cancellations
- Handle installment payment status updates
Internal Data Flows
Stock Mutation Flow
Stock mutations are one of the most critical internal flows. Every inventory change is journaled for auditability:
Stock mutations are immediate and synchronous -- they happen in the same transaction as the order import. The ProductQtyLogService creates a journal entry for every single stock change, with the source (sale, manual adjustment, supplier sync, etc.) recorded for traceability.
Order Lifecycle Flow
An order moves through several states, each triggering different data flows:
Event-Driven Side Effects
Domain events trigger cascading data updates across the system. See Bundle Responsibilities -- EventBundle for the complete event catalog and Queue Model for how async tasks are processed.