# Creating Tables

Creating a new Table in Zaia Endless is fast and intuitive.\
Each Table can be customized with specific columns, types, and semantic capabilities depending on your operational needs.

***

### 🪄 Step 1 — Create a New Table

1. Navigate to **Builder → Tables**.
2. Click **Create new table +** in the top-right corner.
3. Enter the following details:
   * **Name** — the Table identifier (e.g. *Unanswered Questions*, *Feedbacks*, *Contacts*).
   * **Description** *(optional)* — for internal use, describing the purpose of this Table.

Click **Create Table** to finish.

***

### 📋 Step 2 — Add Columns

Columns define the structure and behavior of your Table.\
They determine what type of data each record will hold and how the Agent will interpret it.

#### ➕ To add a column:

1. Open your Table.
2. Click **Add Column +**.
3. Configure the following fields:

| Field                      | Description                                                                                                                                                     |
| -------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Name**                   | The column name. Each must be unique within the Table.                                                                                                          |
| **Description**            | Clearly describe what the column represents — the Agent uses this to interpret and interact with data correctly.                                                |
| **Type**                   | Choose one of the supported field types (`string`, `boolean`, or `number`).                                                                                     |
| **Enable Semantic Search** | When enabled, allows the Agent to query this column based on meaning and context, not just exact text matches. Recommended for descriptive or free-text fields. |

Click **Add Column** to save.

> 🧠 **Tip:** Write clear and specific descriptions — the Agent reads them to infer intent and understand how to use the data.

***

### 🔧 Supported Column Types

Zaia Endless currently supports three data types for Table columns:

| Type        | Description                                                                          | Example                                                       |
| ----------- | ------------------------------------------------------------------------------------ | ------------------------------------------------------------- |
| **string**  | Textual information, such as names, messages, or identifiers.                        | `"John Doe"`, `"user_123"`, `"Asked about campaign creation"` |
| **boolean** | Logical values representing `true` or `false`. Ideal for flags or conditional logic. | `true`, `false`                                               |
| **number**  | Numeric data, such as counters, scores, or ratings.                                  | `42`, `3.14`                                                  |

> ⚙️ **Best practice:**\
> Use `string` for most descriptive text fields, and enable **semantic search** for fields where Agents need to interpret meaning — e.g. questions, feedbacks, or messages.

***

### 🧱 Step 3 — Add and Edit Rows

Rows represent the actual data stored inside the Table.\
You can manually add rows or have them created dynamically by Agents or Workflows.

#### ➕ To add a row:

* Click **Add row +** and fill in each column’s value.

#### ✏️ To edit a row:

* Hover over a record, click the **⋮ (Edit)** icon, and modify as needed.

Example — Table **Unanswered Questions**:

| chatId                                 | Name | Question                                                     |
| -------------------------------------- | ---- | ------------------------------------------------------------ |
| `5edca67d-dd2d-41e4-b7c0-23e4858f05e6` | —    | “User asked if it’s possible to create proactive campaigns…” |

***

### 🧩 Step 4 — Update or Delete Tables

You can modify a Table’s metadata at any time:

* Click the **✏️ Edit** button to update the name or description.
* Click the **⋮ menu** to rearrange or delete a Table.

> ⚠️ **Warning:**\
> Deleting a Table permanently removes all its data — this action cannot be undone.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.zaia.app/tables/creating-tables.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
