# Data Model

Spara automatically captures and organizes data about every lead that interacts with your agents. This data powers personalization, workflow triggers, conditions, and analytics across the platform.

## How It Works

Every piece of lead data is stored as a **field**. Fields are organized into categories and can come from multiple sources:

* **Automatically captured** — Spara collects data from website visits, chat conversations, email interactions, phone calls, and calendar events without any setup.
* **Gathered by agents** — Your Chat, Email, Voice, and Text agents can be configured to ask leads for specific information (like job title or company size) during conversations.
* **Synced from your CRM** — Fields from Salesforce, HubSpot, or Marketo are automatically synced and available alongside Spara-native data.
* **Extracted by workflows** — [api](https://docs.spara.com/agents/workflows/api "mention") and [prompt](https://docs.spara.com/agents/workflows/prompt "mention") workflow steps can extract new data from external services or AI responses and save it to the lead profile.

### Custom Fields

Any Spara agent can gather custom fields during a conversation. For example, you could configure a Chat agent to ask "What's your biggest challenge right now?" and save the response as a custom field called `biggest_challenge`. Custom fields appear alongside built-in fields everywhere in the platform — in workflows, personalization, analytics, and CRM syncs.

## Field Reference

### Lead Info

| Field                           | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| ------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| First name `String`             | Lead's first name                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| Last name `String`              | Lead's last name                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| Full name `String`              | First and last name combined                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
| Email `String`                  | Lead's email address                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| Phone number `String`           | Lead's phone number                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| Job title `String`              | Lead's job title or role                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |
| Lead source `Picklist`          | <p>How this lead was created in Spara.<br><strong>Spara</strong> — created via Chat or Voice agents<br><strong>Salesforce</strong> — synced from Salesforce CRM<br><strong>HubSpot</strong> — synced from HubSpot CRM<br><strong>Marketo</strong> — synced from Marketo CRM<br><strong>Leads API</strong> — created via the Leads API<br><strong>Deanonymized</strong> — identified via IP/behavioral matching</p>                                                                                                                                                   |
| Lead stage `Picklist`           | <p>Current stage in the sales funnel, calculated from lead activity.<br><strong>Browsing</strong> — visiting pages but hasn't engaged<br><strong>Engaged</strong> — has sent at least one message or made a call<br><strong>Email Captured</strong> — email address has been collected<br><strong>Webform Submitted</strong> — submitted a webform<br><strong>Calendar Shown</strong> — was shown a scheduling calendar<br><strong>Call Scheduled</strong> — has a meeting booked<br><strong>Synced from CRM</strong> — imported from CRM with no local activity</p> |
| Lead created at `Timestamp`     | Timestamp when the lead was first created                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
| Conversation summary `String`   | AI-generated summary of the lead's conversation history                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| Conversation interests `List`   | Lead's interests identified from conversations                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| Conversation pain points `List` | Pain points identified from conversations                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |

### Account Info

| Field                    | Description                               |
| ------------------------ | ----------------------------------------- |
| Company name `String`    | Name of the lead's company                |
| Employee count `Integer` | Number of employees at the lead's company |

### Website Activity

| Field                          | Description                                      |
| ------------------------------ | ------------------------------------------------ |
| Current URL `String`           | Page the lead is currently viewing               |
| Initial URL `String`           | First page visited by the lead                   |
| Last page visited `String`     | Most recently visited page URL                   |
| Pages visited `List`           | List of unique URLs visited, most recent first   |
| Website visited at `Timestamp` | Timestamp of the lead's most recent page visit   |
| Referrer `String`              | External site or page the lead came from         |
| IP country `String`            | 2-letter country code from the lead's IP address |
| IP country name `String`       | Full country name from the lead's IP address     |
| IP region `String`             | State or region from the lead's IP address       |
| IP city `String`               | Approximate city from the lead's IP address      |

### Chat Activity

| Field                               | Description                                       |
| ----------------------------------- | ------------------------------------------------- |
| Conversation started at `Timestamp` | Timestamp when the lead first started a chat      |
| Opened chat `Boolean`               | Whether the lead has opened the chat widget       |
| Sent chat message `Boolean`         | Whether the lead has sent at least one message    |
| Chat dropoff at `Timestamp`         | Timestamp when the lead last engaged in chat      |
| Prospect message count `Integer`    | Total messages sent by the lead                   |
| Engaged channels `List`             | Which Spara channels the lead has interacted with |

### Email Activity

| Field                              | Description                                                                                                                                                                                            |
| ---------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| Email opened at `Timestamp`        | Timestamp when the lead opened an email                                                                                                                                                                |
| Email link clicked at `Timestamp`  | Timestamp when the lead clicked a link in an email                                                                                                                                                     |
| Last email sent at `Timestamp`     | Timestamp of the most recent email sent to the lead                                                                                                                                                    |
| Email validation status `Picklist` | <p>Result of email address validation.<br><strong>Valid</strong> — address is deliverable<br><strong>Invalid</strong> — address is not deliverable<br><strong>Unknown</strong> — not yet validated</p> |
| Unsubscribed at `Timestamp`        | Timestamp when the lead unsubscribed from emails                                                                                                                                                       |

### Phone Activity

| Field                                                  | Description                                    |
| ------------------------------------------------------ | ---------------------------------------------- |
| Most recent outgoing call — cold transferred `Boolean` | Whether the call was cold transferred to a rep |
| Most recent outgoing call — warm transferred `Boolean` | Whether the call was warm transferred to a rep |
| Most recent outgoing call — booked call `Boolean`      | Whether the call resulted in a booked meeting  |
| Most recent outgoing call — left message `Boolean`     | Whether a voicemail was left                   |
| Most recent outgoing call — do not call `Boolean`      | Whether the lead requested not to be called    |
| Most recent outgoing call — no answer `Boolean`        | Whether the call went unanswered               |
| Call pick up `Boolean`                                 | Whether the lead answered the most recent call |
| Incoming call ended at `Timestamp`                     | Timestamp when the last incoming call ended    |
| Outgoing call ended at `Timestamp`                     | Timestamp when the last outgoing call ended    |

### Meeting Activity

| Field                         | Description                                   |
| ----------------------------- | --------------------------------------------- |
| Call scheduled `Boolean`      | Whether a meeting has been scheduled          |
| Call scheduled at `Timestamp` | Timestamp of the upcoming scheduled meeting   |
| Calendar shown `Boolean`      | Whether a calendar has been shown to the lead |

### Sign Up Info

| Field                       | Description                              |
| --------------------------- | ---------------------------------------- |
| Webform submitted `Boolean` | Whether the lead has submitted a webform |

### Spara Questions

| Field                      | Description                                                                                                                                                                                                                                                                                                                                                  |
| -------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| Call interest `Picklist`   | <p>Type of conversation the lead expressed interest in.<br><strong>Talk to sales</strong> — wants to speak with a sales rep<br><strong>Talk to support</strong> — has a support or technical issue<br><strong>Product demo</strong> — interested in seeing a product demo<br><strong>Unspecified</strong> — expressed intent to talk but type is unclear</p> |
| Support interest `Boolean` | Whether the lead has a support issue                                                                                                                                                                                                                                                                                                                         |

These are default fields. Any question your agent asks can create additional custom fields in this category.

### Advertising & Tracking

| Field                 | Description                                        |
| --------------------- | -------------------------------------------------- |
| UTM campaign `String` | UTM campaign parameter from the lead's URL         |
| GCLID `String`        | Google Click Identifier for Google Ads attribution |

### Time & Date

| Field                               | Description                    |
| ----------------------------------- | ------------------------------ |
| Current time (UTC hour) `Integer`   | Current hour in UTC            |
| Current time (UTC minute) `Integer` | Current minute in UTC          |
| Current time (UTC weekday) `String` | Current day of the week in UTC |
| Current timestamp (UTC) `Timestamp` | Full current timestamp in UTC  |

### CRM Fields

Any field synced from Salesforce, HubSpot, or Marketo appears alongside Spara-native fields. These are available in all the same places — workflow triggers, conditions, personalization, and analytics.

See [crm-integrations](https://docs.spara.com/integrations/crm-integrations "mention") for setup instructions.

## FAQ

### Where can I use these fields?

Everywhere in Spara. Fields are available in workflow triggers and conditions, email and text message personalization, agent instructions, API request bodies, and analytics filters. See the [https://docs.spara.com/guides/how-to-use-sparas-text-editor](https://docs.spara.com/guides/how-to-use-sparas-text-editor "mention") for how to insert fields into text.

### How do I create custom fields?

Configure any Spara agent to gather information during conversations. For example, add "Ask the lead about their timeline" to your Chat agent's instructions and map the response to a custom field called `timeline`. Custom fields are immediately available across the platform.

### What happens when a field has no value?

If a field hasn't been captured for a lead, it renders as empty when used in personalization (e.g., `{{ first_name }}` becomes blank). Use [condition](https://docs.spara.com/agents/workflows/condition "mention") steps in workflows to check whether a field has a value before acting on it.
