Import existing records
Bring a CSV export or provider API into your workspace ontology. Preserve source IDs and relationships, make a repeated batch safe and reconcile the result.
Choose where each row belongs
Put records people will edit, approve or act on in the ontology. For example, a company and its open tickets need record IDs and a relationship. A daily table of ticket counts for reporting fits a warehouse pipeline. A migration can use both. The write path for operational records is an ontology action.
Map IDs before importing
Take a small export with related rows, including an empty optional field and a record that was updated. Write down the source field, its type, the target property and the rule for a missing value. Keep the provider’s stable ID as text when its formatting matters. For multiple source accounts, include the source and account in the unique key.
- For example, company C-10 and ticket T-42 are two records. Match the ticket’s company_id to C-10 before linking it to the new company record. Two companies with the same display name should stay distinct.
- A Telegram user ID can be imported when the source export or API actually supplies it. Store it separately from the display name or username. For a member who will act through the agent, follow the workspace’s sign-in or pairing flow to establish their permissions.
- Check an attachment and a historical change in the actual export. Preserve their original timestamp and author as source data if users need that history.
Implement a repeatable batch action
Ask the coding agent to declare the unique key in the entity and write an import action that matches on that key. The Ontology SDK’s upsertMany accepts a unique property or declared compound unique index. Its summary reports created, updated and unchanged counts. Give the importing identity the specific action permission. Decide how to handle notifications or other effects when a row is replayed.
- Import parent records first. Match dependent rows through the saved source keys. Put unresolved references and duplicate keys in a report with their source IDs so someone can correct them.
- For a provider API, declare a connection and checkpoint the cursor after the batch commits. For a file, record the source filename and batch range so the same input can be replayed.
Reconcile a sample before the full import
Run the action on sample data in a preview. For C-10 and T-42, open the ticket, follow its company link and check it reaches the expected company. Replay the identical batch. Expect unchanged rows and the same links. Then change one source field and check that only the intended record updates.
- For the full run, compare distinct keys and counts by entity, source and status. Account for every rejected or intentionally skipped row. Compare a business total such as open-ticket count by owner.
- Keep the import result and rejected rows alongside the source export. Resume from the last successful batch and run the same comparisons on the final delta before cutover.