Creating and Editing Templates
Creating a template
To get to your templates, go to your OneSchema portal and select Templates from the menu bar at the top of the page. You can create templates through the following methods.
In the upper right hand corner of the templates page, select New template, then click Build a template from scratch in the window that pops up. A blank template will be created and columns can be added one by one.
From a clean spreadsheet
In the upper right hand corner of the templates page, select New template, then upload a pre-cleaned spreadsheet file in the window that pops up. This must be a single spreadsheet (i.e. not a workbook with multiple tabs). The clean spreadsheet file should contain headers (must be first row) and sample data in the format your application can accept. OneSchema will intelligently scan the data in order to automatically determine the datatype in each column. A template will be created with column names matching those of the uploaded spreadsheet and validation rules based on the datatypes of the sample data.
Templates can be created, edited, and deleted via our templates API endpoints.
Editing a template
To edit a template, click on Details of the template you want to edit.
Adding a column
To add a new column, click Add a column in the top right of a specific template's page.
Editing an existing column
To edit a column that already exists in a template, simply click on the row associated with that column. A column can be removed by clicking on the trash can on the right of that column's row.
|Column template name*||The name given to the column during data validation and import.|
|Column key*||A unique identifier used to identify webhook columns instead of the column name.|
|Column description||A description of the column visible to the user.|
|Required||Each cell of the column is required to contain data.|
|Unique values||Data in each cell of the column must be unique.|
|Data validation type||The no-code data validation applied to the column.|
|Letter case||Select if text in the column should be in Proper Case, lower case, or UPPER CASE.|
|Character limit||Lower and upper bounds for the number of characters in a cell of the column.|
|Column must exist||Ensure the column is present in the uploaded spreadsheet.|
|Multiple value delimiter||Defines the value delimiter used to separate values.|
|* = Required|
Settings for Row constraints can be found in the upper right corner of a template's page, just to the left of the Add a column button. A row constraint is a conditional check of one column's value based on the value contained in another. Each row is checked individually. For a given row, the check follows the form of: If column A contains X, then column B must contain Y, else surface an error.
A validation webhook is a way to validate data against a third-party data source, your database, or perform complex formulaic checks. OneSchema will pass the requested data via webhook to an endpoint you host, and simply expects to receive a list of errors and warnings in response. Please see our validation webhook API documentation.
A validation webhook is created for a specific template and associated to a template by clicking Add validation hook in the top right corner (to the left of Add a column and Row constraints).
|Validation hook name*||A name so you can easily identify your webhook.|
|URL*||The URL of your endpoint.|
|Template column keys*||Select the columns you'd like passed to your endpoint.|
|Secret key||Optional, a way to ensure the call is authorized.|
|* = Required|
Exporting and Importing templates
Templates can be easily exported and imported in JSON format on the templates page.
A template can be exported by clicking the three dots in the upper right (just to the right of Add a column), and selecting Export template. A JSON file will be downloaded containing all configurations for that template.
A template can be imported by clicking Import template in the upper right corner to the left of New template. Select a template configuration JSON file to upload.
Duplicating a template
Templates can be duplicated page by clicking Duplicate on a specific template. This is useful for testing changes without overwriting a template or for creating a similar, but slightly different template.
Deleting a template
A template can be deleted by clicking the three dots in the upper right (just to the right of Add a column), and selecting Delete template.
Updated 18 days ago