Aonflow
Back to Blog

When a Sync Fails: Monitoring, Alerts, and Recovery

Published
When a Sync Fails: Monitoring, Alerts, and Recovery

At 6:05 pm on the last Sunday of November, the flow that sends Shopify orders into NetSuite stopped working. By Tuesday morning someone had fixed it and re-run Sunday to catch up. By 11:00 am the warehouse had picked 97 orders that customers had paid for only once.

The outage cost a weekend. The recovery cost far more: 824 duplicate sales orders to cancel, 97 packages to stop before they left, 115 orders that still had not arrived, and a November sales report that came up short because the caught-up orders carried a December date. Most teams plan for the failure. Very few plan for the morning after it, and that is where the money goes.

So here is the idea this post is built on: running the sync again is not recovery. Aonflow is a low-code integration platform that connects Shopify, NetSuite and the rest of your stack without code. This post covers what no platform decides for you, which is how sync failure recovery should work, so the fix never becomes the second incident.

This one is for whoever will own the integration after go-live. IT heads, operations leads and hands-on founders will get the most from it. None of it requires code, and the approach holds whichever integration platform you run.

What this post resolves:

  • The failure type, so you know whether to retry, stop, or hold.
  • The alert, so one failure reaches one owner instead of a muted channel.
  • The replay rule, so recovery never creates the same order twice.
  • The recovery runbook, four steps you can follow at night, under pressure.
  • Period cutoff, meaning which date a replayed order carries after a month-end outage.

Why Is Recovery Riskier Than the Failure?

Because a failure stops data, while a careless recovery creates data, and created data looks real.

When a sync fails, nothing new arrives. That hurts, but it is visible. A careless recovery resends records that already exist, misses records nobody counted, and dates everything by the day of the fix. In NetSuite, each result looks like a normal sales order until a customer receives two boxes.

Recovery runs a few times a year, usually at night, usually in your busiest week. So it deserves design time before go-live, not improvisation after the alert.

The Failure Type: Retry, Stop, or Hold

Three failure types and the response to each: too many requests means retry, an invalid login means stop the flow and alert IT, and an invalid item on one order means hold that record while the rest keep moving.

It is tempting to treat every failure the same way and try again until it works. That instinct is right for one kind of failure and harmful for the other two.

In plain terms, a failure is either temporary, about access, or about one record. NetSuite’s own error responses show all three (Oracle NetSuite documentation on REST error handling):

Failure typeWhat NetSuite saysWhat the flow should do
TemporaryToo many requests at once (CONCURRENCY_LIMIT_EXCEEDED)Retry, with a longer pause between each attempt
AccessInvalid login (INVALID_LOGIN)Stop, and alert IT
RecordInvalid item on one order (INVALID_CONTENT)Hold that record, and keep processing the rest

For the concurrency error, Oracle’s documented guidance is to retry the request, so the temporary row is the one place a retry helps. An access failure hits every record the same way until a person restores access, so retrying it just fails louder. A record failure is the reverse. One order references something NetSuite does not recognize, such as a product nobody set up, and stopping the whole flow for it blocks hundreds of good orders.

Sort first, then act. Every later decision depends on this one.

The Alert: One Incident, One Owner

More alerts feel safer. They are not.

On that Sunday, the flow retried each failed order 3 times and sent an alert for every attempt. That added up to 1,458 messages in a shared channel by morning, and someone muted the channel before 8:00 pm. The system did alert. Nobody acted.

An alert has one job, which is to make a named person do something. So design it around that job:

  • One alert per incident. Not one per record, and not one per retry. The 1,458th identical message carries no information the first one lacked.
  • To one named owner. Send it to a person, not a shared inbox, with a backup who is alerted when the first person does not acknowledge.
  • With four facts. Which flow, which failure type, how many records are waiting, and the first thing to do.

An access failure should also go straight to IT, because nobody else can fix it.

The Replay Rule: Failed Records Only, Once

The tempting fix is to run the sync again. It feels thorough, but re-running Sunday resent every Sunday order, including the 824 that had already arrived. It also skipped the 115 orders placed after midnight, because they belonged to Monday.

The Rule: recovery is not running the sync again. It is replaying only the records that failed, once, into a flow that cannot create the same order twice.

That rule needs two things, a list and a key.

The list is the exact set of records that failed, taken from the flow’s logs or its hold list. It is never “everything since yesterday”, because a time window resends what already arrived and can miss what arrived after the window ends.

The key is an identifier from the source that also lives on the destination record. Store the Shopify order number as the NetSuite external ID. NetSuite can then add or update by external ID: if a record with that ID exists, NetSuite updates it, and if not, it creates one (Oracle NetSuite documentation on upsert by external ID). Send the same order twice and you still have one order.

The key earns its place even on a quiet day. Shopify notes that an app might receive the same webhook more than once, for example after a network timeout or a retry, and recommends processing that gives the same outcome the second time (Shopify documentation on verifying webhook deliveries).

The Recovery Runbook: Stop, Fix, Replay, Verify

The recovery runbook in four steps, in order: stop the retries, fix the credential or the held record, replay only the failed records, then verify that the Shopify and NetSuite order counts match.

Under pressure, people improvise, and improvising is how Sunday’s re-run happened. A runbook removes the improvising. Write it before go-live and keep it to four steps:

  1. Stop. End the retries on an access failure, so the noise stops and nothing is left half-processed.
  2. Fix. Restore access or correct the held record. Then test with one order before anything else moves.
  3. Replay. Send the failed records from the list, through the external ID check, and nothing else.
  4. Verify. Count the orders Shopify took in the outage window, and count the NetSuite orders for the same window. The numbers must match, and no two NetSuite orders may share a Shopify order number.

Two pieces of advice sell nothing and save the most. First, never create an integration credential under a person’s login. Create a dedicated integration user, so the flow does not stop when someone leaves. Second, rehearse a replay before peak season: fail one test order on purpose, run the four steps, and count what arrives.

Period Cutoff: Which Date a Replayed Order Carries

Through most of the month, a late order is an operations problem. At month end it becomes an accounting one.

Of the 486 failed orders, 371 were placed on November 29. The re-run created them on December 1 and dated them December 1, because the flow mapped the NetSuite order date to the day the record was created. November’s sales report therefore came up 371 orders and $38,940 short, and December’s came up long by the same amount.

Two decisions to settle before go-live:

  • The date rule. A replayed order carries the date the customer placed it in Shopify, never the date of the fix. Map that field on purpose, because a default is a decision nobody made.
  • The catch-up rule. If November is still open, the replayed orders, and the invoices that follow them, belong there. If finance has already locked it, the controller decides before anything is billed. A NetSuite period lock stops users posting transactions that affect the general ledger, such as invoices (Oracle NetSuite documentation on locking accounting periods). So the lock should reach a person, not push November’s sales quietly into December.

A Worked Example: The Cyber Monday Re-Run

At 6:05 pm on Sunday, November 29, the token the flow used to sign in to NetSuite stopped working. It had been created under a contractor’s login, which was deactivated when the contract ended, and Oracle warns that a token stops working when its user is inactivated (Oracle NetSuite documentation on token-based authentication). From then on, NetSuite answered every order with an invalid login error.

Between 6:05 pm Sunday and 7:30 am Tuesday, 486 orders failed: 371 placed on Sunday and 115 placed on Monday. The store took 1,195 orders on Sunday, so 824 had arrived before the failure.

What actually happened:

StepResult
Retries ran all night, 3 per order1,458 alerts, channel muted before 8:00 pm
IT issued a new token at 7:30 am TuesdayAccess restored
Someone re-ran Sunday (1,195 orders)824 duplicates, 115 Monday orders never sent
Recovered orders took the creation date371 November orders dated December 1

What the runbook would have done: one alert to IT at 6:05 pm, a new token under a dedicated integration user, a replay of exactly 486 orders through the external ID check, all 371 November orders dated November 29, and a verify step showing 486 on both sides with zero duplicates.

Same outage, same night. The difference is entirely in the morning after.

How Aonflow Handles Sync Failure Recovery

On a low-code platform, the alert, the hold list and the replay are flows you build, not code you commission.

  • Monitoring, logs and alerts on flow execution show what failed and when, which is what the replay list is built from: the 486, not the 1,195.
  • Dedicated Slack and Microsoft Teams connectors let the one alert reach the named owner where they already work, instead of 1,458 messages in a channel nobody reads.
  • Self-healing flows detect and recover flows that are breaking or failing, which fits the temporary row of the failure type table. A revoked token still needs a person, which is why the access row alerts IT.
  • Workflow automation builds the external ID check into the order flow, so a replayed order updates its match instead of creating a second copy of an order that already exists.
  • AI-assisted field mapping reduces integration time by more than half, and it is where you set the date rule, mapping the NetSuite order date to the Shopify order date.
  • Dedicated Shopify and NetSuite connectors plus near real-time data sync keep the gap between runs small, so the replay list stays short when something does fail.

Who Owns This When It Breaks

Who owns the flow? A named person, usually the operations lead whose team feels a missing order first. IT owns the credential and the connection, and finance owns the period decisions.

Who gets alerted when it fails? The flow owner, once per incident, with a backup on an unacknowledged alert. IT is alerted directly on every access failure.

Where do failed records wait for review? On a hold list a person can see, decided before go-live. A sheet the flow writes to works (Aonflow connects to Google Sheets), with the Shopify order number, failure reason and attempt count on every row. A record that lives only in a log will not be found.

Escalation triggers, in a form you can copy into a runbook:

TriggerWho actsWithin
Any invalid login or access failureIT1 hour
Temporary failures still retrying after 1 hourFlow owner and ITImmediately
Any record on the hold list at end of dayFlow ownerSame business day
Two NetSuite orders share a Shopify order numberFlow owner and warehouse leadImmediately
Replayed orders belong to a locked periodControllerBefore anything is billed

FAQs

What if the failure happens before the flow ever receives the order?

Then the source’s own retry window matters. Shopify retries a failed webhook delivery 8 times over the next 4 hours, and after 8 consecutive failures it deletes the subscription if the subscription was set up through its Admin API (Shopify documentation on verifying webhook deliveries). After that, stop waiting and pull the missing orders from Shopify by date.

Is a replay the same as a backfill?

No. A replay resends records you know failed, from a list. A backfill queries the source for a whole period because you do not know what is missing. Keep the external ID check on for both.

Does near real-time sync make recovery harder?

No. It makes the replay list shorter, because fewer records wait between runs. It does not change the replay rule.

Do we need a developer to set this up?

No. The alert, the hold list and the external ID check are flows and mappings built in a no-code interface. You do need someone who knows which failures your business can live with for an hour and which it cannot.

Conclusion

Sort the failure type, send the alert to one owner, follow the replay rule, run the recovery runbook, and settle period cutoff before month end. Those five decisions turn the morning after a failed sync into a short, boring correction instead of a second incident.

Before your next peak weekend, fail one test order on purpose, replay it, and count what arrives.

Request a demo

Get Started with Aonflow iPaaS – Free Trial Available!

Build and deploy your integrations at zero cost. No credit card required!