# Custom Objects

## Introduction

Custom Objects are structures defined to store various information within a contact. The same contact can contain any number of Custom Objects, which can be created through automations or manually.

**Examples of possible Custom Objects:**

* Feedbacks: support ticket ID, feedback message (optional) and service rating.
* Order: order ID, order name and unit price.
* Requested Exams: type of exam, scheduling date, laboratory.
* Event Participations: event name, date, attendance confirmed, notes.
* Internal Trainings: training name, workload, date, completion (yes/no).

## Creating a Custom Object definition

Go to the **Settings**, and then to **Custom Objects**. After that, click the **New**button to create a new definition.

The value entered in the field **Name (Plural)** will be displayed as a new tab on the profile of all contacts, representing a list of linked objects.\
For a Custom Object to be available in the instance, you must check the option **Published**.

If you want to allow automatic creation of these objects via chatbots, automations, integrated webhooks, or through the contacts page itself, also enable the option **Allow dynamic creation of objects**.

<figure><img src="https://684109703-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9FzUKkagBNy5uQ7AtGNa%2Fuploads%2Fk03dxg0xH1bIhReiGQBi%2Fimage.png?alt=media&#x26;token=82d48fdf-165d-4ed7-b738-e74a927d8cc6" alt=""><figcaption><p><em>Settings Menu.</em></p></figcaption></figure>

<figure><img src="https://684109703-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9FzUKkagBNy5uQ7AtGNa%2Fuploads%2Fsh02mxyOlDO5mFFUfQrc%2Fimage.png?alt=media&#x26;token=f4d68f98-e5ae-4159-b318-5e9e0284c3ca" alt=""><figcaption><p><em>Definitions list.</em></p></figcaption></figure>

<figure><img src="https://684109703-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9FzUKkagBNy5uQ7AtGNa%2Fuploads%2FqtgEUD0WzRmvjvtL2y9r%2Fimage.png?alt=media&#x26;token=6951e1d0-cdfa-4d30-9600-043c663cbbf8" alt=""><figcaption><p><em>Edit Definition screen.</em></p></figcaption></figure>

## Field Settings

When creating a new field for a Custom Object definition, you must select the **data type**, such as *Text*, *Number*, *Date*, among others — as listed in the image below.

Each field can have some additional settings:

* **Required:** Requires the field to be filled in when creating or editing the custom object.
* **Unique Identifier:** Defines whether the field value will be unique for each object, functioning as a unique identifier (useful for cases like order IDs, protocol codes, etc.).
* **Default Value:** Value that will be automatically filled in when creating a new object, and can be changed manually if necessary.
* **Alias:** Defines how the field will be referenced in other parts of the system, such as when using *tokens*. See more about custom object tokens.

<figure><img src="https://684109703-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9FzUKkagBNy5uQ7AtGNa%2Fuploads%2FmeACfu9lQu69TIwkTKNL%2Fimage.png?alt=media&#x26;token=028f085a-2a9a-4be5-9a49-b1e4d374021f" alt=""><figcaption><p><em>List of field types.</em></p></figcaption></figure>

<figure><img src="https://684109703-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9FzUKkagBNy5uQ7AtGNa%2Fuploads%2Ft4lDHjQzAgbHo405P10p%2Fimage.png?alt=media&#x26;token=06805c80-ee53-49a7-87fd-96bf09d1c42d" alt=""><figcaption><p><em>Field edit screen.</em></p></figcaption></figure>

## Filling a Object Manually

When accessing a lead's full data, you will be able to view the **Event Participations**tab, where the custom objects associated with it are listed.

You can **link an existing custom object** to a lead — ideal, for example, in cases of fixed subscription plans, where you just need to link to the lead without creating a new object from scratch.\
However, in this example, we will choose to create a new custom object.

Once created, the object will automatically appear in the lead's **Event Participations** tab.\
These data can be used in **tokens** (for message personalizations, for example) or queried via **automations**, as needed.

<figure><img src="https://684109703-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9FzUKkagBNy5uQ7AtGNa%2Fuploads%2FYNIJmIiImVUCyr70vWCF%2Fimage.png?alt=media&#x26;token=469bd4b1-9a3f-447e-8623-c862ed5f196f" alt=""><figcaption><p><em>Contact full data.</em></p></figcaption></figure>

<figure><img src="https://684109703-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9FzUKkagBNy5uQ7AtGNa%2Fuploads%2FJmwmdEJ0eoqlyyNMjoAQ%2Fimage.png?alt=media&#x26;token=d92ad282-ff66-4231-8f46-15467993fb9f" alt=""><figcaption><p><em>Filling an object.</em></p></figcaption></figure>

<figure><img src="https://684109703-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9FzUKkagBNy5uQ7AtGNa%2Fuploads%2Fg5rK3A7LmnNEexu8oON0%2Fimage.png?alt=media&#x26;token=70fa9346-fd82-45ec-ae1e-386de2b704a6" alt=""><figcaption><p><em>Event registered.</em></p></figcaption></figure>
