Sync runs & idempotency
If a sync fails or you run it twice, run it again. Nothing gets duplicated or damaged. Two things make that safe: every sync is logged as a record you can open, and every record is matched across the systems by a fixed id.
Open the sync run to see what happened
Each sync creates a NetSuite Sync Run record before anything is sent. That covers bookings, order line syncs, invoices, credit memos, payments, refunds, products, customers and obligation refreshes.
| Field | What it holds |
|---|---|
| Type | The kind of sync, such as Order Booking or Invoice Sync |
| Status | Queued, then Processing, then Completed, Completed with warnings or Failed |
| Payload JSON | The data sent to NetSuite. It's what you see when you click View JSON payload on the card. |
| Result JSON | NetSuite's reply, with counts, the ids it created and the engine results |
| Error | Errors and warnings, one per line |
| Scope | The record that started the sync, and when it started and finished |
A booking ends as Completed with warnings when the order reached NetSuite but some lines had no matching item. The card shows Booked with warnings. It counts as finished, like Completed.
The data is saved before the call goes out. So if a run dies partway, you can still see what it tried to send. The Sync Runs dashboard lists every run.
Know how records are matched
Each NetSuite record stores an external id built from its Salesforce id. Before writing, the sync looks up every incoming id in NetSuite. Records it finds are updated. The rest are created.
Two rules protect changes your team makes in NetSuite:
- Names are set only when a record is created. If you rename the Kingsbridge Digital customer in NetSuite, the new name stays.
- Blank values never clear a field. A blank in the data leaves the NetSuite field as it is.
Order Line Sync is the exception to the second rule. It mirrors each line's delivery, fulfillment and % Complete, so clearing one in Salesforce clears it in NetSuite.
A customer that isn't linked yet is always created new. It's never matched by name. NetSuite needs a unique Customer ID, and an account that doesn't number customers automatically uses the name. When another customer already has that name, the new one is created as Kingsbridge Digital (001…), with its Salesforce id added. The sync run notes it. To book onto a customer that's already in NetSuite, put its internal id in the account's NetSuite Record Id before the first booking.
Two kinds of record use a narrower key. A performance obligation's key comes from its contract and its product, so the same pair always finds the same obligation, even when two syncs run at once. An invoice or credit memo line remembers the Salesforce line it came from, so a re-sync can update that one line instead of touching the whole document.
Sync again when in doubt
Say QuantumBit books an order, then books it again. The second booking updates the same records the first one created. Syncing an invoice again updates the same invoice. Salesforce saves the same NetSuite ids again. There's nothing to duplicate and no order to follow.
A sync that changes nothing writes nothing. Running it again never disturbs a record that's already right.
Salesforce also stops two people from colliding. If someone books an order while a booking of it is still running, the second one is refused. A line sync of that order waits for the booking too. A run stuck for more than ten minutes is treated as stale, and the next attempt replaces it.
Connect several Salesforce orgs to one NetSuite account
One NetSuite account can take syncs from more than one Salesforce org. Every record it stores has a Source Org field that names the org that wrote it. It looks like quantumbit.my.salesforce.com (00D5f000001AbCdEAO): the org's My Domain host, then its org id.
Each org creates its own customers, contracts and orders in NetSuite. That's by design. Different orgs have different record ids, so there's nothing to match between them. Source Org tells you which org created each record.
Connect one production org per business unit to a NetSuite account, and run the Connection wizard in each.
To filter a saved search by org, use Source Org contains the org id. Don't use "is". The org id never changes, even if you rename your My Domain.
Let large syncs finish in parts
NetSuite limits how much work one request can do. When a very large order nears that limit, NetSuite checks before every row, not only between sections, so it stops cleanly even mid-section and reports where it stopped. Salesforce then sends a follow-up call that picks up from there. It's the same run record, and the results are merged.
Invoice, payment, and refund batches sync in chunks you can size, and each document is safe on its own: it lands whole, or waits for the next leg. Either way, you see one run. See Inside the RESTlet for how it works.