A two-way sync works when you decide, in writing, how it handles conflicts, identity, duplicates, deletes, failures and limits. A demo that copies a field both ways takes an afternoon. A production integration is mostly the cases around that copy.
1. Which direction, per field
Not every field should flow both ways. Choose a source of truth per field. Status often belongs to one system, while a description may be edited in both.
2. Identity and linking
Store a durable link between each pair of records, using the IDs each system provides, not titles. Without it you cannot tell an update from a new record.
3. Conflicts
If both sides change the same field between syncs, one value must win. Common rules are: one system always wins, or the newest change wins. Keep a record of the last synced value so you can tell what actually changed on each side.
4. Duplicates and retries
Every sync run can fail halfway and be retried. Design writes so a retry cannot create a second record. This is called idempotency, and it is the difference between a demo and a product.
5. Deletes
Decide whether deleting a record in one system deletes it in the other. Syncing deletes is risky, so many integrations leave them out and say so.
6. Change detection and timing
Some systems send events when something changes. Others must be polled. Polling means a delay and a cost in API calls. Decide what delay is acceptable and state it to users.
7. Rate limits and scale
Every API limits how fast you can call it. Batch requests, back off when told to, and expect a large first sync to take a long time. Tell users when it will.
8. Visibility
Users must be able to see what ran, what failed and why, without reading logs. Silent failure is the most common reason people stop trusting a sync.
9. Security and data
Request the narrowest permissions that work, store credentials in encrypted storage, and list which hosts the integration sends data to. Reviewers and customers will ask.
Frequently asked questions
What is the simplest safe conflict rule?
Pick one system to win and document it. It is easy to explain and test. Newest-wins is also common but needs reliable timestamps on both sides.
Should deletes be synced?
Often not. A mistaken delete in one system would remove the record in the other. Many integrations skip deletes and say so.
Why do two-way syncs create duplicates?
Usually a run failed partway and was retried without a stable link between the two records. Store the link and make writes idempotent.
How do I build this faster?
Settle these decisions first, then build. SyncAgent Build is an AI assistant for exactly this: you bring the spec and make the decisions, and it researches the APIs, designs, builds and tests. It is in early access.
Related product: SyncAgent Build. Bring your spec. Build the integration or extension with SyncAgent, from first prompt to production polish.