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

# Custom Objects

> Learn how to store and sync data with QuickBlox key-value storage.

Custom Objects module provides flexibility to define any data structure (schema) you need, build one-to-many relations between schemas and control permissions for all operations made on data. The schema is defined in QuickBlox Dashboard.

Visit [Key Concepts](/docs/key-concepts) page to learn the most important QuickBlox concepts.

## View list of classes

To view a list of classes, follow the steps below:

1. Navigate to the **Dashboard => *YOUR\_APP* => Custom** page.
2. Click the **Current Class** dropdown to view a list of classes.

<Frame>
  <img src="https://mintcdn.com/quickblox/Ue7oFsbTxPKULNVC/images/fa2b946-view_custom_classes.png?fit=max&auto=format&n=Ue7oFsbTxPKULNVC&q=85&s=5766faf850923005e7f9af7f69b54ada" width="2344" height="672" data-path="images/fa2b946-view_custom_classes.png" />
</Frame>

## Create class

To create a custom object class, follow the steps below:

1. Navigate to the **Dashboard => *YOUR\_APP* => Custom** page.
2. Click the **Add** dropdown and select **Add new class** menu item.

<Frame>
  <img src="https://mintcdn.com/quickblox/xkS1X1sSZwktmwsY/images/98f2187-add_class_.png?fit=max&auto=format&n=xkS1X1sSZwktmwsY&q=85&s=e21794b0e6d82d9e302ae579c06449d0" width="2318" height="870" data-path="images/98f2187-add_class_.png" />
</Frame>

1. Enter the name of the class.
2. Enter the name of the field.
3. Choose the type of the field.
4. Check if the new field is of the array type.
5. Add as many fields as you need by clicking the **Add field** button.
6. Click the **Create class** button.

<Frame>
  <img src="https://mintcdn.com/quickblox/-4CiPyZYUlxdCa4v/images/75a6f14-create_class.png?fit=max&auto=format&n=-4CiPyZYUlxdCa4v&q=85&s=fe0a0651973f7a748ec3e6a2aee46a8c" width="2876" height="1342" data-path="images/75a6f14-create_class.png" />
</Frame>

## Delete class

To delete a class, follow the steps below:

1. Navigate to the **Dashboard => *YOUR\_APP* => Custom** page.
2. Select a class in the **Current Class** dropdown.
3. Click the **Remove** dropdown and select **Remove class** menu item.

<Frame>
  <img src="https://mintcdn.com/quickblox/tw9NMPEfMkW_LAuD/images/cbd673f-remove_class.png?fit=max&auto=format&n=tw9NMPEfMkW_LAuD&q=85&s=4f9c502106ebf33a43b8c9a8b7d45313" width="2338" height="700" data-path="images/cbd673f-remove_class.png" />
</Frame>

## Add field

To add a field to a class, follow the steps below:

1. Navigate to the **Dashboard => *YOUR\_APP* => Custom** page.
2. Select a class in the **Current Class** dropdown.
3. Click the **Add** dropdown and select **Add field** menu item.

<Frame>
  <img src="https://mintcdn.com/quickblox/xkS1X1sSZwktmwsY/images/9bbb7e2-add_field.png?fit=max&auto=format&n=xkS1X1sSZwktmwsY&q=85&s=93f8233056af426fc06a3a42c5abb3b6" width="2274" height="756" data-path="images/9bbb7e2-add_field.png" />
</Frame>

1. Enter the name of the field.
2. Choose the type of the field.
3. Check if the new field is of the Array type.
4. Click the **Add field** button. You can add as many fields to the class as you need.

<Frame>
  <img src="https://mintcdn.com/quickblox/-4CiPyZYUlxdCa4v/images/8beed31-add_field_to_the_class.png?fit=max&auto=format&n=-4CiPyZYUlxdCa4v&q=85&s=497ec9db198938da7e10b82fa5d58710" width="2836" height="862" data-path="images/8beed31-add_field_to_the_class.png" />
</Frame>

## Remove field

To remove a field from a class, follow the steps below:

1. Navigate to the **Dashboard => *YOUR\_APP* => Custom** page.
2. Select a class in the **Current Class** dropdown.
3. Click the **Remove** dropdown and select **Remove field** menu item.

<Frame>
  <img src="https://mintcdn.com/quickblox/blsYQNp-sI61UYaV/images/09a4c9b-remove_field.png?fit=max&auto=format&n=blsYQNp-sI61UYaV&q=85&s=7e4867d1f45552f469a719f2c35bce57" width="2308" height="674" data-path="images/09a4c9b-remove_field.png" />
</Frame>

## View list of records

To view a list of records, follow the steps below:

1. Navigate to the **Dashboard => *YOUR\_APP* => Custom** page.
2. Click the **Current Class** dropdown to choose a specific class. As a result, all records of this class are displayed on the page.

<Frame>
  <img src="https://mintcdn.com/quickblox/e8BObhqG0WJty0gE/images/4ca822b-list_records.png?fit=max&auto=format&n=e8BObhqG0WJty0gE&q=85&s=c55f60a2f30dfe902a84cfe40e32d794" width="2312" height="834" data-path="images/4ca822b-list_records.png" />
</Frame>

## Add record

To add a custom object record, follow the steps below:

1. Navigate to the **Dashboard => *YOUR\_APP* => Custom** page.
2. Select a class in the **Current Class** dropdown.
3. Click the **Add** dropdown and select **Add record** menu item.

<Frame>
  <img src="https://mintcdn.com/quickblox/tw9NMPEfMkW_LAuD/images/c445b3a-add_record.png?fit=max&auto=format&n=tw9NMPEfMkW_LAuD&q=85&s=305e20b23762163271e1ba3f96f0cea2" width="2328" height="674" data-path="images/c445b3a-add_record.png" />
</Frame>

1. Set fields of the record. The record fields are defined in the class. If the field value isn't specified, a null value is inserted automatically.
2. Click the **Add record** button.

<Frame>
  <img src="https://mintcdn.com/quickblox/xkS1X1sSZwktmwsY/images/b017c1b-create_record.png?fit=max&auto=format&n=xkS1X1sSZwktmwsY&q=85&s=bc6b4784bc0f4dc7d6440064d6b9de7e" width="2854" height="1314" data-path="images/b017c1b-create_record.png" />
</Frame>

## Add child record

You can create a child record. A child record is a record that refers to another record that has already been created, a parent. When a record is created, it is assigned a record ID. Thus, you can create a new record, a child, and attach it to the parent record by pointing to its ID. See [this section](/docs/key-concepts#relations) to learn more about relations between records. To create a child record, follow the steps below:

1. Navigate to the **Dashboard => *YOUR\_APP* => Custom** page.
2. Select a class in the **Current Class** dropdown.
3. Click the **Add** dropdown and select **Add record** menu item.

<Frame>
  <img src="https://mintcdn.com/quickblox/tw9NMPEfMkW_LAuD/images/c732545-add_record.png?fit=max&auto=format&n=tw9NMPEfMkW_LAuD&q=85&s=ab5326a45c8316ad42eb3e5e48cdb039" width="2328" height="674" data-path="images/c732545-add_record.png" />
</Frame>

1. Set fields of the record. The record fields are defined in the class. If the field value isn't specified, a null value is inserted automatically.
2. Set a parent ID to refer to a parent record.
3. Click the **Add record** button.

<Frame>
  <img src="https://mintcdn.com/quickblox/tw9NMPEfMkW_LAuD/images/c2458a1-add_child_record.png?fit=max&auto=format&n=tw9NMPEfMkW_LAuD&q=85&s=6ba2ef2200f760c397abb2497fae6587" width="2834" height="1442" data-path="images/c2458a1-add_child_record.png" />
</Frame>

## Edit record

To edit a record, do the following:

1. Navigate to the **Dashboard => *YOUR\_APP* => Custom** page.
2. Select a class in the **Current Class** dropdown.
3. Click the ID of the record to edit.

<Frame>
  <img src="https://mintcdn.com/quickblox/tw9NMPEfMkW_LAuD/images/de76c31-edit_record.png?fit=max&auto=format&n=tw9NMPEfMkW_LAuD&q=85&s=a685dd731d28f2da347e88005206d66f" width="2332" height="858" data-path="images/de76c31-edit_record.png" />
</Frame>

1. Edit record fields.
2. Click the **Update record** button to save changes.

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/quickblox/images/4190dd0-edit_record.png%20" />
</Frame>

## Remove record

To remove a record, follow the steps below:

1. Navigate to the **Dashboard => *YOUR\_APP* => Custom** page.
2. Check the record you want to delete.
3. Click the **Remove selected** button.

<Frame>
  <img src="https://mintcdn.com/quickblox/xkS1X1sSZwktmwsY/images/906ec63-remove_record.png?fit=max&auto=format&n=xkS1X1sSZwktmwsY&q=85&s=72fb7d03fcc90592d6bcc812cfb6b986" alt="remove record.png" width="2312" height="1008" data-path="images/906ec63-remove_record.png" />
</Frame>

## Set permissions

You can set a permissions schema. There are two access levels in the permissions schema: class and record. Only one permission level can be applicable to the record: class permission schema or record permission schema.

### Class permissions

Only the account owner can create a class in the Custom Objects module and make all possible actions with it.

All actions (Create, Read, Update, and Delete) are available for the class entity and are applicable for all records in the class.
Every action has a separate permission level available. The exception is a Create action that is not available for the **Owner** permission level.
See [this section](/docs/key-concepts#permission-levels) to learn about permission levels.

Default class permission schema is used while creating a class:

* **Create**: Open
* **Read**: Open
* **Update**: Owner
* **Delete**: Owner

To set a permissions schema for the class, do the following:

1. Navigate to the **Dashboard => *YOUR\_APP* => Custom** page.
2. Select a class in the **Current Class** dropdown.
3. Click **Edit permission** button.

<Frame>
  <img src="https://mintcdn.com/quickblox/tw9NMPEfMkW_LAuD/images/cea8914-edit_class_permissions.png?fit=max&auto=format&n=tw9NMPEfMkW_LAuD&q=85&s=09d2e67827dbed01d122eacbefc4febc" width="2310" height="666" data-path="images/cea8914-edit_class_permissions.png" />
</Frame>

1. Set a permission level for each CRUD operation here. See [this section](/docs/key-concepts#permission-schema) to learn more about permission levels.
2. Check the boxes in **Use Class permissions** if you want to apply class permissions to all its records.
3. Click the **Edit permissions** button.

<Frame>
  <img src="https://mintcdn.com/quickblox/tw9NMPEfMkW_LAuD/images/c9a9565-edit_permissions.png?fit=max&auto=format&n=tw9NMPEfMkW_LAuD&q=85&s=9b895df6a59f3d813fd1275a7f497f8a" width="2844" height="1028" data-path="images/c9a9565-edit_permissions.png" />
</Frame>

<Note>
  A class permission schema has a higher priority than a record permission schema. If an **account owner** ticks the **Use Class permissions** checkbox, the record permissions are ignored.

  In case, an **account owner** doesn't tick the **Use Class permissions** checkbox, a user has a possibility to change permission levels for every separate record in the table or create a new one with the ACL that a user requires.
</Note>

### Record permissions

A record is an entity within the class in the Custom Objects module that has its own permission levels. All permission levels except for the **Not Allowed** are available for the record and there are only three actions available and applicable for the record: Read, Update, and Delete. See [this section](/docs/key-concepts#permissions) to learn more about permissions.

Default Record permission schema is used while creating a class:

* **Read**: Open
* **Update**: Owner
* **Delete**: Owner

To set a permissions schema for the record, do the following:

1. Navigate to the **Dashboard => *YOUR\_APP* => Custom** page.
2. Select a class in the **Current Class** dropdown.
3. Click the ID of the record to edit.
4. Click the **Set permissions on record** button.

<Frame>
  <img src="https://mintcdn.com/quickblox/blsYQNp-sI61UYaV/images/00d7fed-edit_record_permissions.png?fit=max&auto=format&n=blsYQNp-sI61UYaV&q=85&s=10f6ab34176dfc16d48587cbb479d2ec" alt="edit_record_permissions.png" width="2804" height="1380" data-path="images/00d7fed-edit_record_permissions.png" />
</Frame>

1. Set a permission level for each CRUD operation here. See [this section](/docs/key-concepts#permission-levels) to learn more about permission levels.
2. Click the **Update record** button to save changes.

<Note>
  A class permission schema has a higher priority than a record permission schema. If an **account owner** ticks the **Use Class permissions** checkbox, the record permissions are ignored. See [this section](/docs/custom-objects-dashboard#class-permissions) for more details.
</Note>

## Import data

You can import data in CSV or JSON format. To import data, do the following:

1. Navigate to the **Dashboard => *YOUR\_APP* => Custom** page.
2. Select a class in the **Current Class** dropdown.
3. Click **Browse** to choose a CSV or JSON file in a local file system.
4. Click **Import Data**.

<Frame>
  <img src="https://mintcdn.com/quickblox/e8BObhqG0WJty0gE/images/47b3de4-import_class_records.png?fit=max&auto=format&n=e8BObhqG0WJty0gE&q=85&s=dec07204bc45bbe7b67f9f739e563bc2" alt="import class records.png" width="2296" height="896" data-path="images/47b3de4-import_class_records.png" />
</Frame>

## Import schema

You can import a class schema. The class schema defines class fields and their data types in .yml format. To import a class schema, do the following:

1. Navigate to the **Dashboard => *YOUR\_APP* => Custom** page.
2. Select a class in the **Current Class** dropdown.
3. Click the **Browse** to choose a .yml file in a local file system.
4. Click **Import Schema**.

<Frame>
  <img src="https://mintcdn.com/quickblox/Ue7oFsbTxPKULNVC/images/ec2c5cd-import_schema.png?fit=max&auto=format&n=Ue7oFsbTxPKULNVC&q=85&s=bc9f0a73e739ea6c258155aa807a2863" alt="import schema.png" width="2350" height="958" data-path="images/ec2c5cd-import_schema.png" />
</Frame>
