# Data tables

Unlike the Knowledge Base, which handles less structured and context-heavy content, Data Tables are ideal for organized, formatted data where accuracy is crucial.

<figure><img src="https://1213579860-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MaU7JJyoXT5PfhTD9dJ%2Fuploads%2FMvsSGDTbOwMORbNLWiGk%2Fhub-assistant-virbe.virbe.app_dashboard_data-tables_0d84a2b6-b506-4908-a0d4-5f7f08d45a4d_page%3D1%26search%3D%26sort%3D%255B%255D%20(2).png?alt=media&#x26;token=333b2228-0ab7-48d7-9cc3-362c5fef6829" alt=""><figcaption><p>Example of a table</p></figcaption></figure>

### Overview

Data Tables enable you to:

* Store structured information in a tabular format
* Ensure accurate data retrieval
* Generate visual cards during conversations
* Filter and query specific information

### Data Types

Data Tables support various types of content:

<figure><img src="https://1213579860-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MaU7JJyoXT5PfhTD9dJ%2Fuploads%2FSXmDyW9C51azf4l1lqCJ%2Fimage.png?alt=media&#x26;token=74a37c3d-2093-43c2-9bd1-e542a2199b88" alt=""><figcaption><p>Selecting data type for a column</p></figcaption></figure>

{% hint style="warning" %}
Note that a column's data type can only be assigned upon creation, it cannot be changed later on.
{% endhint %}

#### Basic Types

* String: Text content
* Number: Numerical values
* Boolean: True/false values
* Date: Calendar dates
* DateTime: Dates with time information

#### Rich Content Types

* Image: Visual content
* JSON: Structured data objects
* Code: Programming code snippets

### Working with Tables

#### Creating Tables

1. Navigate to Data Tables section
2. Click "Add table"
3. Define table structure:
   * Add columns
   * Specify data types
   * Add descriptions (optional)

#### Adding Columns

Each column requires:

* Column name
* Data type selection
* Optional description for clarity

#### Managing Records

* Add records individually
* Edit existing records
* Delete outdated information

### Using Data Tables in Conversations

#### Data Retrieval

Data Tables excel in scenarios requiring precise information:

* Product specifications
* Pricing information
* Service details
* Configuration data

#### Filtering and Queries

In Conversation Flows, you can:

* Filter records based on specific criteria
* Search for exact matches
* Compare numerical values
* Check date ranges

#### Visual Cards

Data Tables can generate visual cards during conversations:

* Present structured information clearly
* Show product details
* Display different options in a visual manner

### Best Practices

#### Table Structure

* Use clear, consistent column names
* Choose appropriate data types (cannot be changed after the column is created)
* Add descriptions for complex fields
* Keep table structure simple and focused

#### Data Management

* Regular updates to maintain accuracy
* Archive outdated information
* Validate data during entry
* Monitor table size and performance

#### Integration Tips

* Use tables for factual, structured data
* Combine with Knowledge Base for comprehensive responses
* Design tables with conversation flow needs in mind

### Example Use Cases

#### Product Catalog

The Product Catalog use case is ideal for e-commerce and retail applications where your virtual being needs to access accurate product information.

```
Columns:
- Product ID (String)
- Name (String)
- Price (Number)
- Image (Image)
- Specifications (JSON)
```

This structure enables your virtual being to:

* Present products with consistent information
* Show visual product representations in cards
* Answer detailed questions about specifications
* Provide accurate pricing information
* Filter and sort products based on attributes

#### Service Pricing

Perfect for subscription-based services or tiered pricing models where accurate pricing and feature information is crucial.

```
Columns:
- Plan Name (String)
- Price (Number)
- Features (JSON)
- Availability (Boolean)
```

This structure allows your virtual being to:

* Compare different service tiers
* Present accurate pricing information
* Detail included features per plan
* Show only currently available options
* Create visual pricing comparison cards

#### Configuration Settings

Ideal for managing system settings, preferences, or any time-sensitive configuration data that needs tracking.

```
Columns:
- Setting Name (String)
- Value (String)
- Last Updated (DateTime)
- Status (Boolean)
```

This structure helps your virtual being:

* Provide accurate system settings information
* Track configuration changes over time
* Verify setting validity before use
* Manage feature toggles and states

{% hint style="info" %}
Remember that Data Tables are best used for structured, factual information where accuracy is crucial. For more narrative or context-heavy content, consider using the Knowledge Base instead.
{% endhint %}
