> ## Documentation Index
> Fetch the complete documentation index at: https://developer.dromo.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Using Schema Studio

Dromo's Schema Studio streamlines creating a schema, so you can start working with Dromo.

## Creating a Schema[​](#creating-a-schema "Direct link to Creating a Schema")

<Check>
  [Click here to get started with Schema Studio now!](https://dashboard.dromo.io/public/schemas/create)
</Check>

Once you've [logged into](https://dashboard.dromo.io/auth/login) your Dromo account, you can access Schema Studio from your [Dromo dashboard](https://dashboard.dromo.io/schemas). Here, you can create a new schema or update any schemas you've previously created. Click **Create Schema**:

<img src="https://mintcdn.com/dromo-88ab5238/JhcPQeQwUXntQUrW/images/guides/highlight_dashboard_schemaBuilder.png?fit=max&auto=format&n=JhcPQeQwUXntQUrW&q=85&s=e37404e1a520309f33d1ab1d2b01e43f" alt="Navigate to Schema Studio" width="763" height="427" data-path="images/guides/highlight_dashboard_schemaBuilder.png" />

<Steps>
  <Step title="Add a Name">
    <img src="https://mintcdn.com/dromo-88ab5238/JhcPQeQwUXntQUrW/images/guides/add_schema_name.png?fit=max&auto=format&n=JhcPQeQwUXntQUrW&q=85&s=53d51e292ca85dc131e91a9e506e18f8" alt="Adding a schema name" width="745" height="254" data-path="images/guides/add_schema_name.png" />
  </Step>

  <Step title="Customize your importer">
    Next, you can customize the importer your end-user interacts with:

    <img src="https://mintcdn.com/dromo-88ab5238/JhcPQeQwUXntQUrW/images/guides/schemaBuilder_general_settings.png?fit=max&auto=format&n=JhcPQeQwUXntQUrW&q=85&s=3be59fea2ed727ea30eb1ba7d6efefc2" alt="Customizing the general settings of your Dromo importer" width="618" height="520" data-path="images/guides/schemaBuilder_general_settings.png" />

    You can optionally configure the importer's:

    * title
    * behavior for [invalid data](/reference/settings/settings#invaliddatabehavior)
    * a [webhook URL](/reference/webhooks) where new submissions are sent
    * ability to let users add [custom fields](/reference/settings/settings#allowcustomfields)
    * private mode settings

    <Info>
      Private mode lets you to control whether user data is sent or persisted through Dromo's servers. Private mode is only available on the [Dromo Pro plan](https://dromo.io/pricing).
    </Info>

    You can also optionally customize your importer's appearance with custom colors. You can preview your Dromo importer's appearance by clicking **Test now** in the footer:

    <img src="https://mintcdn.com/dromo-88ab5238/VjTJv57JjeRp6U-3/images/guides/test_now.png?fit=max&auto=format&n=VjTJv57JjeRp6U-3&q=85&s=7adcb8ef0147163aaf296592e2d3ae1f" alt="Use the Test Now button to see your importer" width="577" height="441" data-path="images/guides/test_now.png" />
  </Step>

  <Step title="Add fields to your schema">
    Next, you'll define your schema's fields. You can think of a schema's [fields](/reference/fields) like columns in a spreadsheet.

    If you are importing your user-collected data into a database, you'll want your data to be in the shape your database table expects. This means your schema's fields usually match the columns in your database. For example, let's say you have a client database table with two columns for clients' names and emails. Your schema would have two fields to match your database table; one for our clients' names and a second for their emails.

    You can add fields in two ways:

    1. Importing a CSV and letting Schema Studio automatically detect the field and types.
    2. Manually clicking the **Add field** button.

           <img src="https://mintcdn.com/dromo-88ab5238/JhcPQeQwUXntQUrW/images/guides/add_fields.png?fit=max&auto=format&n=JhcPQeQwUXntQUrW&q=85&s=5efa811e1990bf57239c4a2286f65059" alt="Use an existing file or manually add fields" width="1604" height="656" data-path="images/guides/add_fields.png" />

    Once you've added a new field, clicking on the name of that field enables you to customize or delete it. You can customize a field's:

    * Label: The column name your users see in the importer.
    * Key: The field's unique identifier is this field's key in the JSON results.
    * Description: A description for this field that your users will see in the importer.
    * Type: The [type](/reference/fields/field-types) of data your user should input (e.g., email, date, text, etc.).

          <img src="https://mintcdn.com/dromo-88ab5238/JhcPQeQwUXntQUrW/images/guides/customize_field1.png?fit=max&auto=format&n=JhcPQeQwUXntQUrW&q=85&s=9f623349a506f431ade571371d28c942" alt="The options to customize a field" width="484" height="403" data-path="images/guides/customize_field1.png" />

    Additionally, you can use [**validators**](/reference/fields#validators) to enforce rules for the data a user is allowed to import. You can choose to make a field required, unique, follow a particular [Regex](https://en.wikipedia.org/wiki/Regular_expression) pattern, or any combination of the above:

    <img src="https://mintcdn.com/dromo-88ab5238/JhcPQeQwUXntQUrW/images/guides/customize_field2.png?fit=max&auto=format&n=JhcPQeQwUXntQUrW&q=85&s=09cbe021fce9a7fa9ea47e2d8fdc73bd" alt="The validators you can add to a field" width="489" height="283" data-path="images/guides/customize_field2.png" />

    You can try out your importer settings and fields in real-time using the **Test now** button on the footer on the screen:

    <img src="https://mintcdn.com/dromo-88ab5238/VjTJv57JjeRp6U-3/images/guides/test_now_focus.png?fit=max&auto=format&n=VjTJv57JjeRp6U-3&q=85&s=1766671d466307d6e41337588d6b7e70" alt="Click test now to try our your schema" width="458" height="346" data-path="images/guides/test_now_focus.png" />

    Once you've customized your schema, click **Save schema**. You'll be redirected to the main Schema Studio page, where you can see your new schema:

    <img src="https://mintcdn.com/dromo-88ab5238/JhcPQeQwUXntQUrW/images/guides/new_schema_added.png?fit=max&auto=format&n=JhcPQeQwUXntQUrW&q=85&s=6cdf23e9c6785b99248bfa3efedb12a5" alt="New schema added to total list" width="766" height="270" data-path="images/guides/new_schema_added.png" />
  </Step>
</Steps>

## Using Schemas

To start using a schema in your application, click on the angled brackets icon in the Schemas Tab in the Dashboard:

<img src="https://mintcdn.com/dromo-88ab5238/JhcPQeQwUXntQUrW/images/guides/angled_brackets_focus.png?fit=max&auto=format&n=JhcPQeQwUXntQUrW&q=85&s=58650cc76e6e09bee9282d518ce0a743" alt="Schema icons" width="490" height="220" data-path="images/guides/angled_brackets_focus.png" />

Copy and paste the pop-up code block into your own website's code and you're done! 🎉 You should be able to test the flow now.

<Info>
  You can see your user's imports from the [**Imports** Tab](https://dashboard.dromo.io/imports) in your Dromo dashboard.
</Info>

However, to integrate into your application, you will still need to handle the data, which you can do via the [`onResult` callback](/reference/results).

<CodeGroup>
  ```javascript JavaScript theme={null}
  dromo.onResults((response, metadata) => {
    // Connect to our database
    db.connect();
    // create new entries in our database using the user's imported data
    db.uploadData(response);
  });
  ```

  ```jsx React theme={null}
  <DromoUploader
    ...
    onResults={(response, metadata) =>
      // Connect to our database
      db.connect();
      // create new entries in our database using the user's imported data
      db.uploadData(response);
    }
  ></DromoUploader>
  ```
</CodeGroup>

## Advanced Usage

### Assigning User Metadata

Currently, your importer doesn't know *who* is using it to upload information. If a user uploads data, there is no associated metadata for that user, so all user-related fields are left blank:

<img src="https://mintcdn.com/dromo-88ab5238/JhcPQeQwUXntQUrW/images/guides/no_set_user_in_imports.png?fit=max&auto=format&n=JhcPQeQwUXntQUrW&q=85&s=b4f8237d0b001e96c7fa615f93482a81" alt="No set user for an Import" width="1604" height="384" data-path="images/guides/no_set_user_in_imports.png" />

However, you can add more context to an upload by setting user metadata about the end user to associate with an import:

<CodeGroup>
  ```javascript theme={null}
  const dromo = new DromoUploader("YOUR_LICENSE_KEY", "YOUR_SCHEMA_ID");

  // Create a user object to associate imports to
  const user = {
    id: '1',
    name: 'Jane Doe',
    email: 'jane@dromo.io',
    companyId: 'Dromo',
    companyName: '12345'
  };

  // Associate the above user to this import
  dromo.setUser(user);
  ```
</CodeGroup>

### Development Mode[​](#development-mode "Direct link to Development mode")

The `DromoUploader` offers a "development mode" for testing import flows or iterating on finishing touches. Dromo doesn't charge you for data you import in development mode, but you are restricted to only importing 100 rows for any given file.

<Info>
  Your importer runs in development mode by default if you do **not** have an active Dromo subscription. To run Dromo in production, upgrade [to one of our pricing plans](https://dromo.io/pricing).
</Info>

You can switch your `DromoUploader` into development mode using the `setDevelopmentMode` method, like so:

<CodeGroup>
  ```javascript theme={null}
  <script type="text/javascript">
    const dromo = new DromoUploader("YOUR_LICENSE_KEY", "YOUR_SCHEMA_ID");
    dromo.setDevelopmentMode(true);
  </script>
  ```
</CodeGroup>

The importer now shows a development mode banner, and all incoming imports are now flagged as development imports and you don't get charged for them!

<img src="https://mintcdn.com/dromo-88ab5238/JhcPQeQwUXntQUrW/images/guides/development_mode_banner.png?fit=max&auto=format&n=JhcPQeQwUXntQUrW&q=85&s=db34c51e50b5c1d26d8e6ae5d4705aa7" alt="Development Mode" width="2654" height="242" data-path="images/guides/development_mode_banner.png" />
