The pattern in one paragraph
Track a “high water mark” timestamp in your own database. Each poll asks for customers updated after that timestamp, walks all pages, and advances the watermark to the latestupdated_at you saw. That’s
it.
Implementation
newWatermark after the loop completes. On the next run,
start from where you left off.
How often should I poll?
| Use case | Interval |
|---|---|
| Customer-facing status display | 1–5 minutes |
| Internal compliance dashboard | 5–15 minutes |
| CRM sync | 15–60 minutes |
| Daily reporting | Once per day |
Edge cases
- Resume from crash. Persist the watermark after the records are written to your store, not before. Re-runs are safe because every customer write is idempotent against your own primary key.
- Clock skew. Always use the server’s
updated_atvalue, neverDate.now(), as the watermark. Otherwise drift between your clock and ours causes drops or duplicates. - Large catch-up after a long outage. The loop handles it — there’s no hard limit on backfill except rate limits. Pace your daily quota.

