You have successfully embedded OneSchema's Importer and now have a function CSV ingestion flow, great work! If you're wondering how to setup some more complex workflows, you came to the right place! See below for common workflows our customers set up next.
If you need to check data during the import process against your database or a third party data source, check out Validating Against External Sources. A JSON call is made to an endpoint you host with the relevant data, you run checks on your backend, and simply send a formatted response back to OneSchema indicating if there are any issues (see the two JSON snippets on the linked page for a quick understanding).
While Code Hooks can make external calls, we recommend using Validaiton Webhooks (referenced above) if a transformation is not required. If transformations are required but the end-user does not need to see and approve the results, we recommend making the transforms post-OneSchema import (the less you modify, the less confusing for the user).
If you need to change the input rules for a given data type on a per-customer basis (i.e. each customer will import a contacts file with very different columns), Using per-customer template overrides is what you're after. Template overrides allow you to programmatically edit a OneSchema template via an SDK parameter. Columns can be added, removed, and updated.
A single template can be overridden and used concurrently in multiple Importer sessions. Technically templates are overridden on a per-session basis, but most of our users think about them as a "per-customer adjustment".
If a complete import consists of multiple sheets with related data, Validating Relational Data goes into more detail on the workflow.
If you need to begin the data import process outside of OneSchema (i.e. a user does not drag+drop their file into the modal), you can use OneSchema Headless to Upload files via API. OneSchema Headless can also perform the header selection and mapping via API.
OneSchema Headless is perfect for updates workflows where an end-user needs to edit pre-existing data.
Updated 5 months ago