Platform Export - Channel Updaters And Order Deserializers¶
Overview¶
This document specifies legacy platform-specific outbound update integrations and platform order deserializers that were missing from migration docs.
Checklist coverage:
- PX-003 Check24 updater
- PX-004 Euromaster updater
- PX-005 Roadzila updater
- PX-006 Easy4D updater
- PX-007 AdTyres updater
- PX-008 ZeroSeven updater
- PX-009 Directory/file-based updater
- PX-010 Platform order deserializers
Primary legacy evidence:
- src/Atraxion/Platform/Updater/Check24OrderUpdater.php
- src/Atraxion/Platform/Updater/EuromasterOrderUpdater.php
- src/Atraxion/Platform/Updater/RoadzilaOrderUpdater.php
- src/Atraxion/Platform/Updater/Easy4DOrderUpdater.php
- src/Atraxion/Platform/Updater/AdTyresOrderUpdater.php
- src/Atraxion/Platform/Updater/ZeroSevenOrderUpdater.php
- src/Atraxion/Platform/Updater/DirectoryOrderUpdater.php
- src/Atraxion/Platform/Updater/ProxyOrderUpdater.php
- src/Atraxion/Platform/Updater/AggregateOrderUpdater.php
- src/Atraxion/Platform/OrderMapper/Check24OrderDeserializer.php
- src/Atraxion/Platform/OrderMapper/Check24TyreOrderDeserializer.php
- src/Atraxion/Platform/OrderMapper/Check24SetOrderDeserializer.php
- src/Atraxion/Platform/OrderMapper/EuromasterOrderDeserializer.php
- src/Atraxion/Platform/ServiceProvider/PlatformServiceProvider.php
- _admin/model/classes/atx/orders/PlatformOrderService.php
- _admin/controller/classes/atx/orders/UpdatingPlatformOrderController.php
- _shopupdating/cronjobs/atx/orders/getOrders.php
Legacy Capabilities (As-Is)¶
Updater Dispatch Model¶
AggregateOrderUpdater invokes all tagged updaters that report supports(platform) = true.
AbstractPlatformOrderUpdater drives common status updates:
- Iterate order reservations
- For delivery notes with tracking numbers: call updateTracking(...)
- For invoices with PDF: call updateInvoice(...)
- Write invoice/delivery-note link statuses (send or failed) and flush
ProxyOrderUpdater handles generic export-based channel updates using PlatformExportService and active platform exports.
Channel-Specific Updaters¶
| Updater | Supports condition | Tracking behavior | Invoice behavior |
|---|---|---|---|
Check24OrderUpdater |
platform.interface == C24 |
Builds semicolon CSV and uploads via FTP for tracking exports; writes FileUploadLog entries |
Builds semicolon CSV and uploads via FTP for invoice exports; writes FileUploadLog entries |
EuromasterOrderUpdater |
platform.interface == EM |
Writes semicolon CSV text file (*_ERM.txt) to FTP tracking exports |
Writes semicolon CSV text file ({invoiceId}.txt) to FTP invoice exports |
RoadzilaOrderUpdater |
platform.orderNumberPrefix == ROADZI |
Calls Roadzila HTTP endpoint with state=shipped and tracking links |
Not implemented (commented as separate path) |
Easy4DOrderUpdater |
platform.orderNumberPrefix == ER |
Builds XML payload and uploads via FTP helper for active non-tracking exports | Explicitly deferred to ProxyOrderUpdater |
AdTyresOrderUpdater |
currently hard-disabled (supports() returns false) |
Legacy HTTP form submission implementation exists but not active | Not supported |
ZeroSevenOrderUpdater |
platform.interface starts with 07ZR |
Appends tracking CSV rows to local filesystem in prod only | Copies invoice PDF to local filesystem in prod only |
DirectoryOrderUpdater |
local platform with zero exports and existing platform data directory | Appends tracking CSV to APP_PLATFORMDATA_PATH/{short}/out/tracking/{reference}.csv |
Not implemented |
Audit/Logging Behavior¶
Check24OrderUpdater and Easy4DOrderUpdater persist upload records in channel_platform_upload_log (FileUploadLog) with optional error message.
Other updaters largely rely on exceptions/logging and do not consistently persist upload audit rows.
Platform Order Deserializers¶
Order deserialization classes currently documented by code but not migration specs:
Check24OrderDeserializer- Switches by payload shape:
ORDER_HEADERpresent ->Check24TyreOrderDeserializer-
otherwise ->
Check24SetOrderDeserializer -
Check24TyreOrderDeserializer - Maps order number/date, invoice and delivery addresses, payment/bank fields, customer id
- Maps product lines by
SUPPLIER_PIDsplit to article/supplier ids -
Maps quantity/price, optional notes, optional order notice
-
Check24SetOrderDeserializer - Maps set-order envelope (
ordernode) - Creates separate order lines for wheel/tyre/TPMS quantities (
a_anzahl,b_anzahl,c_anzahl) -
Uses fixed TPMS article id for TPMS lines
-
EuromasterOrderDeserializer - Maps order header, invoice and delivery addresses, transport cost, flags (neutral/express)
- Maps positions to order lines via
supp_article_idsplit and net prices - Sets internal cancellation notice and xml/customer identifiers
Deserializer usage is integrated in legacy import path:
- _admin/model/classes/atx/orders/PlatformOrderService.php (makeOrderFromCheck24, makeOrderFromEuromaster)
- Called from _admin/controller/classes/atx/orders/UpdatingPlatformOrderController.php during queue processing.
Current Gaps And Risks To Resolve In Migration¶
- Updater behavior is inconsistent by channel (FTP/API/local filesystem) with uneven idempotency guarantees.
- Audit logging is incomplete outside specific implementations (not all outbound writes are persisted as upload logs).
RoadzilaOrderUpdateruses directfile_get_contentsHTTP calls and plain token-from-URL pattern.AdTyresOrderUpdateris registered but functionally disabled (supports() === false).ZeroSevenOrderUpdaterandDirectoryOrderUpdaterrely on local filesystem paths and append semantics.Easy4DOrderUpdatersplits responsibility withProxyOrderUpdater, increasing double-send/missed-send risk if config is wrong.EuromasterOrderDeserializerreferences$fieldMapwithout local definition in current implementation.- Check24 XML parsing relies on schema-shape assumptions and global XPath lookups that should be hardened.
Target Migration Specification (Symfony)¶
Scope¶
In-scope for this phase: - Channel-specific outbound status update adapters for Check24, Euromaster, Roadzila, Easy4D, AdTyres, ZeroSeven, and directory fallback - Explicit deserializer layer for Check24 and Euromaster import payloads - Unified audit logging for outbound delivery attempts
Out-of-scope for this phase: - Platform commercial onboarding UI redesign - Full replacement of legacy platform import controller workflow
Domain Rules To Preserve¶
- Updater dispatch is platform-capability based (
supports) and may include both channel-specific and proxy/generic handlers. - Tracking and invoice updates remain separate flows with independent status flags.
- Channel-specific payload format requirements (CSV/XML/API fields) must remain backward compatible.
- Platform import path still requires deterministic transformation from platform payload to internal order aggregate.
Required Improvements¶
- Add explicit idempotency keys per outbound update (invoice id + channel + export type).
- Standardize transport abstraction (no direct
file_get_contentsHTTP calls in adapters). - Persist delivery attempts consistently for all updaters (success and failure).
- Add feature flags per channel adapter, including explicit state for disabled integrations (AdTyres).
- Validate and version incoming XML schemas for deserializers.
- Add structured error categorization (transport/auth/payload/configuration) for retries and alerting.
- Remove filesystem-only assumptions by introducing storage adapters for local-directory channels.
Suggested Target Components¶
Interfaces/services:
- PlatformOutboundUpdaterInterface
- PlatformOutboundDispatcher
- PlatformTrackingExporter
- PlatformInvoiceExporter
- PlatformOrderDeserializerInterface
- PlatformOrderImportMapper
- PlatformDeliveryLogService
Channel adapters:
- Check24UpdaterAdapter
- EuromasterUpdaterAdapter
- RoadzilaUpdaterAdapter
- Easy4DUpdaterAdapter
- AdTyresUpdaterAdapter (disabled until validated)
- ZeroSevenUpdaterAdapter
- DirectoryUpdaterAdapter
Deserializer adapters:
- Check24TyreOrderDeserializer
- Check24SetOrderDeserializer
- EuromasterOrderDeserializer
Operational Requirements¶
- Emit metrics by adapter and action (
tracking,invoice): attempted, succeeded, failed, skipped. - Record latency and payload size per outbound attempt.
- Alert on repeated failures by channel/export type threshold.
- Require replay tooling for failed attempts from persisted delivery logs.
Data Migration Notes¶
- Preserve
channel_platform_upload_loghistory and invoice links. - Preserve platform export configuration and server credentials references used by updater routing.
- Preserve interface/order-prefix conventions (
C24,EM,ROADZI,ER,07ZR*) while introducing explicit adapter mapping table. - Backfill missing outbound-delivery records only where deterministic reconstruction is possible.
Acceptance Scenarios (Gherkin)¶
Feature: Platform-specific outbound updaters and deserializers
Scenario: Check24 tracking update exports CSV and logs delivery
Given platform interface is "C24" with active tracking export server
And an order delivery note has tracking numbers
When platform status update runs
Then a tracking CSV should be uploaded
And a platform upload log entry should be persisted
Scenario: Euromaster invoice update exports text CSV file
Given platform interface is "EM" with active invoice export server
And an order invoice has a PDF
When platform status update runs
Then an invoice text file should be uploaded to the configured path
Scenario: Roadzila cancelled order sends cancellation state
Given platform order prefix is "ROADZI"
And an order is cancelled
When platform status update runs
Then a Roadzila state update with "cancelled" should be sent
Scenario: Easy4D sends tracking XML
Given platform order prefix is "ER"
And order tracking data exists
When platform status update runs
Then an XML tracking payload should be uploaded for active exports
Scenario: AdTyres adapter remains inactive when disabled
Given AdTyres adapter feature flag is disabled
When platform status update runs
Then no AdTyres outbound call should be executed
Scenario: ZeroSeven writes files only in production
Given platform interface starts with "07ZR"
And environment is not production
When platform status update runs
Then no tracking or invoice files should be written
Scenario: Directory fallback writes local tracking CSV
Given platform is local with no exports and valid platform data directory
And tracking data exists
When platform status update runs
Then tracking CSV rows should be appended under out/tracking
Scenario: Check24 deserializer selects tyre variant by payload
Given an incoming Check24 XML contains ORDER_HEADER
When the payload is deserialized
Then tyre-order deserialization rules should be applied
Scenario: Check24 deserializer selects set variant by payload
Given an incoming Check24 XML has legacy set-order shape without ORDER_HEADER
When the payload is deserialized
Then set-order deserialization rules should be applied
Scenario: Euromaster XML is deserialized into internal order aggregate
Given an incoming Euromaster order payload with positions
When the payload is deserialized
Then order header, addresses, and line items should be mapped to internal order fields
Open Decisions¶
- Should Roadzila and similar HTTP channels move to authenticated API clients with retries/circuit breakers immediately, or in a second hardening phase?
- Should local-directory adapters (ZeroSeven/Directory) be retained, replaced with managed object storage, or deprecated?
- Should AdTyres remain disabled permanently or be restored behind conformance tests?
- Should
ProxyOrderUpdaterremain combined with channel-specific adapters, or be split into a separate execution stage with explicit precedence?