attlaz / magento2-module-attlaz-order
Attlaz Magento2 Order Module
Package info
github.com/Attlaz-Platform/magento2-module-attlaz-order
Type:magento2-module
pkg:composer/attlaz/magento2-module-attlaz-order
Requires
- php: >=8.2
- attlaz/magento2-module-attlaz-base: ^3.2
- magento/framework: >=103.0.6
- magento/module-backend: >=102
- magento/module-sales: >=103
- magento/module-ui: >=101
Requires (Dev)
- friendsofphp/php-cs-fixer: ^v3.17.0
- phpstan/phpstan: ^1.10.16
- phpunit/phpunit: ^9.5
- thecodingmachine/phpstan-safe-rule: ^v1.2.0
README
Attlaz is a cloud-based integration, automation and data management platform.
Getting started
composer require attlaz/magento2-module-attlaz-order
Requirements
- PHP >= 8.2
- Magento Open Source / Adobe Commerce 2.4.6+
attlaz/magento2-module-attlaz-base3.2+
How order synchronization works
The module hands Magento orders to an Attlaz flow. Four fields are stored on each order and mirrored to the sales order grid:
attlaz_external_id— set once the order has been handed to Attlaz; its presence marks the order as syncedattlaz_sync_id— the Attlaz flow-run id used to poll statusattlaz_sync_status— one ofrequested,running,complete,failed,invalid,unknownattlaz_sync_time— timestamp of the last sync attempt
Two cron jobs run every 5 minutes (default group), up to 20 orders per run:
attlaz_order_sync_unsynced— requests a flow run for every order without anattlaz_external_idattlaz_order_sync_status— polls in-progress flow runs and updatesattlaz_sync_status
The cron only runs when Enable order sync is on and, for flow-based sync, a flow is configured. Manual sync works regardless — the Sync button on the admin order view, or:
bin/magento attlaz:sync:orders bin/magento attlaz:sync:order-statuses
A failed request marks the order failed and leaves attlaz_external_id empty, so the next cron run retries it.
There is no retry limit or backoff: a permanently failing order is retried indefinitely, one request and one log
line per run. Transient failures self-heal; permanent ones need looking at (a capped retry may come later).
Configuration
Stores → Configuration → Attlaz → Order sync:
| Field | Effect |
|---|---|
| Enable order sync | Master switch for the cron sync. Off by default (since 3.1.0), so an upgrade never starts syncing on its own. |
| Synchronize order key | The Attlaz flow that receives the orders. Not needed when a custom plugin on SyncOrderCommand::sync() drives the sync instead. |
| Sync orders from date | Only orders created on or after this date are synced. Empty = no cutoff; set it on first rollout to avoid re-sending your order history. |
| Order statuses to sync | Only orders with these statuses are synced. Empty syncs nothing — an empty filter means "not configured yet", not "send everything". |
Filtering on status
Orders sharing a state don't all mean the same thing: state new holds both an unpaid order waiting for its payment
provider and a pay-on-delivery order that is ready for the ERP the moment it is placed. Status is the axis that tells
them apart — create your own (Stores → Order Status → Create New Status), assign it to the state, and point the
payment method's New Order Status at it (Stores → Configuration → Sales → Payment Methods). Only orders placed
with that method carry it.
Check the code, not the label. "Pending" is state
new's default status; "Pending Payment" ispending_payment, an order whose payment has not arrived. The list prints the raw code for that reason.
Two more things worth knowing: a status created later is not synced until you select it here (deliberate — a new status entering the sync unnoticed is how unpaid orders reach an ERP), and other extensions (analytics, marketing, feeds) keep their own status filters, so repointing a payment method at a new status can quietly drop its orders out of those.
Order states to sync existed in 3.1.0–3.2.x and was removed in 3.3.0 — select the statuses belonging to those states instead.
Getting Help
- Attlaz Documentation
- Issue Tracker — questions, bug reports and feature requests
- Developer support: developers@attlaz.com