Draft Documentation

This guide is currently in development. Content may be incomplete or subject to change.

~12 minutes

Campaign Database

Learn how to create and manage persistent databases for your campaigns. Store customer data, enable lookups during calls, and track record versions over time.

What is a Campaign Database?

A Campaign Database is a persistent data store associated with a campaign. Unlike datasets (which are used for single execution runs), databases persist across multiple executions and can be updated over time with new data.

FeatureDatabaseDataset
PersistencePermanent (until deleted)Per execution
UpdatesCan be updated anytimeImmutable after upload
VersioningFull version historyNo versioning
Use CaseCustomer data, lookups, authContact lists for outreach
Unique KeysRequired (single or composite)Phone number only

Common Use Cases

Customer Authentication

Validate caller identity by matching RUT, name, or other identifiers during voice calls.

Data Lookups

Retrieve customer information during conversations to personalize responses.

Data Enrichment

Match dataset rows with database records to enrich contact data before execution.

Audit Trail

Track changes to customer data over time with full version history.

Creating a Database

To create a campaign database, you'll upload an Excel file that defines the initial schema and data. The system automatically detects column types.

Steps:

  1. Open your campaign and navigate to the Database tab
  2. Click "Upload Database"
  3. Select an Excel file (.xlsx) from your computer
  4. Review the auto-detected schema
  5. Configure unique identifier column(s)
  6. Click "Create Database"
Database tab in campaign with upload button

Tip: Use descriptive column headers in your Excel file. These become the field names in your database and are used for lookups and matching.

Schema Management

The database schema defines the structure of your data. Each column has a type that determines how data is stored, validated, and displayed.

Column Types

String

Free-form text

Number

Numeric values

Phone

Phone numbers (validated)

Email

Email addresses (validated)

RUT

Chilean RUT (validated)

Date

Date values

Boolean

True/False values

Currency

Monetary amounts

Schema configuration with column types

Unique Identifier Configuration

Every database requires at least one unique identifier column. This is used to:

  • Identify records for updates (upserts)
  • Match records during lookups
  • Prevent duplicate entries

Single Key

One column uniquely identifies each record (e.g., RUT, customer_id, email).

Composite Key

Multiple columns together form the unique identifier (e.g., RUT + policy_number).

Important: Once a database is created, the key columns cannot be changed. Choose your identifiers carefully based on your data requirements.

Importing Data

After creating a database, you can import additional data at any time. The system supports multiple import modes to handle different update scenarios.

Import Modes

AddOrUpdate

Recommended

Inserts new records and updates existing ones based on the unique key. Existing records not in the import file are preserved.

ReplaceAll

Deletes all existing records and replaces with the imported data. Use with caution - this is destructive.

AddOnly

Only inserts new records. Existing records are skipped (not updated).

UpdateOnly

Only updates existing records. New records in the file are ignored.

Import mode selection dialog

Schema Change Detection

When importing data with different columns than the existing schema, the system detects the changes and asks for confirmation:

  • New columns: Can be added after user confirmation
  • Missing key columns: Import is blocked - keys are required
  • Type mismatches: Warning shown, data may be converted
Schema change detection warning

Import Progress

Large imports are processed in batches. You can monitor progress in real-time:

Import progress tracking

Record Versioning

Every time a record is updated, a new version is created. This provides a complete audit trail of all changes to your data.

How Versioning Works

  1. Initial import creates Version 1 of each record
  2. Each update (via import or API) creates a new version
  3. Previous versions are retained and queryable
  4. The "current" version is always used for lookups

Viewing Version History

Click on any record to view its complete version history:

Record version history modal

Tip: Version history is useful for auditing and compliance. You can see exactly when data changed and what the previous values were.

Querying Records

The database interface provides tools to search, filter, and export your data.

Search and Filter

  • Quick search: Search across all text columns
  • Column filters: Filter by specific column values
  • Pagination: Navigate through large datasets
  • Sorting: Sort by any column
Records grid with search and filters

Exporting Data

Export your database to Excel at any time:

  • Full export: All records and columns
  • Filtered export: Only records matching current filters
  • Selected columns: Choose which columns to include

Database-Dataset Integration

When uploading a dataset, you can configure matching with your campaign database to enrich contact data automatically.

Matching Options

Match by Key Column

Specify which dataset column should match the database key. For example, match dataset "rut" column to database "RUT" key.

Match by Phone Number

If your database has a phone column, match using the dataset's phone number.

Data Prefix Configuration

To avoid column name conflicts, database fields are prefixed when merged with dataset rows:

// Example: Database fields with "db_" prefix
{
  "phone": "+56912345678",      // Dataset field
  "name": "Juan",               // Dataset field
  "db_balance": 150000,         // Database field
  "db_last_payment": "2024-01"  // Database field
}

Tip: Use these prefixed field names in your flow variables and message templates to access database data during execution.