> ## Documentation Index
> Fetch the complete documentation index at: https://docs.usehatchapp.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Bulk Export Schema Overview

> Column-level definitions for the contact_history and conversation_items datasets.

## contact\_history fields

| Field                 | Description                                                                                             |
| --------------------- | ------------------------------------------------------------------------------------------------------- |
| `organization_id`     | Organization ID tied to the record.                                                                     |
| `organization_name`   | Friendly organization name.                                                                             |
| `workspace_id`        | Unique workspace identifier.                                                                            |
| `workspace_name`      | Workspace name.                                                                                         |
| `contact_history_id`  | Unique Identifier.                                                                                      |
| `campaign_id`         | Campaign identifier in Hatch.                                                                           |
| `campaign_name`       | Campaign name.                                                                                          |
| `current_lead_source` | Source assigned to the contact (e.g., `integration:salesforce`).                                        |
| `hatch_contact_id`    | Unique contact ID from Hatch.                                                                           |
| `contact_status`      | Field definitions below. Campaign engagement status (`In Progress`, `No Reply`, `Replied`, `Canceled`). |
| `campaign_stage`      | Current stage of the campaign workflow.                                                                 |
| `sales_value`         | Sales amount associated with the contact (if provided).                                                 |
| `opted_out`           | Boolean flag showing whether the contact opted out.                                                     |
| `email`               | Contact email.                                                                                          |
| `phone`               | Contact phone number.                                                                                   |
| `updated_at`          | Timestamp when the record was last updated.                                                             |
| `external_contact_id` | CRM-based customer or contact id from integrated CRM/lead source. (See Below)                           |
| `appointment_id`      | CRM-based appointment ID from integrated sources. (See Below)                                           |
| `invoice_id`          | CRM-based invoice/estimate/sale ID from integrated sources. (See Below)                                 |

<AccordionGroup>
  <Accordion title="Configuration for integrated CRM IDs">
    <p> **We are rolling these out integration by integration, so they may be null for now.** The API passess through <code>appointment\_id</code>, <code>invoice\_id</code>, and <code>external\_contact\_id</code> values directly from CRMs & lead sources integrated with Hatch. </p>

    <ul>
      <li><b>Appointment ID</b>: The field that gets passed through, will be configured through the [Reporting Settings](https://docs.usehatchapp.com/getting-started/reporting/hatch-reporting), under Appointments.</li>
      <li><b>Invoice ID</b>: The field that gets passed through, will be configured through the [Reporting Settings](https://docs.usehatchapp.com/getting-started/reporting/hatch-reporting), under Sales.</li>
      <li><b>External Contact ID</b>: This field is not configurable, and based on Hatch's own internal CRM mapping.</li>
    </ul>
  </Accordion>
</AccordionGroup>

<AccordionGroup>
  <Accordion title="Contact status definitions">
    <p>Hatch calculates <code>contact\_status</code> values as campaigns progress. Use these labels to group performance inside your BI tools:</p>

    <ul>
      <li><b>In Progress</b>: The contact is actively moving through automated steps and can still receive follow-ups.</li>
      <li><b>No Reply</b>: Automation completed without a response from the contact.</li>
      <li><b>Replied</b>: The contact responded, so the automation ended and the conversation moved to your team.</li>
      <li><b>Canceled</b>: The contact was removed manually or due to rules (invalid info, opt-out, competing campaign, etc.).</li>
    </ul>
  </Accordion>
</AccordionGroup>

## conversation\_items fields

| Field                 | Description                                                                                     |
| --------------------- | ----------------------------------------------------------------------------------------------- |
| `organization_id`     | Organization ID tied to the conversation.                                                       |
| `organization_name`   | Organization name.                                                                              |
| `workspace_id`        | Workspace ID.                                                                                   |
| `workspace_name`      | Workspace name.                                                                                 |
| `id`                  | Unique identifier for the message.                                                              |
| `conversation_id`     | Conversation identifier.                                                                        |
| `contact_id`          | Contact identifier for the participant.                                                         |
| `actor_type`          | Who sent the message (`contact`, `hatch_user`, automated agent, etc.).                          |
| `actor_id`            | Unique ID for the actor (user/contact/bot).                                                     |
| `category`            | Message category (e.g., `sms`, `email`, `call`).                                                |
| `type`                | Message payload type (text, voicemail drop, etc.).                                              |
| `direction`           | Inbound vs. outbound.                                                                           |
| `body`                | Message body text (if applicable).                                                              |
| `delivery_status`     | Latest delivery status from the provider.                                                       |
| `status_history`      | Serialized status change history for troubleshooting delivery failures.                         |
| `chatbot_disposition` | The disposition a chatbot applied to the overall conversation (same for each conversation item) |
| `send_at`             | Scheduled send time for delayed/scheduled messages.                                             |
| `is_scheduled`        | Indicates whether the item was scheduled.                                                       |
| `provider_name`       | External provider handling delivery (e.g., Twilio).                                             |
| `provider_message_id` | Provider-specific identifier for the message.                                                   |
| `mongo_id`            | Unique database source identifier.                                                              |
| `updated_at`          | Timestamp when the message item was last updated.                                               |

<CardGroup cols={1}>
  <Card title="Bulk Export API Overview" href="/integrations/hatch-api/bulk-export/overview" />
</CardGroup>
