# Custom objects and the data model

> Your own record types linked to companies, contacts, opportunities and conversations — production lines, branches, equipment, projects. The data model map, fields, relations, table and kanban, Quick Entry block, API and plan limits.

Solk's standard objects — **Company, Contact, Conversation, Opportunity, Task, Trial, Quote, Order** — form a connected data model. When your business needs a record type of its own (a company's **production lines**, **branches**, **equipment** in the field, **projects / sites**), you define it as a **custom object**: it gets its own fields, relations to standard and other custom objects, a table view, a record page and a Quick Entry block.

## The data model map {#map}

**Settings → Data model** (admins) shows every object and the relations between them on one map. **Conversation** sits in the centre: every [Quick Entry](/guides/quick-entry) creates a conversation record, and the contact, opportunity, trial and next step link to it.

- Click an object: its relations are highlighted; the side panel shows its description, fields, relations and **where it is used** (Quick Entry, company card, mobile …).
- Custom objects are drawn in purple with a **custom** tag; edges show the relation's cardinality (`N : 1`, `1 : N`, `N : N`).
- **Custom object** at the top right creates a new object. When your plan's allowance is used up, the button becomes **Upgrade plan**.

## Defining an object {#create}

:::steps
### Start from an example or from scratch

The examples at the top of the editor come with fields and relations: **Production line**, **Branch / site**, **Equipment**, **Project / site**. Everything can be changed.

### Object

**Singular name** (*Production line*), **Plural name** (*Production lines*), **Record name field** (*Line name*), **Icon** and a short description. The **API key** is generated from the name (`uretim_hatti`) and is used in URLs and the API.

### Fields

**+ Add field** — types: Text, Long text, Number, Currency, Percent, Date, Select, Multi-select, Checkbox, User, Link, E-mail, Phone. Each field can be marked **required** and **in Quick Entry**; drag to reorder (up to 40 fields). Required fields are asked when a record is created — Quick Entry included.

### Relations

Target: Company, Contact, Opportunity, Conversation, Trial or another custom object. Click the cardinality to change it:

| Cardinality | Meaning (production line → company) |
|---|---|
| `N : 1` | Each line belongs to one company; a company has many lines. |
| `1 : N` | Many records link to one line (e.g. the line's trials). |
| `N : N` | Many on both sides (e.g. lines ↔ opportunities). |

### Where it appears

| Switch | What it turns on |
|---|---|
| **Block in Quick Entry** | Pick a record or create one while logging a conversation; the conversation links to the record (a conversation relation is added automatically). |
| **Card on the company page** | Records linked to the company are listed on the company card. |
| **In the mobile app** | iOS and Android: list, record page, Quick Entry block. |
| **Sidebar, table and kanban** | Under **Records** in the sidebar; saved views, bulk update, Excel. |
| **API and app notifications** | REST API, workflows and Slack / webhook notifications. |

The preview on the right shows the record page and the Quick Entry block as you type. **Save**.
:::

:::note
A field that already has values **can't change type** (the editor warns you). A removed field is deactivated and its values are kept. **Archive** retires an object; an object without records can be removed completely with **Delete**.
:::

## Records {#records}

Each object's table lives at `/o/<key>` (**Records** in the sidebar). Every tool of [table views](/guides/views-and-lists) works here too: column picker, filters, sorting, saved views (*All*, *My records*), **kanban** by a select field, bulk update and Excel export. Columns are the fields and relations (e.g. *Company*, *Opportunities*).

The **New** record form asks for the required fields; opened from a company page, the company is preselected. The **record page** shows the fields (**Edit**), company, owner, linked records per relation type (**Add a link**) and [comments](/guides/comments). **Log a call** opens Quick Entry with the record selected; **⋯** holds Archive · Restore · Delete.

Records are searchable in the command palette (`Ctrl+K`); on the company page, an object with **Card on the company page** lists the company's records with a short summary.

## In Quick Entry {#quick-entry}

An object with **Block in Quick Entry** becomes a block in the Quick Entry templates. The block lists the company's records; pick one, or type a name and the fields marked **in Quick Entry** to create a new record. On saving, the conversation — and the opportunity and trial, when related — link to the chosen record. If the block is required in the template, an entry can't be saved without a record. [Templates](/guides/quick-entry#templates)

## Automation {#automation}

Creating a record fires the **Record created** event: [workflows](/guides/workflows) can start from it, and [webhooks](/guides/webhooks) and Slack / Teams notifications send it (when the object has **API and app notifications** on).

## Plan limits {#plans}

| Plan | Custom objects |
|---|---|
| Essentials | — |
| Professional | 3 |
| Advanced | 10 |
| Enterprise | unlimited |

Installations on module-based licences have no limit. Downgrading doesn't delete existing objects; only new objects can't be created.

## API {#api}

Objects open to the API are listed with [`GET /api/v1/objects`](/rest-api/objects/objects-list); records have endpoints to [list](/rest-api/objects/records-list), [create](/rest-api/objects/records-create), [get](/rest-api/objects/records-get), [update](/rest-api/objects/records-update), [delete](/rest-api/objects/records-delete) and [link](/rest-api/objects/records-link). The company card (`GET /api/v1/customers/{id}`) carries the records of mobile-enabled objects under `objects`.