Skip to main content

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:

CommandScheduleWhat It Does
menzzo:v2:salesEvery 10 minImports new orders from Magento
menzzo:v2:sales:updateEvery 30 minSyncs status changes on existing orders
menzzo:v2:sales:paymentPeriodicProcesses payment confirmations

Data imported: orders, line items, customer information, shipping addresses, payment status.

Products from Magento

CommandScheduleWhat It Does
menzzo:v2:productsEvery 2 hoursSyncs 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 + SaleProduct format
  • 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
info

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:

CarrierAPI ClientWhat Is Sent
ChronoPostChronoPostApiLabel generation, pickup scheduling
BRTBrtApiLabel generation, tracking updates
GLSGlsApiLabel generation, tracking
GeodisGeodisApiHeavy-item shipping, pallet labels
DPDvia carrier serviceParcel 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 TypeDirectionFrequency
Stock levelsLogidav → MarketplacesNear real-time via queues
Product pricesLogidav → MarketplacesOn change (event-driven)
New productsLogidav → MarketplacesOn creation
Tracking numbersLogidav → MarketplacesAfter 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:

warning

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.