Fix Library: Integrations and sync

Orders Not Syncing to NetSuite or Your ERP

Last updated:

What you see

New orders are in Magento but never appear in NetSuite or your ERP, so the warehouse does not ship them.

Quick answer

Most order sync failures come from one of three places: the job that sends orders is not running, the connection is refused because a token or password expired, or the ERP rejects the order because of a mapping error such as an unknown SKU or tax code. The connector log usually says which.

What usually causes it?

  1. Cron or message queue consumers not running
  2. Expired or revoked API credentials (for example a NetSuite token)
  3. Mapping errors: unknown SKU, customer, tax code or shipping method in the ERP
  4. API limits or timeouts on the ERP side

How do you check it safely?

These checks only read information. Run them on staging first if you can, from the Magento root folder as the file system owner. Hosting setups differ, so paths and service names may need adjusting.

  1. Look for failed cron jobs.
    SELECT job_code, status, scheduled_at, messages FROM cron_schedule
    WHERE status = 'error' ORDER BY scheduled_at DESC LIMIT 20;
  2. List the queue consumers your connector may rely on.
    bin/magento queue:consumers:list
  3. Read the connector's own log (the file name depends on the extension).
    ls -lt var/log | head
  4. Take one failed order number and look for it in the connector log and the ERP integration log.

How do you fix it?

These steps change your store. Run them on staging first, with a backup of code and database.

  1. Get cron and the consumers running again (see the cron fix page).
  2. Renew the API credentials in the ERP and update them in the connector settings.
  3. Fix the mapping for the failed orders, for example create the missing item or tax code in the ERP.
  4. Re-send the failed orders from the connector, then add an alert so failures are noticed within hours, not days.

When should you call an expert?

Call an expert if orders fail in large numbers, orders are created twice, or the connector gives no clear error.

Need it fixed today?

I can look at it with you. Book a 20 minute call, or if the store is down, see emergency Magento support.

Further reading

FAQ

Common questions.

Can I resend failed orders without creating duplicates?

Usually yes, if the connector checks the Magento order number before creating an order. Test with one order first.

How do I find out sooner next time?

Add an alert for failed sync jobs, and a daily check that compares order counts in Magento and the ERP.

Rather have it fixed for you?

Send a few lines about the problem, or book a 20 minute call. You get an honest read and a fixed quote.

Book a 20 minute call Reply within one business day (Mon to Fri).