Connecting Magento to an ERP: example flows and errors to anticipate
By the AXELITES team

Connecting Magento to an ERP moves the information needed to sell and fulfil orders: customers, stock, shipments or invoices. The integration must respect each system’s rules and make failures understandable when an exchange does not succeed.
This guide uses a fictional order sent to an ERP and followed through to shipment. Available objects, APIs and exchange mechanisms must be checked against the editions and versions actually installed.
1. Define the system of record for each piece of information
Decide which system owns the data. In our example, Magento captures the customer order while the ERP manages preparation and returns shipment information. Editorial product attributes could come from a PIM, with stock information following rules agreed with logistics.
Avoid allowing two systems to freely update the same field. For prices, discounts, taxes and availability, specify scope, synchronisation schedules and precedence rules. The same term may have different meanings in different software.
2. Document each exchange
Record the trigger, sender, recipient, identifiers, required fields and frequency. Add the expected result, monitoring owner and how a failed exchange can be retried. A simple diagram and anonymised sample message help business stakeholders validate the design.
Product, customer and order references must stay stable. A commercial name or email address is not always a sufficient identifier. Map Magento and ERP identifiers and handle differences in format, currency and time zone.
- Orders: lines, quantities, amounts, currency and business references.
- Availability: stock scope, timestamp and agreed calculation rule.
- Shipments: order, shipped lines, carrier and tracking details.
3. Example of an order sent and later shipped
A fictional order WEB-1042 becomes eligible for export under the business’s agreed payment rule. The connector prepares a message, assigns a stable exchange key and sends it. The ERP confirms creation of its record; both references are retained.
When some items are shipped, the ERP sends quantities and associated tracking information. The integration matches the lines without treating the whole order as delivered. Cancellation or refund follows a separate flow with explicit validation rules rather than being inferred from a changed label.
4. Prevent duplicates and out-of-order updates
If the recipient creates an order but its response is lost, a retry may create a duplicate. Plan detection through a stable key, lookup of an existing operation or a genuinely supported idempotency mechanism. The approach depends on ERP and connector capabilities.
Messages can also arrive in a different order from their creation. Use a version identifier or business rule to prevent older data replacing newer information. For stock, distinguish physical quantity, saleable availability and reservations to avoid double deductions.
5. Make errors visible and recoverable
Separate temporary failures, such as an unavailable service, from data errors requiring correction. Plan spaced retries, a limit and an exception queue. Each operation needs a visible status and an identifier shared across relevant system logs.
An asynchronous acceptance response does not prove processing has finished. Available asynchronous or bulk APIs require result monitoring. Limit sensitive information in logs and use dedicated technical accounts with the permissions required for their role.
6. Test exceptions before connecting production
Acceptance testing should cover an ordinary order, but also an unknown product, incomplete address, stock shortage, partial shipment and cancellation. Include retransmission of the same message and failure after creation in the ERP. Compare amounts, quantities and references in both systems.
Prepare periodic reconciliation to detect missing exchanges. Define who handles alerts and how processing resumes after interruption. Synchronisation frequency must match business needs and API capabilities; not every flow requires real-time updates.
Frequently asked questions
- Should we use a standard connector or a custom integration?
- An existing connector may fit when its scope, versions and recovery mechanisms cover the requirement. Specific rules and unsupported systems may need adaptation or custom development.
- Can everything be synchronised in both directions?
- That is not a good starting point. Define ownership, editing rights and conflict resolution for each piece of information before introducing bidirectional exchanges.
- How can we start without connecting every flow?
- Choose a complete journey, such as sending an order and returning its ERP reference, with error monitoring and reconciliation. Add further exchanges after validating that first scope.
Sources and documentation
Scope your Magento and ERP exchanges
Share your software, versions and priority flows so we can plan mappings, recovery and acceptance testing.
Discuss my integration




