Skip to content

Syncing

Every Esper QA deployment is a separate source. Store the deployment value from GET /meta with everything you sync.

GET /calls/changes?updated_since=… returns every call created or changed after that time, oldest change first: new calls, finished evaluations, re-scores and reviewer overrides.

  1. First run: start from the oldest date you care about.
  2. Page through with next_cursor until it is null, upserting by id.
  3. Remember the largest updated_at you stored and pass it as updated_since next time.

A call can appear several times as it moves through processing; the latest copy wins. The feed includes answering-machine calls and later legs of multi-recording calls; filter them with is_voice_machine and parent_call_id if you do not want them.

  1. GET /meta: if facts_timezone changed, resync all daily figures.
  2. GET /facts/days?day_from&day_to: one row per day with its computed_at.
  3. For each day whose computed_at differs from yours, page through GET /facts/agent-daily for that day and replace everything you hold for it. Delete days that are missing from the manifest.
  4. If a page returns a different computed_at than the manifest, the day was rebuilt during your download: restart that day.

Today is rebuilt during the day and the last 3 days nightly; older days do not change. Every 15 minutes is often enough.

  • GET /directory/*: small lists; refresh hourly and replace your copy.
  • GET /leads/details?updated_since=… and GET /coaching-cases?updated_since=… sync the same way as calls.