Using Schema Studio
Dromo's Schema Studio streamlines creating a schema, so you can start working with Dromo fast. Watch the below video for a quick overview of Schema Studio:
Creating a Schema
Once you've logged into your Dromo account, you can access Schema Studio from your Dromo dashboard. Here, you can create a new schema or update any schemas you've previously created. Click Create Schema:
Step One: Add a Name
You'll have several options to customize your new schema's preferences. Start by giving your schema a name:
Step Two: Customize your importer
Next, you can customize the importer your end-user interacts with:
You can optionally configure the importer's:
- title
- behavior for invalid data
- a webhook URL where new submissions are sent
- ability to let users add custom fields
- private mode settings
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.
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:
Step Three: Add fields to your schema
Next, you'll define your schema's fields. You can think of a schema's 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:
- Importing a CSV and letting Schema Studio automatically detect the field and types.
- Manually clicking the Add field button.
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 of data your user should input (e.g., email, date, text, etc.).
Additionally, you can use 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 pattern, or any combination of the above:
Pro plan users can access additional validators and can create custom validations to ensure their incoming data is always ideal.
You can try out your importer settings and fields in real-time using the Test now button on the footer on the screen:
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:
Using schemas
The Schemas page shows your collection of schemas, and beside each schema are three icons:
To start using a schema in your application, click on the angled brackets icon:
Copy and paste the pop-up code block into your own website's code:
You've done it! You've successfully built a new schema and added an importer to your website, enabling your users to use Dromo for a streamlined importing experience. 🎉
You can see your user's imports from the Imports tab in your Dromo dashboard.
However, in order to utilize this data, you still need to move it into your backend. Upon each upload, you can automatically push your user-imported data directly into your database using the onResults
callback:
- JavaScript
- React
dromo.onResults((response, metadata) => {
// Connect to our database
db.connect();
// create new entries in our database using the user's imported data
db.createClients(response);
});
<DromoUploader
...
onResults={(response, metadata) =>
// Connect to our database
db.connect();
// create new entries in our database using the user's imported data
db.createClients(response);
}
>
</DromoUploader>
You can also use a webhook to push your user-imported data into your database.
Editing and deleting schemas
Clicking the pencil icon enables you to edit a schema. Clicking on the trash can icon opens a modal where you can confirm you want to delete a schema: