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

# DataCrazy as a data source

> Bring leads, deals, activities, pipelines, conversations and messages from the DataCrazy CRM to Nekt.

DataCrazy is a Brazilian CRM with a built-in multi-attendance inbox for WhatsApp, Instagram and other channels. This connector reads your DataCrazy account through its public API and brings your leads and deals with their custom fields, activities, pipelines and stages, the CRM catalogs (tags, lists, products, loss reasons, attendants), your connections, and your conversations with their messages.

> [!NOTE]
>
> The connector only reads data. It never creates, changes or deletes anything in DataCrazy.

## Configuring DataCrazy as a Source

In the [Sources](https://app.nekt.ai/sources) tab, click on the "Add source" button located on the top right of your screen. Then, select the DataCrazy option from the list of connectors.

Click **Next** and you'll be prompted to add your access.

### 1. Add account access

The connector signs in with a DataCrazy **API key**. In DataCrazy, go to **Configurações > Chaves de API** (or open [crm.datacrazy.io/config/api](https://crm.datacrazy.io/config/api)), click **Criar nova chave**, give the key a name (for example, "Nekt") and, if you want, an expiration date. Copy the key right away: DataCrazy shows it only once.

> [!WARNING]
>
> API access requires the DataCrazy **Essential** plan or higher. DataCrazy allows 60 requests per minute for each API route, and 20 per minute for conversations. Create a key used only by Nekt, so that other integrations don't slow down your syncs (or the other way around).

The following configurations are available:

* **API Token**: The DataCrazy API key.
* **Start Date**: Earliest activity read on the first sync (and on a full sync) by the incremental tables: **Conversation Messages** reads the conversations with messages since this date, and **Lead History** and **Lead Notes** the leads with activity since this date. Leads, deals, activities, conversations and the catalogs are always read in full. A recent date keeps the first sync short.
* **API URL** (advanced, optional): Address of the DataCrazy API. Leave the default (`https://api.g1.datacrazy.io`) unless DataCrazy support gave your account another address.

Once you're done, click **Next**.

### 2. Select streams

Choose which data streams you want to sync. For faster extractions, select only the streams that are relevant to your analysis. You can select entire groups of streams or pick specific ones.

> Tip: The stream can be found more easily by typing its name.

Select the streams and click **Next**.

### 3. Configure data streams

Customize how you want your data to appear in your catalog. Select the desired layer where the data will be placed, a folder to organize it inside the layer, a name for each table (which will effectively contain the fetched data) and the type of sync.

* **Layer**: choose between the existing layers on your catalog. This is where you will find your new extracted tables as the extraction runs successfully.
* **Folder**: a folder can be created inside the selected layer to group all tables being created from this new data source.
* **Table name**: we suggest a name, but feel free to customize it. You have the option to add a **prefix** to all tables at once and make this process faster!
* **Sync Type**: you can choose between INCREMENTAL and FULL\_TABLE.
  * Incremental: every time the extraction happens, we'll get only the new data, which is good if, for example, you want to keep every record ever fetched.
  * Full table: every time the extraction happens, we'll get the current state of the data, which is good if, for example, you don't want to have deleted data in your catalog.

Once you are done configuring, click **Next**.

### 4. Configure data source

Describe your data source for easy identification within your organization, not exceeding 140 characters.

To define your [Trigger](https://docs.nekt.com/runs/scheduling-and-triggers.md), consider how often you want data to be extracted from this source. This decision usually depends on how frequently you need the new table data updated (every day, once a week, or only at specific times).

> [!WARNING]
>
> Do not schedule an **Additional Full Sync** for this source, and avoid running a full sync of **Conversation Messages**: DataCrazy only returns the most recent messages of each conversation, so a full sync replaces the messages kept from earlier syncs with what can be read now. Leads, deals and the other full table streams are already read in full on every sync.

Once you are ready, click **Next** to finalize the setup.

### 5. Check your new source

You can view your new source on the [Sources](https://app.nekt.ai/sources) page. If needed, manually trigger the source extraction by clicking on the arrow button. Once executed, your data will appear in your Catalog.

> [!WARNING]
>
> For you to be able to see it on your [Catalog](https://app.nekt.ai/catalog), you need at least one successful source run.

> [!NOTE]
>
> **Lead History** and **Lead Notes** are read one lead at a time, so they are **not selected by default**, and they are **best-effort**: each sync reads them only for leads with recent activity, so a note added to a lead that had no other change is only picked up when that lead or one of its deals changes (see the implementation notes). The first sync reads every lead active since the **Start Date**, about 48 leads per minute.

> [!NOTE]
>
> The first sync of **Conversation Messages**, **Lead History** and **Lead Notes** reads everything active since the **Start Date** in one go, so a recent date keeps it short. Later syncs spend at most about two and a half hours on these tables, oldest activity first; if that is not enough (for example, after the source was paused for a long time), the sync still succeeds, says how many conversations or leads are left, and the next syncs continue right after the last one read.

# Streams and Fields

## Available streams

The table below lists every stream, its **slug** (the exact identifier to pass when creating the source via API) and a short description.

| Stream | Slug | Description |
| - | - | - |
| Leads | `leads` | Leads (contacts and companies) with tags, lists, addresses, purchase metrics and custom fields. |
| Deals (Businesses) | `businesses` | Deals with stage, lead, attendant, status, values, products and custom fields. |
| Activities | `activities` | Scheduled activities with their lead, deal, attendant and type. |
| Pipelines | `pipelines` | Sales pipelines (funnels). |
| Pipeline Stages | `pipeline_stages` | Stages of each pipeline. |
| Tags | `tags` | Tags of the account. |
| Lists | `lists` | Lead lists. |
| Products | `products` | Product catalog. |
| Business Loss Reasons | `business_loss_reasons` | Reasons a deal can be lost. |
| Attendants (CRM) | `attendants_crm` | Users of the CRM. |
| Lead History | `lead_history` | *Not selected by default.* Timeline of each lead. |
| Lead Notes | `lead_notes` | *Not selected by default.* Comments written on each lead. |
| Connections (Instances) | `instances` | Channels connected to the account (WhatsApp, Instagram...). |
| Attendants (Multiatendimento) | `attendants_multi` | Users who answer conversations. |
| Conversations | `conversations` | Conversations of the multi-attendance inbox. |
| Conversation Messages | `conversation_messages` | Messages of each conversation. |

## Fields by stream

### CRM

> [accordion] Leads
>
> Leads (contacts and companies) of the CRM, with their tags, lists, addresses, channel contacts, purchase metrics and custom fields.
>
> Table: `leads` · Primary key: `id` · Sync: Full table
>
> | Field | Type | Description |
> | :- | :- | :- |
> | `id` | String | Unique identifier of the lead. |
> | `created_at` | Datetime | When the lead was created. |
> | `updated_at` | Datetime | When the lead was last updated (when DataCrazy sends it). |
> | `name` | String | Name of the lead. |
> | `display_name` | String | Display name of the lead. |
> | `type` | String | Lead type: PERSON or COMPANY. |
> | `image` | String | URL of the lead's picture. |
> | `phone` | String | Phone number of the lead (normalized). |
> | `raw_phone` | String | Phone number of the lead as entered. |
> | `email` | String | Email address of the lead. |
> | `source` | String | Origin of the lead (for example Google Ads). |
> | `company` | String | Company the lead works for. |
> | `birth_date` | Datetime | Birth date of the lead. |
> | `tax_id` | String | Tax identifier of the lead (CPF/CNPJ). |
> | `site` | String | Website of the lead. |
> | `instagram` | String | Instagram profile of the lead. |
> | `sector` | String | Sector of the lead. |
> | `role` | String | Job title of the lead. |
> | `notes` | String | Free-text observations stored on the lead. |
> | `rating` | Number | Rating of the lead (when DataCrazy sends it). |
> | `parent_id` | String | Parent lead (company) of this lead. |
> | `primary_contact_lead_id` | String | Lead that is the primary contact of this company lead. |
> | `attendant_id` | String | Attendant (user) responsible for the lead. |
> | `attendant_name` | String | Name of the attendant responsible for the lead. |
> | `purchase_count` | Integer | Number of purchases (won deals) of the lead. |
> | `last_purchase_date` | Datetime | Date of the lead's last purchase. |
> | `average_ticket` | Number | Average value of the lead's purchases. |
> | `total_spent` | Number | Total value of the lead's purchases. |
> | `open_businesses_count` | Integer | Number of open deals of the lead. |
> | `lost_businesses_count` | Integer | Number of lost deals of the lead. |
> | `lost_businesses_total_value` | Number | Total value of the lead's lost deals. |
> | `purchase_frequency` | Number | Purchase frequency of the lead. |
> | `address` | String (JSON) | Main address of the lead. |
> | `addresses` | String (JSON) | Every address of the lead. |
> | `tags` | String (JSON) | Tags applied to the lead. |
> | `lists` | String (JSON) | Lists the lead belongs to. |
> | `contacts` | String (JSON) | Channel contacts of the lead (WhatsApp, Instagram...). |
> | `metrics` | String (JSON) | Purchase metrics of the lead, as sent by DataCrazy. |
> | `attendant` | String (JSON) | Attendant responsible for the lead. |
> | `source_referral` | String (JSON) | Ad referral that brought the lead (source id, URL, click-to-WhatsApp id). |
> | `additional_fields` | String (JSON) | Custom (additional) fields of the lead and their values. |
> | `primary_contact` | String (JSON) | Primary contact of this company lead. |
> | `primary_contact_for` | String (JSON) | Company leads this lead is the primary contact of. |
> | `relationships` | String (JSON) | Relationships of the lead with other leads. |
> | `extra_fields` | String (JSON) | Fields the API returned that this connector does not map to a column yet, keyed by their original names. |

> [accordion] Deals (Businesses)
>
> Deals (negócios) with their stage, lead, attendant, status, values, products and custom fields.
>
> Table: `businesses` · Primary key: `id` · Sync: Full table
>
> | Field | Type | Description |
> | :- | :- | :- |
> | `id` | String | Unique identifier of the deal. |
> | `created_at` | Datetime | When the deal was created. |
> | `updated_at` | Datetime | When the deal was last updated (when DataCrazy sends it). |
> | `code` | Integer | Sequential code of the deal shown in DataCrazy. |
> | `external_id` | String | External identifier of the deal. |
> | `lead_id` | String | Lead the deal belongs to. |
> | `stage_id` | String | Pipeline stage the deal is in. |
> | `attendant_id` | String | Attendant (user) responsible for the deal. |
> | `next_activity_id` | String | Next scheduled activity of the deal. |
> | `status` | String | Status of the deal: in\_process, won or lost. |
> | `total` | Number | Total value of the deal. |
> | `discount` | Number | Discount applied to the deal. |
> | `addition` | Number | Addition (surcharge) applied to the deal. |
> | `shipping` | Number | Shipping value of the deal. |
> | `shipping_type` | String | Shipping type of the deal. |
> | `coupon` | String | Coupon used in the deal. |
> | `products_count` | Integer | Number of products in the deal. |
> | `products` | String (JSON) | Products of the deal with quantity, price and total. |
> | `loss_reason_id` | String | Loss reason of a lost deal. |
> | `justification` | String | Justification given when the deal was lost. |
> | `last_moved_at` | Datetime | When the deal last moved to another stage. |
> | `status_changed_at` | Datetime | When the status of the deal last changed. |
> | `additional_fields` | String (JSON) | Custom (additional) fields of the deal and their values. |
> | `extra_fields` | String (JSON) | Fields the API returned that this connector does not map to a column yet, keyed by their original names. |

> [accordion] Activities
>
> Scheduled activities (tasks, calls, meetings) with their lead, deal, attendant and type.
>
> Table: `activities` · Primary key: `id` · Sync: Full table
>
> | Field | Type | Description |
> | :- | :- | :- |
> | `id` | String | Unique identifier of the activity. |
> | `created_at` | Datetime | When the activity was created. |
> | `updated_at` | Datetime | When the activity was last updated (when DataCrazy sends it). |
> | `title` | String | Title of the activity. |
> | `description` | String | Description of the activity. |
> | `notes` | String | Notes of the activity. |
> | `type` | String | Type of the activity (when sent as text). |
> | `start_date` | Datetime | When the activity is scheduled to start. |
> | `end_date` | Datetime | When the activity is scheduled to end. |
> | `is_completed` | Boolean | Whether the activity was completed. |
> | `required` | Boolean | Whether the activity is required. |
> | `lead_id` | String | Lead the activity belongs to. |
> | `lead_name` | String | Name of the lead. |
> | `business_id` | String | Deal the activity belongs to. |
> | `attendant_id` | String | Attendant (user) responsible for the activity. |
> | `attendant_name` | String | Name of the attendant. |
> | `activity_type_id` | String | Activity type. |
> | `activity_type_name` | String | Name of the activity type. |
> | `activity_type_color` | String | Color of the activity type. |
> | `flow_id` | String | Automation flow that created the activity. |
> | `flow_name` | String | Name of the automation flow. |
> | `extra_fields` | String (JSON) | Fields the API returned that this connector does not map to a column yet, keyed by their original names. |

> [accordion] Pipelines
>
> Sales pipelines (funnels) of the account.
>
> Table: `pipelines` · Primary key: `id` · Sync: Full table
>
> | Field | Type | Description |
> | :- | :- | :- |
> | `id` | String | Unique identifier of the pipeline. |
> | `created_at` | Datetime | When the pipeline was created. |
> | `updated_at` | Datetime | When the pipeline was last updated. |
> | `deleted_at` | Datetime | When the pipeline was deleted, if it was. |
> | `name` | String | Name of the pipeline. |
> | `description` | String | Description of the pipeline. |
> | `group` | String | Group the pipeline belongs to. |
> | `stages_count` | Integer | Number of stages in the pipeline. |
> | `permissions` | String (JSON) | Attendant permissions on the pipeline. |
> | `extra_fields` | String (JSON) | Fields the API returned that this connector does not map to a column yet, keyed by their original names. |

> [accordion] Pipeline Stages
>
> Stages of each pipeline, in order.
>
> Table: `pipeline_stages` · Primary key: `id` · Sync: Full table
>
> | Field | Type | Description |
> | :- | :- | :- |
> | `id` | String | Unique identifier of the stage. |
> | `pipeline_id` | String | Pipeline the stage belongs to. |
> | `created_at` | Datetime | When the stage was created. |
> | `name` | String | Name of the stage. |
> | `color` | String | Color of the stage. |
> | `index` | Integer | Position of the stage in the pipeline (0 is the first). |
> | `activities_count` | Integer | Number of activities in the stage. |
> | `extra_fields` | String (JSON) | Fields the API returned that this connector does not map to a column yet, keyed by their original names. |

> [accordion] Tags
>
> Tags that can be applied to leads and deals.
>
> Table: `tags` · Primary key: `id` · Sync: Full table
>
> | Field | Type | Description |
> | :- | :- | :- |
> | `id` | String | Unique identifier of the tag. |
> | `created_at` | Datetime | When the tag was created. |
> | `name` | String | Name of the tag. |
> | `color` | String | Color of the tag. |
> | `description` | String | Description of the tag. |
> | `leads_count` | Integer | Number of leads with the tag (when DataCrazy sends it). |
> | `extra_fields` | String (JSON) | Fields the API returned that this connector does not map to a column yet, keyed by their original names. |

> [accordion] Lists
>
> Lead lists of the account.
>
> Table: `lists` · Primary key: `id` · Sync: Full table
>
> | Field | Type | Description |
> | :- | :- | :- |
> | `id` | String | Unique identifier of the list. |
> | `created_at` | Datetime | When the list was created. |
> | `name` | String | Name of the list. |
> | `description` | String | Description of the list. |
> | `extra_fields` | String (JSON) | Fields the API returned that this connector does not map to a column yet, keyed by their original names. |

> [accordion] Products
>
> Product catalog used in deals.
>
> Table: `products` · Primary key: `id` · Sync: Full table
>
> | Field | Type | Description |
> | :- | :- | :- |
> | `id` | String | Unique identifier of the product. |
> | `created_at` | Datetime | When the product was created. |
> | `id_sku` | String | SKU code of the product. |
> | `name` | String | Name of the product. |
> | `price` | Number | Price of the product. |
> | `extra_fields` | String (JSON) | Fields the API returned that this connector does not map to a column yet, keyed by their original names. |

> [accordion] Business Loss Reasons
>
> Reasons a deal can be marked as lost.
>
> Table: `business_loss_reasons` · Primary key: `id` · Sync: Full table
>
> | Field | Type | Description |
> | :- | :- | :- |
> | `id` | String | Unique identifier of the loss reason. |
> | `created_at` | Datetime | When the loss reason was created. |
> | `name` | String | Name of the loss reason. |
> | `required_justification` | Boolean | Whether a justification is required when a deal is lost for this reason. |
> | `extra_fields` | String (JSON) | Fields the API returned that this connector does not map to a column yet, keyed by their original names. |

> [accordion] Attendants (CRM)
>
> Users who work in the CRM.
>
> Table: `attendants_crm` · Primary key: `id` · Sync: Full table
>
> | Field | Type | Description |
> | :- | :- | :- |
> | `id` | String | Unique identifier of the attendant in the CRM. |
> | `user_id` | String | User account of the attendant. |
> | `name` | String | Name of the attendant. |
> | `email` | String | Email address of the attendant. |
> | `phone` | String | Phone number of the attendant. |
> | `image` | String | URL of the attendant's picture. |
> | `extra_fields` | String (JSON) | Fields the API returned that this connector does not map to a column yet, keyed by their original names. |

> [accordion] Lead History
>
> Timeline of each lead (stage moves, changes, events). Not selected by default and best-effort: read one lead at a time, only for leads with recent activity (see the implementation notes).
>
> Table: `lead_history` · Primary key: `id` · Sync: Incremental · Replication key: `created_at`
>
> | Field | Type | Description |
> | :- | :- | :- |
> | `id` | String | Unique identifier of the history entry. |
> | `lead_id` | String | Lead the entry belongs to. |
> | `created_at` | Datetime | When the entry was recorded; used as the incremental replication key. |
> | `type` | String | Kind of entry. |
> | `history` | String | Text of the entry. |
> | `history_code` | String | Code of the kind of entry. |
> | `business_id` | String | Deal the entry refers to. |
> | `session_name` | String | Session (connection) the entry came from. |
> | `attendant_id` | String | Attendant who caused the entry. |
> | `attendant_name` | String | Name of the attendant. |
> | `extra_fields` | String (JSON) | Fields the API returned that this connector does not map to a column yet, keyed by their original names. |

> [accordion] Lead Notes
>
> Comments written on each lead. Not selected by default and best-effort: read one lead at a time, only for leads with recent activity (see the implementation notes).
>
> Table: `lead_notes` · Primary key: `id` · Sync: Incremental · Replication key: `created_at`
>
> | Field | Type | Description |
> | :- | :- | :- |
> | `id` | String | Unique identifier of the note (comment). |
> | `lead_id` | String | Lead the note belongs to. |
> | `created_at` | Datetime | When the note was written; used as the incremental replication key. |
> | `type` | String | Kind of note. |
> | `history` | String | Text of the note. |
> | `history_code` | String | Code of the kind of note. |
> | `business_id` | String | Deal the note refers to. |
> | `session_name` | String | Session (connection) the note came from. |
> | `attendant_id` | String | Attendant who wrote the note. |
> | `attendant_name` | String | Name of the attendant. |
> | `extra_fields` | String (JSON) | Fields the API returned that this connector does not map to a column yet, keyed by their original names. |

### Multiatendimento (conversations)

> [accordion] Connections (Instances)
>
> WhatsApp, Instagram and other channels connected to the account. Only the fields listed below are extracted: connection settings, which can hold credentials, never are.
>
> Table: `instances` · Primary key: `id` · Sync: Full table
>
> | Field | Type | Description |
> | :- | :- | :- |
> | `id` | String | Unique identifier of the connection (instance). |
> | `name` | String | Name of the connection. |
> | `created_at` | Datetime | When the connection was created. |
> | `updated_at` | Datetime | When the connection was last updated. |
> | `deleted_at` | Datetime | When the connection was deleted, if it was. |
> | `migrated_at` | Datetime | When the connection was migrated. |
> | `is_active_changed_at` | Datetime | When the connection was last turned on or off. |
> | `platform` | String | Platform of the connection (WhatsApp, Instagram...). |
> | `provider` | String | Provider of the connection. |
> | `engine` | String | Engine of the connection. |
> | `is_active` | Boolean | Whether the connection is active. |
> | `status` | String | Connection status. |
> | `error_code` | String | Code of the connection's last error. |
> | `error_message` | String | Message of the connection's last error. |

> [accordion] Attendants (Multiatendimento)
>
> Users who answer conversations.
>
> Table: `attendants_multi` · Primary key: `id` · Sync: Full table
>
> | Field | Type | Description |
> | :- | :- | :- |
> | `id` | String | Unique identifier of the attendant in multiatendimento. |
> | `user_id` | String | User account of the attendant. |
> | `name` | String | Name of the attendant. |
> | `email` | String | Email address of the attendant. |
> | `phone` | String | Phone number of the attendant. |
> | `image_url` | String | URL of the attendant's picture. |
> | `extra_fields` | String (JSON) | Fields the API returned that this connector does not map to a column yet, keyed by their original names. |

> [accordion] Conversations
>
> Conversations of the multi-attendance inbox, with contact, connection, department and current attendance.
>
> Table: `conversations` · Primary key: `id` · Sync: Full table
>
> | Field | Type | Description |
> | :- | :- | :- |
> | `id` | String | Unique identifier of the conversation. |
> | `created_at` | Datetime | When the conversation was created. |
> | `updated_at` | Datetime | When the conversation was last updated. |
> | `deleted_at` | Datetime | When the conversation was deleted, if it was. |
> | `archived_at` | Datetime | When the conversation was archived, if it was. |
> | `name` | String | Name of the conversation (usually the contact's name). |
> | `description` | String | Description of the conversation. |
> | `image_url` | String | URL of the conversation's picture. |
> | `is_group` | Boolean | Whether the conversation is a group chat. |
> | `automation_enabled` | Boolean | Whether automations run in the conversation. |
> | `hidden` | Boolean | Whether the conversation is hidden. |
> | `finished` | Boolean | Whether the attendance of the conversation is finished. |
> | `is_pending` | Boolean | Whether the conversation is waiting for an answer. |
> | `last_message_is_automation` | Boolean | Whether the last message was sent by an automation. |
> | `last_message_date` | Datetime | When the last message was sent or received. |
> | `last_received_message_date` | Datetime | When the last message from the contact was received. |
> | `last_sended_message_date` | Datetime | When the last message to the contact was sent. |
> | `contact_id` | String | Channel contact of the conversation. |
> | `contact_name` | String | Name of the contact. |
> | `contact_platform` | String | Platform of the contact (WhatsApp, Instagram...). |
> | `instance_id` | String | Connection (instance) the conversation runs on. |
> | `instance_name` | String | Name of the connection. |
> | `department_id` | String | Department the conversation is currently in. |
> | `department_name` | String | Name of the department. |
> | `current_thread_id` | String | Current (or last) attendance thread of the conversation. |
> | `attendants` | String (JSON) | Attendants of the conversation. |
> | `contact` | String (JSON) | Channel contact of the conversation. |
> | `current_department` | String (JSON) | Department the conversation is currently in. |
> | `current_thread` | String (JSON) | Current (or last) attendance thread: code, start, end, duration and wait time. |
> | `source_referral` | String (JSON) | Ad referral that started the conversation (source id, URL, click-to-WhatsApp id). |
> | `extra_fields` | String (JSON) | Fields the API returned that this connector does not map to a column yet, keyed by their original names. |

> [accordion] Conversation Messages
>
> Messages of each conversation, sent and received, including internal notes and attachments.
>
> Table: `conversation_messages` · Primary key: `id` · Sync: Incremental · Replication key: `created_at`
>
> | Field | Type | Description |
> | :- | :- | :- |
> | `id` | String | Unique identifier of the message. |
> | `conversation_id` | String | Conversation the message belongs to. |
> | `created_at` | Datetime | When the message was sent or received; used as the incremental replication key. |
> | `updated_at` | Datetime | When the message was last updated. |
> | `deleted_at` | Datetime | When the message was deleted, if it was. |
> | `body` | String | Text of the message. |
> | `received` | Boolean | True when the message came from the contact, false when it was sent by the account. |
> | `status` | String | Delivery status of the message. |
> | `is_internal` | Boolean | Whether the message is an internal note. |
> | `is_scheduled` | Boolean | Whether the message was scheduled. |
> | `scheduled_date` | Datetime | When the scheduled message is (or was) sent. |
> | `edited` | Boolean | Whether the message was edited. |
> | `deleted` | Boolean | Whether the message was deleted. |
> | `forwarded` | Boolean | Whether the message was forwarded. |
> | `header` | String | Header of a template or button message. |
> | `footer` | String | Footer of a template or button message. |
> | `signature` | String | Signature added to the message. |
> | `erro_code` | String | Error code of a message that failed (field named erroCode by the API). |
> | `error_message` | String | Error message of a message that failed. |
> | `interpreted_content` | String | Content of a media message as interpreted by DataCrazy (transcription, description). |
> | `interpreted_content_pending` | Boolean | Whether the interpretation of the media is still pending. |
> | `contact_id` | String | Channel contact of the message. |
> | `replied_message_id` | String | Message this message replies to. |
> | `attachments` | String (JSON) | Files attached to the message (type, MIME type, URL). |
> | `vcard` | String (JSON) | Contact cards sent in the message. |
> | `location` | String (JSON) | Location sent in the message. |
> | `buttons` | String (JSON) | Buttons of the message. |
> | `attendants` | String (JSON) | Attendants who sent the message. |
> | `contact` | String (JSON) | Channel contact of the message. |
> | `forward` | String (JSON) | Forwarding details of the message. |
> | `replied_message_attachment` | String (JSON) | Attachment of the message this message replies to. |
> | `extra_fields` | String (JSON) | Fields the API returned that this connector does not map to a column yet, keyed by their original names. |

## Implementation notes

* **Full table streams.** The DataCrazy API has no "updated since" filter: leads and deals can only be filtered by creation date, activities by their scheduled date, and conversations not by date at all. So leads, deals, activities, conversations and the catalogs are read in full on every sync, which also drops deleted records. If one that had records suddenly comes back empty, that stream fails instead of loading an empty table; run a full sync of the source if the data really was removed in DataCrazy. On GCP (BigQuery) destinations the table then keeps its data; on AWS, a stream that fails can still leave its table empty until the next successful sync. If one comes back with far fewer records than the previous sync, the sync loads it and shows a warning.
* **Large accounts.** The API pages through at most 10,000 records per list. Beyond that, the connector reads leads and deals in creation-date ranges, activities in scheduled-date ranges and conversations by status (and by connection within a status). It then compares what it read with the total DataCrazy reports. Records without a date that the filters can use are looked for at the top of the list; if some still cannot be read, that table's sync stops with an error instead of loading it incomplete (a difference of a few records, as when records are deleted during the sync, only shows a warning).
* **Conversation messages.** Each sync reads the messages of the conversations with activity since the previous sync (re-reading the last 2 hours). DataCrazy returns only the most recent messages of a conversation (as of 2026-11, reportedly the latest 20), so when a conversation receives more messages between two syncs than the API returns, the oldest of them may be missing. Whenever the connector cannot confirm it reached the previous sync's messages (including a conversation with exactly 20 new messages), the sync log says how many conversations may be affected. Schedule the source to run often (for example, every hour) to avoid this. Edits and deletions of messages already loaded are not picked up.
* **Lead history and notes (best-effort).** DataCrazy cannot list history or notes across leads, and does not say when a lead was last updated, so these tables are read only for leads that were created, updated or bought since the previous sync (re-reading the last day), or whose deals were created, moved or changed status since then. **A note written on a lead that had no other change is not loaded** until that lead or one of its deals changes. A full sync of these tables keeps only the entries of the leads active since the **Start Date**.
* **Long syncs of messages and lead history/notes.** The first sync (and a full sync) reads everything active since the **Start Date**. After that, each sync reads these tables oldest activity first, with a limit of about two and a half hours of requests. When the limit is reached, the sync succeeds with a warning saying how many conversations or leads are left, and the next syncs continue right after the last conversation or lead read in full; conversations and leads with new activity in the meantime are read too.
* **Rate limit.** The connector reads one request at a time and stays under the limits DataCrazy documents (60 requests per minute per route, 20 for conversations). When DataCrazy asks it to wait, it waits and says so in the sync log.
* **Permissions.** Before reading anything, the connector checks that the API key can read the CRM and the multi-attendance module (only the ones your selected streams need). A module your plan or key cannot read is skipped with a warning naming its tables, and the other streams still load.
* **Fields.** Nested objects and lists (tags, addresses, products, custom fields, attachments) are stored as JSON text, and the most used parts are also unpacked into their own columns. Any field DataCrazy returns that is not listed here is kept in the **extra\_fields** column, as JSON with the original field names, except in **Connections**, which only ever loads the fields listed for it. Values and amounts keep their exact decimals.

## Troubleshooting

| Error or symptom | What it means | What to do |
| :- | :- | :- |
| "DataCrazy rejected the API token of this source" | The key is wrong, revoked or expired, or the plan does not include API access. | Create a new key under **Configurações > Chaves de API**, check that the plan is Essential or higher, and update the source. |
| "does not let the API token of this source read the module" | The plan or key cannot read that module (CRM or multi-attendance). | Check the DataCrazy plan, or deselect the tables named in the message. |
| "Could not connect to the DataCrazy API" | The **API URL** is wrong or unreachable. | Restore the default `https://api.g1.datacrazy.io`. |
| "only the most recent messages" warning | Some conversations received more messages between syncs than the API returns. | Run the source more often. |
| A sync stops saying the list kept changing or could not be read consistently | DataCrazy's totals and the records read did not match. | Run the source again; if it repeats, contact support with the source slug and the run ID. |
| A sync stops saying some records "could not be read" | Those records have no date DataCrazy's filters can use, in an account with more than 10,000 of them. | Contact support with the source slug and the run ID. |
| A warning "backfill in progress" | The first sync of messages or lead history/notes needs more than one sync. | Nothing: the next syncs continue where this one stopped. |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.