# Runtime Schema

{% hint style="info" %}
Available after the impler version `0.9.1`&#x20;
{% endhint %}

## Purpose

Consider you have an ERP application that needs to import sales information. Our system provides a way to add extra information to sales information, like `challan-no`. Other users might have different columns.

In that case, fixing the import data structure is impossible. So we need to pass schema during run time when the user clicks on `Import` button to import the data.

You can find relevant implementation for react in [React Embed](/importer/react-embed.md#providing-runtime-schema)and for HTML & HS in [HTML & JS Embed](/importer/html-js-embed.md#providing-runtime-schema)

## Example Schema

```
[
  {
    name: 'Name',
    key: 'name',
    type: 'String'
  },
  {
    name: 'Phone',
    key: 'phone',
    type: 'Number',
    defaultValue: '#########'
  },
  {
    name: 'Country',
    key: 'country',
    type: 'String'
  }
]
```

## Available properties for schema

Here are the keys&#x20;

* `name (required)`: The name of the column, will be displayed in the import widget during mapping.
* `key (required)`: The key of the column, will be used to create an Excel file and match it with available headings in the file.
* `type (optional)`: One of the types from `String`, `Number`, `Date`, `Email`, `Regex`, `Select`, and `Any` to override the existing type for the column.
* `isRequired (optional)`: A boolean value indicating whether values in the current column are required.
* `isUnique (optional)`: A boolean value indicating whether values in the current column must be unique.
* `selectValues (optional)`: Select values indicating what are the possible values when the type is select.
* `regex (optional)`: A regular expression to override when the type is `regex`.
* `dateFormats (optional)`: Date formats indicating a list of formats acceptable for the date field. Required when type is `Date`. For example, `['dd/mm/yyyy','dd/mm/yy']`

***

If you have any questions, suggestions, or comments. Feel free to reach out to us over [**Discord**](https://discord.impler.io). We’re constantly improving to deliver the best Data Importer for your product, and we value your input.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.impler.io/features/runtime-schema.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
