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. This is the main templates page.

Manually

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.

162162

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.

Via API

Templates can be created, edited, and deleted via our templates API endpoints.

Editing a template

To edit a template, either create a new template or click on Details on 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.

160160

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.

14701470

Column options

OptionDescription
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 descriptionA description of the column visible to the user.
RequiredEach cell of the column is required to contain data.
Unique valuesData in each cell of the column must be unique.
Data validation typeThe no-code data validation applied to the column.
Letter caseSelect if text in the column should be in Proper Case, lower case, or UPPER CASE.
Character limitLower and upper bounds for the number of characters in a cell of the column.
Column must existEnsure the column is present in the uploaded spreadsheet.
Multiple value delimiterDefines the value delimiter used to separate values.
* = Required
519519

Row Constraints

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.

997997

Validation webhooks

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 is added on that template's page by clicking Add validation hook in the top right corner (to the left of Add a column and Row constraints).

FieldDescription
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 keyOptional, a way to ensure the call is authorized.
* = Required
700700

Exporting and Importing templates

Templates can be easily exported and imported in JSON format

Exporting

A template can be exported from its page 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.

Importing

A template can be imported from the main template page 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 on the main template 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 from its page by clicking the three dots in the upper right (just to the right of Add a column), and selecting Delete template.