The problem
For B2B businesses the website is only the front door. Orders have to reach the accounting system, invoices have to be raised, and stock has to stay in step with what the warehouse really holds. When that happens by hand or through fragile scripts, orders get missed, stock goes wrong and staff spend their day reconciling.
I led two Magento builds where this integration was the heart of the project.
What we built
- A B2B wholesale portal with MYOB integration, invoicing through a separate invoicing system, and a custom API middleware that streamlines order processing and inventory management.
- A Magento 2 build for a promotional products supplier with middleware that sends sales orders to MYOB, and order artwork uploaded to AWS S3 rather than stored on the web servers.
Key decisions
- Keep integration out of the storefront. A separate middleware layer owns the conversation with the ERP, so a slow or unavailable accounting system never blocks a customer at checkout.
- Design for failure, not just success. If a sync fails partway, it resets its last-sync marker so the next run picks up everything that was missed, instead of silently skipping records.
- Make problems visible. Failures are logged and can be retried, so the business can see what didn’t sync and why.
- Store files where they belong. Customer uploads go to S3, which keeps the web servers stateless and easy to scale.
The lesson
Most integration bugs aren’t in the happy path. They live in timeouts, partial failures and retries. Designing those cases deliberately is what turns an integration from something the team babysits into something the business can rely on.