kennraDocs

Migrate to Kennra

You can bring customer data from another CRM or system in two ways: a one-off migration that an admin runs, or a continuous sync that runs as an app. Both write through the same public API, and both can keep the dates records have in the source system.

Original dates

Every write in Kennra has two times. occurredAt is when something happened in the world, and recordedAt is when Kennra stored it. A migration usually wants occurredAt to be the source system's date: when a company was created, when a deal moved stage.

A past occurredAt, or import provenance (the source system and record), needs the scope kennra:import:backdate. Without it, the write is refused with BACKDATE_NOT_ALLOWED. With it:

  • Timelines, history, as-of reads and reports use the source system's dates.
  • recordedAt is always the real time of the import. knownAt reads show what Kennra knew before the import.
  • A record's updatedAt (Last modified) is when its latest change happened, so imported records keep the source system's dates. It never moves backwards: an older change imported later leaves it as it is. Its recordedAt is when Kennra recorded that change.
  • To keep another system in step, use webhooks. They follow Kennra's event log, so imported history arrives too, also when its dates are in the past.
  • The audit log names who wrote it: the person, or the app.

kennra:import:backdate is opt-in per token. A person or app that may hold it still gets it only in a token that asks for it in scope. Agents never get it.

One-off migration: the CLI

For a migration that runs once, or now and then, an admin runs the CLI with an import plugin or a script. It runs on the admin's machine with the admin's own token and leaves no running service and no stored source credentials in Kennra.

  • kennra import organizations and kennra import people read CSV or NDJSON with a mapping file. Run with --dry-run first.
  • From Attio, Kennra has an import plugin (kennra import attio) that moves people, companies, deals, lists, notes, tasks, meetings and emails with Attio's original dates. The plugin isn't published, so Kennra runs that migration with you. Ask Kennra support.
  • A script can call the GraphQL API with the same token: semantic commands take provenance { system, ref, occurredAt }.

A token for an import comes from a member who holds the technical Importer role, and the token asks for kennra:import:backdate.

Continuous sync: an app

For a sync that keeps running, build an app. A private app is the shortest path: a workspace admin creates it under Settings, Apps, Private apps, and it gets a client id, a secret and a grant.

To keep original dates, the admin turns on Keep original dates (import) for the private app. It is off by default, only workspace admins and owners can change it, and every change is in the audit log. Turn it off when the migration or initial sync is done.

The app then asks for the scope when it needs it:

curl -s -XPOST https://api.kennra.com/apps/token \
  -H 'content-type: application/json' \
  -d '{"grant_type":"client_credentials","client_id":"<app id>","client_secret":"<secret>","installation":"<installation id>","scope":"kennra:read kennra:party:write kennra:import:backdate"}'

scope narrows the token to those scopes of the grant. Leave kennra:import:backdate out of everyday tokens: without it, the app's writes get the real time. A scope outside the grant is refused with invalid_scope.

A published app asks for kennra:import:backdate in its manifest instead, and Kennra's review gates it.

Which path to choose

You wantUse
Move once from another CRM, then stopThe CLI, run by an admin
Import a file of companies or peoplekennra import organizations or kennra import people
Keep Kennra in step with another systemA private or published app
Load history first, then sync liveAn app with Keep original dates (import) on for the first load, then off

Kennra is in the design partner stage. Data is stored and processed in Stockholm (AWS eu-north-1).