Skip to content

Diogo TravassosData leadership · Analytics · Decision-making

Synthetic data

AI answers over company data: outbound syncs round

In a simulation I built, at assumed fault rates, syncs that send only changes and never read the CRM back left 2.7% and 3.4% of records wrong after an hourly cycle, against 1.2% to 1.6% for the rest; a reconciliation report every six cycles listed 81% of the typed-in health scores they left wrong (it misses any gap that closes before it runs)

Each design synced 1,000 accounts for 48 hourly cycles, 10 times with different seeds, through timeouts, duplicate deliveries, late copies of old writes, rejected rows, a daily request allowance and edits people make in the CRM. Figures are medians of the 10 seeds. About 0.9 points of each is rows the CRM rejected, which no design can land since rows are sent whole: with no faults at all, designs left 0.9% to 1.5% wrong. Design 4, a ledger with keys, left the most records wrong, mainly because it parks the rows the CRM rejects: with no faults at all it already left 1.5% against 0.9% for design 2, which is as blind to edits made in the CRM. By this reading, a ledger that retried rejected rows would sit near design 2; that is a reading, not a run.

Key figures
Wrong after a cycle, changes only, no read-back2.7% and 3.4%design 2, diff against the last sent state, and design 4, ledger with keys; edits made in the CRM stayed wrong for a median of 7 cycles, and some for all 48The same, rewrite or read back1.2% to 1.6%read before write 1.2% for 194 requests a day; full overwrite 1.3% for 291; ledger with a read-back every sixth cycle 1.6% for 62; designs 2 and 4 used 41 and 34Duplicate alerts with idempotency keys0by construction, because the alert channel honours keys; without keys, 43 to 53 per design across the 10 seeds, of 1,259 to 1,269 messages; the duplicate detector flagged every one, which is true by construction: late copies land within 2 cycles and its window is 6Full overwrite at 150 requests a day20.2%of records wrong after a cycle on average, and up to 64.9% near the end of a day; refused for the allowance in 24 of 48 cycles; read before write 7.8%; designs 2, 4 and 5 stayed under it

Main limitation A self-test at assumed rates: I wrote the two fake destinations, the faults, the five designs and the checks. Most differences follow from how each design works; the simulation sizes them under these rates and says nothing about any real product.

In plain words

Most companies compute account health, segments and risk flags in a warehouse, then push them into the tools their teams work in: the CRM, the alert channel. People read those fields there, and so do AI assistants answering questions about accounts. If the push leaves a stale score or a duplicate alert behind, every answer built on it is wrong before any model runs. The earlier rounds of this study test the reading side; this one tests the writing side, often called reverse ETL.

I built a small world to test it: a warehouse that changes every hour, a fake CRM and a fake alert channel that behave the way such products document, and a fault injector. Five common ways of syncing ran through the same faults, and three checks a team could add were scored on what they caught. The data is synthetic, so no company's records are involved.

A later round puts this sync inside a full hourly pipeline and breaks it on purpose, to see which checks stop a bad load before it reaches the CRM: Blocking checks on a warehouse that writes back to its CRM.

Upsert
Write a record, creating it if it does not exist, matched on an id both sides share.
Idempotency key
A label sent with a write so that the destination applies a repeat of the same write only once.
Ledger
The sync's own record of which version of each row it has confirmed as written.
Read-back
Reading the destination's current values to compare them with the warehouse.
Late copy
A write that the network held and applied later, after newer writes.
Reverse ETL
Sending fields computed in the warehouse back into the operational tools people use.
Reconciliation report
A check that reads the CRM and lists every record that differs from the warehouse, with its field.
Episode
A run of cycles during which one field of one account stays wrong, or an account's risk flag stays on.

Records left wrong, per design

At the end of every hourly cycle the simulation compares each account's health score, segment and risk flag in the CRM with the warehouse. One wrong field makes the record wrong. Each design faced the same warehouse changes and the same edits by people in each seed.

Records left wrong after an hourly cycle, per sync design

Share of all accounts (1,000 at the start, growing), mean over 48 cycles, median of 10 seeds

Base fault rates, medianRange over 10 seedsNo faults

Full overwrite: 1.3% of records wrong after a cycle at the base fault rates (median of 10 seeds, 1.0% to 1.5%); 0.9% with no faults1. Full overwrite1.3%Diff against the last sent state: 2.7% of records wrong after a cycle at the base fault rates (median of 10 seeds, 2.5% to 3.2%); 0.9% with no faults2. Diff against the last sent state2.7%Read before write: 1.2% of records wrong after a cycle at the base fault rates (median of 10 seeds, 0.8% to 1.3%); 0.9% with no faults3. Read before write1.2%Ledger with keys: 3.4% of records wrong after a cycle at the base fault rates (median of 10 seeds, 2.8% to 3.7%); 1.5% with no faults4. Ledger with keys3.4%Ledger with keys and a read-back: 1.6% of records wrong after a cycle at the base fault rates (median of 10 seeds, 1.2% to 1.8%); 1.0% with no faults5. Ledger with keys and a read-back1.6%0%1%2%3%4%
Show the data

Records wrong after an hourly cycle, per design and fault level (median of 10 seeds, range below)

DesignNo faultsLowBaseHigh
1. Full overwrite0.9%1.1%0.7% to 1.2%1.3%1.0% to 1.5%2.1%1.8% to 2.4%
2. Diff against the last sent state0.9%1.9%1.5% to 2.2%2.7%2.5% to 3.2%4.7%4.2% to 5.2%
3. Read before write0.9%1.1%0.7% to 1.2%1.2%0.8% to 1.3%1.5%1.1% to 1.6%
4. Ledger with keys1.5%2.4%1.9% to 2.7%3.4%2.8% to 3.7%5.1%4.6% to 5.6%
5. Ledger with keys and a read-back1.0%1.3%0.9% to 1.4%1.6%1.2% to 1.8%2.3%1.9% to 2.5%

Source: outbound/results/summary.json (wrong_mean) and outbound/results/runs.csv.

At the base rates every pair of designs came out in the same order in all 10 seeds. Doubling every fault rate kept the order of designs 1 to 4, but full overwrite then ran past its allowance in 3 cycles, and after the last cycle 16.4% of its records were wrong.

Why they were wrong

Each stale field at a cycle end gets one cause. Rows the CRM rejected weigh the same in every design: a new segment value the CRM did not allow for 24 cycles, and new account managers it did not know for 6. Beyond that, each design fails where it cannot look.

Stale fields per run by cause, base rates (median of 10 seeds; one field of one account at one cycle end counts once)

DesignRejected by the CRM's validationEdited by a person in the CRMAn older write landed lateDaily allowance used upNot sent, or not landed
1. Full overwrite73910539023
2. Diff against the last sent state7419467021
3. Read before write7391060022
4. Ledger with keys74197200536
5. Ledger with keys and a read-back7393130066

One edit, three designs

Seed 1, base rates: the first account whose health score a person typed in.

  1. Cycle 1: a person types a health score of 13 into account A00303 in the CRM. The warehouse says 71, and the CRM still shows no risk flag, because the flag is synced on its own.
  2. Read before write (design 3) reads the account at the start of cycle 2, sees 13 where the warehouse has 71, and writes 71 back. Wrong at one cycle end.
  3. The ledger with a read-back (design 5) finds it at its read-back in cycle 6. Wrong at 5 cycle ends.
  4. Diff against the last sent state (design 2) sees nothing to send: its record says 71 went out. The reconciliation report lists the field at the end of cycle 6. The value is repaired only in cycle 8, when the warehouse reassigns the account to another manager and the whole row goes out again. Wrong at 7 cycle ends.
  5. The drift alert on totals never fired for it: one score of 13 instead of 71 moves the total health score of the CRM by well under the alert's 0.5%.

Alerts: duplicates, and the detector

When an account's risk flag turns on, the sync posts one message to the alert channel, which can only append. No design missed or delayed an alert: with up to 3 retries, every post got through in its own cycle. Duplicates came from three faults: a post that timed out after it landed and was retried, a delivery applied twice, and a late copy.

Risk alerts at the base rates, all 10 seeds together

DesignEpisodesMessagesDuplicatesMissedDuplicates flaggedFalse alarms
1. Full overwrite1,2161,269530535
2. Diff against the last sent state1,2161,259430435
3. Read before write1,2161,267510514
4. Ledger with keys1,2161,2160005
5. Ledger with keys and a read-back1,2161,2160005

With keys the channel dropped every repeat, so designs 4 and 5 sent none; that is true by construction once the channel honours keys, and a channel that does not would leave them where design 2 is. Reading the history before posting could not be told apart from not reading it at this size: design 3 sent 51 duplicates, full overwrite 53 and design 2 43, pooled totals from separate random draws, not compared seed by seed. Only a retry after a post that timed out after it landed can be caught by reading the history, and a message shows there only after a delay of up to 2 minutes, so it is often not yet visible at the first retry; the effect is small. The duplicate detector flagged every duplicate, which is true by construction: late copies land within 2 cycles and its window is 6. Its false alarms are real second episodes: a flag that went off and on again within 6 cycles looks the same in the channel.

The account manager field: who wins

Sales leads reassigned about 159 accounts a run in the CRM, while the warehouse reassigned others. Which value should stand is a business rule, so the table counts both costs: edits by people the sync overwrote although the warehouse had not changed the field since, and warehouse reassignments that never reached the CRM.

Edits to the account manager field by people, per run at the base rates (median of 10 seeds)

DesignRuleEdits overwrittenWarehouse reassignments lostRaces
3. Read before writeWarehouse wins15100
3. Read before writeDestination wins0180
3. Read before writeLast write with versions000
5. Ledger with keys and a read-backWarehouse wins14800
5. Ledger with keys and a read-backDestination wins24120
5. Ledger with keys and a read-backLast write with versions2400

A race, a person editing between the sync's read and its write, happened at most 1 time in any run. Here a sync writes within a few minutes of its read; a slower sync would race more often.

When the request allowance runs out

CRMs give each integration user a daily request allowance. Here the sync's user had 300 a day in the base case; the checks read with a separate user. Past the allowance every request is refused until the day resets, and whatever the sync had not sent waits.

Requests a day and records wrong after a cycle, by daily allowance (base fault rates, median of 10 seeds)

DesignRequests a dayWrong at 150 a dayCycles refused at 150Wrong at 300 a dayWrong at 600 a day
1. Full overwrite29120.2%241.3%1.3%
2. Diff against the last sent state412.8%02.7%2.9%
3. Read before write1947.8%121.2%1.2%
4. Ledger with keys343.4%03.4%3.4%
5. Ledger with keys and a read-back621.6%01.6%1.6%

Full overwrite writes every account every cycle, so it needs 291 requests a day for 1,000 accounts and grows with the table. Reading the whole table every cycle costs about two thirds of that. The designs that send only changes stayed far below every allowance tested.

Which check shows what

Three checks a team can run beside any sync, reading with their own user. Each is scored on every run against the known truth.

What each check showed at the base rates, and what it costs (requests a day, median)

CheckWhat it showedRequests a dayWhat it cannot show
Reconciliation report, every 6 cyclesEvery difference open when it ran, with its field: 836 of 1,027 gaps left by edits people made, in design 2's runs; 835 of 1,026 in design 4's; every gap of 6 cycles or more24Gaps that open and close between two reports; it lists, it does not repair
Duplicate detector, every cycleAll 147 duplicate alerts of designs 1 to 3 across the seeds, with 4 or 5 false alarms per design33A real second episode within 6 cycles; a repeat more than 6 cycles later
Drift alert on totals, every cycleFired in 20 of 48 cycles (16 to 23 across the seeds) with no faults at all, and we read this as set off by the rows the CRM rejects, a reading fixed after the runs; 35 and 38 of 48 for designs 2 and 4 at the base rates24Which record is wrong; small or offsetting differences; new drift apart from a standing gap

The reconciliation report sees every difference open when it runs; that is true by construction, and a test confirms that no gap of 6 cycles or more escaped it. What it missed were short gaps that closed before it ran. The drift alert compares totals, which cost one request. It fires on any gap, including the rows the CRM cannot accept, so it fired with no other fault and cannot separate new drift from that standing gap; it can never say which account is wrong. No share of edit gaps it caught is reported, because any firing marks every gap open at the time and would inflate it.

What a team should do

Who runs what: the analytics engineer who keeps the sync runs the ledger and the reconciliation report. The CRM administrator gets the rejected rows each morning, since each one is a value or a user the CRM lacks. The customer success lead decides, field by field, whether the warehouse or a person wins. The data lead sees one figure a week, the records wrong at the last report with their causes, and raises it with the head of customer success when it rises two weeks running.

Limits

Use this at your company

Copy this prompt into your own AI assistant to run the same test on your own syncs.

This method comes from Diogo Travassos's study "Warehouse syncs that keep a CRM matching the warehouse" (https://diogotravassos.dev/ai-answers-over-company-data/outbound-sync.html). If you can open links, read it first: it works the method through end to end, with its checks. The steps below stand on their own if you can't.

Test whether the syncs that push our warehouse's computed fields into our CRM and alert channels leave them matching the warehouse, and which checks would tell us when they do not.

Method:
1. List every field a sync writes into an operational tool (health scores, segments, risk flags, the assigned account manager) and, for each, who may edit it there: only the sync, or people too.
2. Export the warehouse table and the tool's records for the same accounts at the same moment, and compare them field by field. Count the records with any difference, and for each difference say why: the tool rejected the value, a person edited it, an older write landed late, or the sync never sent it.
3. Read the sync's design: does it send everything, only what changed since its last send, or what differs from the tool's current state? Does it send idempotency keys, and does the tool honour them? What does it do with a rejected row?
4. In a test copy of the tool, or with a proxy in front of it, inject timeouts after a write lands, duplicate deliveries, late copies of old writes, rejected rows and a daily request limit, and repeat the comparison.
5. Count duplicate messages in the alert channel per event, and edits by people that a sync overwrote.

Data you need: read access to the warehouse table, the tool's records with their field history, the alert channel's history and the sync's logs.

Checks before we trust any figure:
- Compare against the warehouse at the same moment, not against what the sync says it sent.
- Report each design or sync on its own, with the request budget it used.
- Separate differences the tool could never accept from differences the sync caused.
- Say whether the faults were injected or observed, and how many cycles were compared.

Report back: per sync, the share of records wrong after a cycle, how long differences lasted and their causes, duplicate and missed alerts, edits overwritten, requests per day, and which check showed each kind of difference.

In your report, say which study you followed and link it: https://diogotravassos.dev/ai-answers-over-company-data/outbound-sync.html

Method and checks

The warehouse and the people

A synthetic table of 1,000 accounts, 3 new ones each cycle, over 48 hourly cycles. Each cycle 8% of accounts get a new health score and 0.5% a new segment; the risk flag is on below 40. From cycle 12, 30% of segment changes go to a value the CRM allows only from cycle 36. New account managers join at cycles 8, 20 and 32, and the CRM knows each one 6 cycles later. People edit the CRM directly: each cycle 0.3% of accounts get a new manager and 0.2% a typed-in health score.

The two destinations
  • CRM-style record store: upsert by external id, 100 rows a request, a result per row; whole-row validation; batch reads of 200 with field history; a daily allowance for the sync's user; idempotency keys remembered for 24 cycles.
  • Chat-style alert channel: append only, one post a second, history in pages of 100 with a delay of up to 2 minutes before a message shows, idempotency keys remembered for 24 cycles.
Faults

Every write draws one outcome at the base rates: a timeout before it lands 2%, a timeout after it lands 2%, a server error 2%, a duplicate delivery 1% and a late copy applied 1 to 2 cycles later 1%. Each row of an upsert also fails alone at 0.5%. Reads time out or fail at 2% each. The low and high levels halve and double every rate, edits by people included; the no-fault level turns them all off and lifts the allowance. Every design retries up to 3 times, after 2, 4 and 8 seconds.

The five designs
  1. Full overwrite: upsert every account every cycle; alert on flags that turned on since the last warehouse snapshot.
  2. Diff against the last sent state: send rows that differ from what it last confirmed; alert on episodes not yet marked sent.
  3. Read before write: read every account each cycle and send what differs; read the alert history before posting and before each retry.
  4. Ledger with keys: send rows whose warehouse version the ledger has not confirmed, with an idempotency key per request; park rejected rows until the warehouse changes them.
  5. Ledger with keys and a read-back: design 4 plus a full read-back every sixth cycle that re-sends what differs and un-parks rejected rows.

Rows are always sent whole. The account manager rules were run on designs 3 and 5. The three checks read the CRM's store and the alert channel directly, with no injected faults, and use a separate user.

Measures, runs and what was decided when

Measures are taken at the end of every cycle against the known truth. A record is wrong when any of its health score, segment or risk flag differs. 34 conditions of 10 seeds each, 340 runs. The same seed gives every design the same warehouse and the same edits by people. Each design is reported on its own; a difference between two designs counts when it has the same sign in all 10 seeds. The design, the code and the settings were committed before any run of the declared seeds; before that, only small fixtures and one undeclared seed were run, to find errors, with no measure read. Added after the runs: a test that every gap of 6 cycles or more was listed by the report, and the reading of the drift alert's firing as set off by rejected rows.

Reproduce

Every figure rebuilds from the seeds with no key and no network: make outbound reruns all 340 runs, the summaries, this page and its number check.

Displayed numbers

Percentages to one decimal, counts as whole numbers, medians of 10 seeds rounded half away from zero. Exact values are in the results files.