In order to set up your embed, you must first set up a template (which provides the ruleset to validate your customer's data) as well as an import webhook (which dictates where the imported data will be sent to).
You can see all your current templates by logging into OneSchema and going to the
Templates tab in the top left. If you do not have any templates, you can create a new template by uploading a clean CSV. OneSchema will intelligently infer the ruleset of your data from the uploaded CSV, but you should still make sure that each of the column validations match your expected data schema.
All import webhooks are listed under the
Webhook tab in the
Developer Dashboard. If you want to jump in and get started, we recommend testing using webhook.site to get your webhook url. To actually properly embed OneSchema into your own website, however, your engineering team will need to set up the proper endpoint.
Now that your template and webhook are set up, you can get started configuring your importer. Luckily, OneSchema provides a seamless and streamlined process for generating a sample code snippet that you can use to embed OneSchema into your product.
First, specify the destination domains for your importer. This is the domain from which the embed will be hosted (this will usually be your own company's domain). If you want to get started quickly, codepen.io is a great starting point. Note that you will need to add both
https://cdpn.io in order to test embedded OneSchema with codepen. Once you have configured your domains, click the
Importer Quickstart button at the top of the page to continue.
Next, you need to configure your importer. The Importer quickstart page will house all the configurations you need to set up your embed. Choose your template and webhook from the appropriate dropdowns. Then, configure your test JWT. This will all you to test passing in various pieces of meta data into the embed (such as
Once you have your template, webhook, and JWT configured, you're almost done! Simply click the generate snippet button in the bottom right to get a custom snippet with the specified configurations. You can copy this code into codepen to test, or use it as a jumping off point to implement embedded OneSchema into your codebase.
Updated over 1 year ago