> ## 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.

# Cubo CRM as a data source

> Bring your Cubo CRM deals, contacts, organizations, activities, annotations, custom fields and funnels to Nekt.

Cubo CRM (Cubo Suite) is a Brazilian sales CRM. This connector reads your Cubo CRM account through the Cubo CRM API and brings your deals, contacts (people), organizations, activities, annotations and custom field values, together with the funnels and stages, products and categories, lost reasons, users and the account's settings tables (domains, landing pages, message templates, saved filters and WhatsApp queues).

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

## Configuring Cubo CRM 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 Cubo CRM option from the list of connectors.

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

### 1. Add account access

The Cubo CRM API uses an **API Key**. To create one:

1. Log in to Cubo CRM, preferably with an **administrator** user.
2. Click your user name in the top right corner and open **Meu Perfil**.
3. Open the **Chaves API** section and click to create a new API key.
4. Copy the key right away: Cubo CRM shows it only once.

* **API Key**: the key you just created.

> [!TIP]
>
> The connector sees what the user who created the key can see. Cubo CRM shows a regular user only their own deals, so create the key with an administrator user to bring the whole account. When the key belongs to a regular user, the sync log warns about it.

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**: every Cubo CRM stream is Full table. The Cubo CRM API has no filter by update date, so each sync reads the current state of your account and replaces the table with it.

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). Since every sync reads the whole account, a few syncs a day is usually a good balance.

Optionally, you can configure Delta Log Retention and determine for how long we should store old states of this table as it gets updated. Read more about this resource [here](https://docs.nekt.com/get-started/core-concepts/resource-control). Since every stream is Full table, an Additional Full Sync is not needed.

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.

# 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. All streams are Full table.

| Stream | Slug | Description |
| - | - | - |
| Deals | `deals` | Every deal (negociação) of the account, in every funnel and status. |
| People | `people` | Contacts (pessoas) of the account. |
| Organizations | `organizations` | Organizations (companies your contacts belong to). |
| Annotations | `annotations` | Notes and automatic history entries (creation, stage changes, transfers) of deals, people and organizations. |
| Custom Field Values | `custom_field_values` | One row per custom field value of each deal, person and organization: the easiest way to pivot custom fields in SQL. |
| Activities | `activities` | Activities (calls, meetings, WhatsApp messages, e-mails, contact attempts) of the account. |
| Funnels (Pipes) | `pipes` | Sales funnels (pipes) of the account. |
| Stages | `stages` | Stages of every funnel. |
| Products | `products` | Products of the account. |
| Categories | `categories` | Product categories. |
| Custom Fields | `custom_fields` | Definitions of the custom fields of deals, people and organizations. |
| Lost Reasons | `lost_reasons` | Reasons a deal can be marked as lost. |
| Users | `users` | Users of the Cubo CRM account. |
| Company | `companies` | The Cubo CRM account (company) itself: one row. |
| Domains | `domains` | Domains used by the account's landing pages. |
| Landing Pages | `landings` | Landing pages built in Cubo CRM. |
| Message Templates | `templates` | E-mail and WhatsApp message templates. |
| Saved Filters | `filters` | Saved filters of the funnels. |
| WhatsApp Queues | `whatsapp_queues` | WhatsApp message queues (bulk sends). |

Every table also has an `extra_fields` column: a JSON object with any field Cubo CRM returned for the record that has no column of its own. New or undocumented fields are kept there instead of being dropped.

## Fields by stream

> [accordion] Deals
>
> Every deal (negociação) of the account, in every funnel and status.
>
> Table: `deals` · Primary key: `id` · Sync: Full table
>
> | Field | Type | Description |
> | :- | :- | :- |
> | `id` | Integer | Unique identifier of the deal. |
> | `title` | String | Title of the deal. |
> | `price` | Number | Total value of the deal. |
> | `status` | String | Status of the deal: open, won, lost or deleted (excluída). |
> | `details` | String | Free-text details of the deal. |
> | `pipe_id` | Integer | Identifier of the funnel (pipe) the deal is in. |
> | `stage_id` | Integer | Identifier of the current stage of the deal in its funnel. |
> | `user_id` | Integer | Identifier of the user responsible for the deal. |
> | `people_id` | Integer | Identifier of the person (contact) of the deal. |
> | `organization_id` | Integer | Identifier of the organization of the deal, if any. |
> | `lost_reason_id` | Integer | Identifier of the lost reason, when the deal was lost. |
> | `win_reason_id` | Integer | Identifier of the win reason, when the deal was won. |
> | `lost_stage_id` | Integer | Identifier of the stage the deal was in when it was lost. |
> | `duplicated_id` | Integer | Identifier of the deal this one duplicates, when Cubo marked it as a duplicate. |
> | `transshipment_origin_id` | Integer | Identifier of the deal this one was transferred (transshipment) from another funnel. |
> | `probability` | Number | Probability of closing the deal. |
> | `rating` | Integer | Rating of the deal (0 to 5). |
> | `rotten` | Integer | 1 when the deal is rotten (stayed in its stage longer than the stage allows), 0 otherwise. |
> | `order_nr` | Integer | Position of the deal within its stage. |
> | `lost_date` | Datetime | Date and time the deal was lost. |
> | `win_date` | Datetime | Date and time the deal was won. |
> | `expect_closing_date` | Datetime | Expected closing date of the deal. |
> | `first_move` | Datetime | Date and time of the first stage change of the deal. |
> | `last_move` | Datetime | Date and time of the last stage change of the deal. |
> | `time_until_closing` | String | Time until closing as returned by Cubo CRM. |
> | `created_by` | String | How the deal was created (for example api or manual). |
> | `through_split` | Integer | 1 when the deal was assigned through the funnel's lead distribution (split), 0 otherwise. |
> | `rd_uuid` | String | RD Station identifier, when the deal came from the RD Station integration. |
> | `conversas_id` | String | Identifier in the Conversas integration, when the deal came from it. |
> | `url` | String | Page URL the deal was captured on, when it came from a form or landing page. |
> | `ip_address` | String | IP address the deal was captured from, when it came from a form or landing page. |
> | `user_agent` | String | Browser user agent the deal was captured from, when it came from a form or landing page. |
> | `payload` | String (JSON) | Raw data received when the deal was created by an integration (JSON). |
> | `products` | String (JSON) | Products of the deal with quantity and price (JSON array). |
> | `proposals` | String (JSON) | Commercial proposals of the deal (JSON array). |
> | `whatsapp_messages` | String (JSON) | WhatsApp messages linked to the deal (JSON array). |
> | `custom_fields` | String (JSON) | Custom field values of the record (JSON array of objects with id, custom\_field\_id, name, type, value, created\_at, updated\_at). The same values, one row per field, are in the custom\_field\_values table. |
> | `created_at` | Datetime | Date and time the record was created in Cubo CRM. |
> | `updated_at` | Datetime | Date and time the record was last updated in Cubo CRM. |
> | `extra_fields` | String (JSON) | Fields Cubo CRM returned for this record that have no column of their own (JSON object, credentials removed). Keeps new or undocumented fields instead of dropping them. |

> [accordion] People
>
> Contacts (pessoas) of the account.
>
> Table: `people` · Primary key: `id` · Sync: Full table
>
> | Field | Type | Description |
> | :- | :- | :- |
> | `id` | Integer | Unique identifier of the person (contact). |
> | `name` | String | Name of the person. |
> | `phone` | String | Phone number of the person as typed in Cubo CRM. |
> | `normalized_phone` | String | Phone number of the person with digits only. |
> | `organization_id` | Integer | Identifier of the organization the person belongs to, if any. |
> | `user_id` | Integer | Identifier of the user who owns the person. |
> | `company_id` | Integer | Identifier of the Cubo CRM account (company) the record belongs to. |
> | `status` | String | Status of the record (active or deactivated). |
> | `custom_fields` | String (JSON) | Custom field values of the record (JSON array of objects with id, custom\_field\_id, name, type, value, created\_at, updated\_at). The same values, one row per field, are in the custom\_field\_values table. |
> | `created_at` | Datetime | Date and time the record was created in Cubo CRM. |
> | `updated_at` | Datetime | Date and time the record was last updated in Cubo CRM. |
> | `extra_fields` | String (JSON) | Fields Cubo CRM returned for this record that have no column of their own (JSON object, credentials removed). Keeps new or undocumented fields instead of dropping them. |

> [accordion] Organizations
>
> Organizations (companies your contacts belong to).
>
> Table: `organizations` · Primary key: `id` · Sync: Full table
>
> | Field | Type | Description |
> | :- | :- | :- |
> | `id` | Integer | Unique identifier of the organization. |
> | `name` | String | Name of the organization. |
> | `user_id` | Integer | Identifier of the user who owns the organization. |
> | `company_id` | Integer | Identifier of the Cubo CRM account (company) the record belongs to. |
> | `status` | String | Status of the record (active or deactivated). |
> | `custom_fields` | String (JSON) | Custom field values of the record (JSON array of objects with id, custom\_field\_id, name, type, value, created\_at, updated\_at). The same values, one row per field, are in the custom\_field\_values table. |
> | `created_at` | Datetime | Date and time the record was created in Cubo CRM. |
> | `updated_at` | Datetime | Date and time the record was last updated in Cubo CRM. |
> | `extra_fields` | String (JSON) | Fields Cubo CRM returned for this record that have no column of their own (JSON object, credentials removed). Keeps new or undocumented fields instead of dropping them. |

> [accordion] Annotations
>
> Notes and automatic history entries (creation, stage changes, transfers) of deals, people and organizations. Cubo has no annotation list, so the connector reads them from inside each deal, person and organization; an annotation that appears in more than one of them is loaded once.
>
> Table: `annotations` · Primary key: `id` · Sync: Full table
>
> | Field | Type | Description |
> | :- | :- | :- |
> | `id` | Integer | Unique identifier of the annotation. |
> | `text` | String | Text of the annotation. |
> | `type` | String | Type of the annotation (for example alteration for automatic history entries, activity, note). |
> | `deal_id` | Integer | Identifier of the deal the annotation belongs to, if any. |
> | `people_id` | Integer | Identifier of the person the annotation belongs to, if any. |
> | `organization_id` | Integer | Identifier of the organization the annotation belongs to, if any. |
> | `activity_id` | Integer | Identifier of the activity the annotation belongs to, if any. |
> | `user_id` | Integer | Identifier of the user who wrote the annotation (or whose action created it). |
> | `files` | String (JSON) | Files attached to the annotation (JSON array). |
> | `created_at` | Datetime | Date and time the record was created in Cubo CRM. |
> | `updated_at` | Datetime | Date and time the record was last updated in Cubo CRM. |
> | `extra_fields` | String (JSON) | Fields Cubo CRM returned for this record that have no column of their own (JSON object, credentials removed). Keeps new or undocumented fields instead of dropping them. |

> [accordion] Custom Field Values
>
> One row per custom field value of each deal, person and organization: the easiest way to pivot custom fields in SQL. The definitions are in Custom Fields.
>
> Table: `custom_field_values` · Primary key: `entity_type`, `id` · Sync: Full table
>
> | Field | Type | Description |
> | :- | :- | :- |
> | `entity_type` | String | Kind of record the value belongs to: deal, people or organization. |
> | `id` | Integer | Identifier of the value in Cubo CRM (unique per entity\_type). |
> | `entity_id` | Integer | Identifier of the deal, person or organization the value belongs to. |
> | `custom_field_id` | Integer | Identifier of the custom field (see the custom\_fields table). |
> | `custom_field_name` | String | Name of the custom field when the value was read. |
> | `custom_field_type` | String | Type of the custom field (text, selectbox, ...). |
> | `value` | String | Value of the custom field for this record. |
> | `created_at` | Datetime | Date and time the record was created in Cubo CRM. |
> | `updated_at` | Datetime | Date and time the record was last updated in Cubo CRM. |
> | `extra_fields` | String (JSON) | Fields Cubo CRM returned for this record that have no column of their own (JSON object, credentials removed). Keeps new or undocumented fields instead of dropping them. |

> [accordion] Activities
>
> Activities (calls, meetings, WhatsApp messages, e-mails, contact attempts) of the account.
>
> Table: `activities` · Primary key: `id` · Sync: Full table
>
> | Field | Type | Description |
> | :- | :- | :- |
> | `id` | Integer | Unique identifier of the activity. |
> | `title` | String | Title of the activity. |
> | `type` | String | Type of the activity (whatsapp, call, not\_answer, mail, meeting, contact\_attempt, ...). |
> | `status` | String | Status of the activity: open or completed. |
> | `start` | Datetime | Scheduled start of the activity. |
> | `end` | Datetime | Scheduled end of the activity. |
> | `annotation` | String | Note written on the activity. |
> | `deal_id` | Integer | Identifier of the deal the activity belongs to. |
> | `user_id` | Integer | Identifier of the user responsible for the activity. |
> | `company_id` | Integer | Identifier of the Cubo CRM account (company) the record belongs to. |
> | `completed_at` | Datetime | Date and time the activity was completed. |
> | `created_at` | Datetime | Date and time the record was created in Cubo CRM. |
> | `updated_at` | Datetime | Date and time the record was last updated in Cubo CRM. |
> | `extra_fields` | String (JSON) | Fields Cubo CRM returned for this record that have no column of their own (JSON object, credentials removed). Keeps new or undocumented fields instead of dropping them. |

> [accordion] Funnels (Pipes)
>
> Sales funnels (pipes) of the account.
>
> Table: `pipes` · Primary key: `id` · Sync: Full table
>
> | Field | Type | Description |
> | :- | :- | :- |
> | `id` | Integer | Unique identifier of the funnel (pipe). |
> | `name` | String | Name of the funnel. |
> | `order_nr` | Integer | Display position of the funnel. |
> | `company_id` | Integer | Identifier of the Cubo CRM account (company) the record belongs to. |
> | `status` | String | Status of the record (active or deactivated). |
> | `daily_reports` | String | Recipients of the funnel's daily report. |
> | `first_rating` | String | Label of rating 1 in this funnel. |
> | `seccond_rating` | String | Label of rating 2 in this funnel (the API spells it 'seccond'). |
> | `third_rating` | String | Label of rating 3 in this funnel. |
> | `fourth_rating` | String | Label of rating 4 in this funnel. |
> | `fifth_rating` | String | Label of rating 5 in this funnel. |
> | `show_product_format` | String | How products are shown on the funnel's deals. |
> | `show_custom_field_format` | String | How custom fields are shown on the funnel's deals. |
> | `time_edit_annotation` | Integer | Time window to edit annotations in this funnel, as configured in Cubo CRM. |
> | `primary_field` | String | Field shown as the main field of the funnel's deal cards. |
> | `proposal_setting` | String (JSON) | Proposal settings of the funnel (JSON). |
> | `user_ids` | Array of integers | Identifiers of the users with access to the funnel. |
> | `users` | String (JSON) | Users of the funnel with their lead-distribution settings (JSON array of objects with id, splitter, count). |
> | `created_at` | Datetime | Date and time the record was created in Cubo CRM. |
> | `updated_at` | Datetime | Date and time the record was last updated in Cubo CRM. |
> | `deleted_at` | Datetime | Date and time the record was soft-deleted in Cubo CRM, when the API still lists it. |
> | `extra_fields` | String (JSON) | Fields Cubo CRM returned for this record that have no column of their own (JSON object, credentials removed). Keeps new or undocumented fields instead of dropping them. |

> [accordion] Stages
>
> Stages of every funnel. The connector reads the stages of each funnel listed in Funnels.
>
> Table: `stages` · Primary key: `id` · Sync: Full table
>
> | Field | Type | Description |
> | :- | :- | :- |
> | `id` | Integer | Unique identifier of the stage. |
> | `name` | String | Name of the stage. |
> | `description` | String | Description of the stage. |
> | `pipe_id` | Integer | Identifier of the funnel the stage belongs to. |
> | `order_nr` | Integer | Position of the stage in its funnel. |
> | `rotten_flag` | Integer | 1 when deals rot in this stage after rotten\_days, 0 otherwise. |
> | `rotten_days` | Integer | Days a deal may stay in the stage before it is considered rotten. |
> | `light_background` | String | Background colour of the stage in the light theme. |
> | `dark_background` | String | Background colour of the stage in the dark theme. |
> | `light_text` | String | Text colour of the stage in the light theme. |
> | `dark_text` | String | Text colour of the stage in the dark theme. |
> | `custom_fields` | String (JSON) | Custom fields configured on the stage (for example required fields), as JSON. |
> | `created_at` | Datetime | Date and time the record was created in Cubo CRM. |
> | `updated_at` | Datetime | Date and time the record was last updated in Cubo CRM. |
> | `deleted_at` | Datetime | Date and time the record was soft-deleted in Cubo CRM, when the API still lists it. |
> | `extra_fields` | String (JSON) | Fields Cubo CRM returned for this record that have no column of their own (JSON object, credentials removed). Keeps new or undocumented fields instead of dropping them. |

> [accordion] Products
>
> Products of the account.
>
> Table: `products` · Primary key: `id` · Sync: Full table
>
> | Field | Type | Description |
> | :- | :- | :- |
> | `id` | Integer | Unique identifier of the product. |
> | `name` | String | Name of the product. |
> | `sku` | String | SKU (stock keeping unit) code of the product. |
> | `price` | Number | Unit price of the product. |
> | `description` | String | Description of the product. |
> | `company_id` | Integer | Identifier of the Cubo CRM account (company) the record belongs to. |
> | `status` | String | Status of the record (active or deactivated). |
> | `show_card` | Integer | 1 when the product is shown on deal cards, 0 otherwise. |
> | `url_thumbnail` | String | URL of the product thumbnail image. |
> | `url_image` | String | URL of the product image. |
> | `category_ids` | Array of integers | Identifiers of the categories of the product. |
> | `created_at` | Datetime | Date and time the record was created in Cubo CRM. |
> | `updated_at` | Datetime | Date and time the record was last updated in Cubo CRM. |
> | `deleted_at` | Datetime | Date and time the record was soft-deleted in Cubo CRM, when the API still lists it. |
> | `extra_fields` | String (JSON) | Fields Cubo CRM returned for this record that have no column of their own (JSON object, credentials removed). Keeps new or undocumented fields instead of dropping them. |

> [accordion] Categories
>
> Product categories.
>
> Table: `categories` · Primary key: `id` · Sync: Full table
>
> | Field | Type | Description |
> | :- | :- | :- |
> | `id` | Integer | Unique identifier of the product category. |
> | `name` | String | Name of the category. |
> | `company_id` | Integer | Identifier of the Cubo CRM account (company) the record belongs to. |
> | `status` | String | Status of the record (active or deactivated). |
> | `product_ids` | Array of integers | Identifiers of the products in the category. |
> | `created_at` | Datetime | Date and time the record was created in Cubo CRM. |
> | `updated_at` | Datetime | Date and time the record was last updated in Cubo CRM. |
> | `deleted_at` | Datetime | Date and time the record was soft-deleted in Cubo CRM, when the API still lists it. |
> | `extra_fields` | String (JSON) | Fields Cubo CRM returned for this record that have no column of their own (JSON object, credentials removed). Keeps new or undocumented fields instead of dropping them. |

> [accordion] Custom Fields
>
> Definitions of the custom fields of deals, people and organizations.
>
> Table: `custom_fields` · Primary key: `id` · Sync: Full table
>
> | Field | Type | Description |
> | :- | :- | :- |
> | `id` | Integer | Unique identifier of the custom field. |
> | `name` | String | Name of the custom field. |
> | `context` | String | Entity the custom field belongs to: deal, people or organization. |
> | `type` | String | Type of the custom field (text, selectbox, ...). |
> | `mask` | String | Input mask of the custom field. |
> | `options` | String (JSON) | Options of a selectbox custom field (JSON array). |
> | `show_card` | Integer | 1 when the field is shown on cards, 0 otherwise. |
> | `company_id` | Integer | Identifier of the Cubo CRM account (company) the record belongs to. |
> | `status` | String | Status of the record (active or deactivated). |
> | `created_at` | Datetime | Date and time the record was created in Cubo CRM. |
> | `updated_at` | Datetime | Date and time the record was last updated in Cubo CRM. |
> | `deleted_at` | Datetime | Date and time the record was soft-deleted in Cubo CRM, when the API still lists it. |
> | `extra_fields` | String (JSON) | Fields Cubo CRM returned for this record that have no column of their own (JSON object, credentials removed). Keeps new or undocumented fields instead of dropping them. |

> [accordion] Lost Reasons
>
> Reasons a deal can be marked as lost.
>
> Table: `lost_reasons` · Primary key: `id` · Sync: Full table
>
> | Field | Type | Description |
> | :- | :- | :- |
> | `id` | Integer | Unique identifier of the lost reason. |
> | `reason` | String | Text of the lost reason. |
> | `company_id` | Integer | Identifier of the Cubo CRM account (company) the record belongs to. |
> | `status` | String | Status of the record (active or deactivated). |
> | `created_at` | Datetime | Date and time the record was created in Cubo CRM. |
> | `updated_at` | Datetime | Date and time the record was last updated in Cubo CRM. |
> | `deleted_at` | Datetime | Date and time the record was soft-deleted in Cubo CRM, when the API still lists it. |
> | `extra_fields` | String (JSON) | Fields Cubo CRM returned for this record that have no column of their own (JSON object, credentials removed). Keeps new or undocumented fields instead of dropping them. |

> [accordion] Users
>
> Users of the Cubo CRM account.
>
> Table: `users` · Primary key: `id` · Sync: Full table
>
> | Field | Type | Description |
> | :- | :- | :- |
> | `id` | Integer | Unique identifier of the user. |
> | `name` | String | Name of the user. |
> | `email` | String | E-mail address of the user. |
> | `phone` | String | Phone number of the user. |
> | `type` | String | Type of the user: administrator or user. |
> | `status` | String | Status of the record (active or deactivated). |
> | `picture` | String | URL of the user's picture. |
> | `company_id` | Integer | Identifier of the Cubo CRM account (company) the record belongs to. |
> | `default_pipe` | Integer | Identifier of the user's default funnel. |
> | `send_notification_whatsapp` | Boolean | Whether the user receives notifications on WhatsApp. |
> | `manychat_contact_id` | Integer | Identifier of the user's ManyChat contact. |
> | `messages_at_once` | Integer | How many WhatsApp queue messages the user sends at once. |
> | `created_at` | Datetime | Date and time the record was created in Cubo CRM. |
> | `updated_at` | Datetime | Date and time the record was last updated in Cubo CRM. |
> | `extra_fields` | String (JSON) | Fields Cubo CRM returned for this record that have no column of their own (JSON object, credentials removed). Keeps new or undocumented fields instead of dropping them. |

> [accordion] Company
>
> The Cubo CRM account (company) itself: one row.
>
> Table: `companies` · Primary key: `id` · Sync: Full table
>
> | Field | Type | Description |
> | :- | :- | :- |
> | `id` | Integer | Unique identifier of the Cubo CRM account (company). |
> | `name` | String | Name of the company. |
> | `status` | String | Status of the record (active or deactivated). |
> | `segment` | String | Business segment of the company. |
> | `user_limit` | Integer | Maximum number of users of the account. |
> | `completed_onboarding` | Integer | 1 when the account finished Cubo's onboarding, 0 otherwise. |
> | `onboarding_step` | Integer | Current onboarding step of the account. |
> | `smtp_host` | String | SMTP host configured for sending e-mail. |
> | `smtp_port` | Integer | SMTP port configured for sending e-mail. |
> | `created_at` | Datetime | Date and time the record was created in Cubo CRM. |
> | `updated_at` | Datetime | Date and time the record was last updated in Cubo CRM. |
> | `extra_fields` | String (JSON) | Fields Cubo CRM returned for this record that have no column of their own (JSON object, credentials removed). Keeps new or undocumented fields instead of dropping them. |

> [accordion] Domains
>
> Domains used by the account's landing pages.
>
> Table: `domains` · Primary key: `id` · Sync: Full table
>
> | Field | Type | Description |
> | :- | :- | :- |
> | `id` | Integer | Unique identifier of the domain. |
> | `domain` | String | Domain name used by the account's landing pages. |
> | `company_id` | Integer | Identifier of the Cubo CRM account (company) the record belongs to. |
> | `status` | String | Status of the record (active or deactivated). |
> | `created_at` | Datetime | Date and time the record was created in Cubo CRM. |
> | `updated_at` | Datetime | Date and time the record was last updated in Cubo CRM. |
> | `extra_fields` | String (JSON) | Fields Cubo CRM returned for this record that have no column of their own (JSON object, credentials removed). Keeps new or undocumented fields instead of dropping them. |

> [accordion] Landing Pages
>
> Landing pages built in Cubo CRM.
>
> Table: `landings` · Primary key: `id` · Sync: Full table
>
> | Field | Type | Description |
> | :- | :- | :- |
> | `id` | Integer | Unique identifier of the landing page. |
> | `title` | String | Title of the landing page. |
> | `url` | String | Path or URL of the landing page. |
> | `domain_id` | Integer | Identifier of the domain the landing page is published on. |
> | `company_id` | Integer | Identifier of the Cubo CRM account (company) the record belongs to. |
> | `status` | String | Status of the landing page. |
> | `gtm_code` | String | Google Tag Manager container code of the landing page. |
> | `pixel_code` | String | Meta (Facebook) pixel code of the landing page. |
> | `ua_code` | String | Google Analytics (Universal Analytics) code of the landing page. |
> | `ga4_code` | String | Google Analytics 4 code of the landing page. |
> | `created_at` | Datetime | Date and time the record was created in Cubo CRM. |
> | `updated_at` | Datetime | Date and time the record was last updated in Cubo CRM. |
> | `extra_fields` | String (JSON) | Fields Cubo CRM returned for this record that have no column of their own (JSON object, credentials removed). Keeps new or undocumented fields instead of dropping them. |

> [accordion] Message Templates
>
> E-mail and WhatsApp message templates.
>
> Table: `templates` · Primary key: `id` · Sync: Full table
>
> | Field | Type | Description |
> | :- | :- | :- |
> | `id` | Integer | Unique identifier of the message template. |
> | `name` | String | Name of the template. |
> | `type` | String | Channel of the template: email or whatsapp. |
> | `subject` | String | Subject of an e-mail template. |
> | `body` | String | Body of the template, with Cubo placeholders such as `{{people.name}}`. |
> | `pipe_id` | Integer | Identifier of the funnel the template belongs to. |
> | `created_at` | Datetime | Date and time the record was created in Cubo CRM. |
> | `updated_at` | Datetime | Date and time the record was last updated in Cubo CRM. |
> | `extra_fields` | String (JSON) | Fields Cubo CRM returned for this record that have no column of their own (JSON object, credentials removed). Keeps new or undocumented fields instead of dropping them. |

> [accordion] Saved Filters
>
> Saved filters of the funnels.
>
> Table: `filters` · Primary key: `id` · Sync: Full table
>
> | Field | Type | Description |
> | :- | :- | :- |
> | `id` | Integer | Unique identifier of the saved filter. |
> | `name` | String | Name of the saved filter. |
> | `link` | String | Link (query) of the saved filter. |
> | `pipe_id` | Integer | Identifier of the funnel the filter belongs to. |
> | `user_id` | Integer | Identifier of the user who saved the filter. |
> | `company_id` | Integer | Identifier of the Cubo CRM account (company) the record belongs to. |
> | `created_at` | Datetime | Date and time the record was created in Cubo CRM. |
> | `updated_at` | Datetime | Date and time the record was last updated in Cubo CRM. |
> | `extra_fields` | String (JSON) | Fields Cubo CRM returned for this record that have no column of their own (JSON object, credentials removed). Keeps new or undocumented fields instead of dropping them. |

> [accordion] WhatsApp Queues
>
> WhatsApp message queues (bulk sends).
>
> Table: `whatsapp_queues` · Primary key: `id` · Sync: Full table
>
> | Field | Type | Description |
> | :- | :- | :- |
> | `id` | Integer | Unique identifier of the WhatsApp message queue. |
> | `title` | String | Title of the queue. |
> | `status` | String | Status of the queue (queue, processing, sent, error). |
> | `message` | String | Message text sent by the queue. |
> | `template_id` | Integer | Identifier of the message template used. |
> | `pipe_id` | Integer | Identifier of the funnel the queue targets. |
> | `stage_id` | Integer | Identifier of the stage the queue targets. |
> | `filter_id` | Integer | Identifier of the saved filter the queue targets. |
> | `deal_id` | Integer | Identifier of the deal the queue targets. |
> | `user_id` | Integer | Identifier of the user who created the queue. |
> | `company_id` | Integer | Identifier of the Cubo CRM account (company) the record belongs to. |
> | `created_at` | Datetime | Date and time the record was created in Cubo CRM. |
> | `updated_at` | Datetime | Date and time the record was last updated in Cubo CRM. |
> | `extra_fields` | String (JSON) | Fields Cubo CRM returned for this record that have no column of their own (JSON object, credentials removed). Keeps new or undocumented fields instead of dropping them. |

## Implementation Notes

### Custom fields

Custom field values come in two shapes, so you can use whichever is easier:

* **`custom_field_values` table**: one row per value, with `entity_type` (`deal`, `people` or `organization`), `entity_id`, `custom_field_id`, `custom_field_name` and `value`. Join it to Deals, People or Organizations on `entity_id`, or pivot it by `custom_field_name`.
* **`custom_fields` column** on Deals, People and Organizations: a JSON array with the same values for that record.

The definitions of the fields (type, options, whether they are active) are in the Custom Fields table.

### Data Quality Considerations

* **Every table is a snapshot.** Each sync replaces the tables with what Cubo CRM returns at that moment. Records deleted in Cubo CRM disappear from the tables on the next sync.
* **A table is never half updated.** The connector reads all the data of a table before writing any of it. If Cubo CRM fails or refuses part of a table, that table keeps its previous content and the sync shows it as failed.
* **Changes during the sync.** Records created while a table is being read are simply included. Records deleted while a table is being read could make the connector skip another record, so the connector checks for deletions: it compares the number of records at the start and at the end with the records created in between (new records have higher IDs) and, when it finds a deletion, reads that table again, up to three times. When Cubo CRM does not let the connector confirm the highest ID before reading, the connector reads the table twice and only accepts it when both reads return exactly the same records. If the data keeps changing, that table is not updated in this sync and the next sync tries again.
* **A large drop is reported.** If Deals, People or Organizations come back with less than half of the records of the previous sync (when it had at least 100), the table is still updated, but the sync log warns with both counts. If you did not delete those records, check whether the API key was replaced by one of a regular user.
* **A table that suddenly comes back empty is not emptied.** If Cubo CRM returns no rows for a table that had rows in the previous sync, the sync fails for that table instead of emptying it. If the data really was removed in Cubo CRM, run a full sync of the source to accept the empty table.
* **Annotations and custom field values** come from inside each deal, person and organization, because Cubo CRM has no separate list for them. They contain what Cubo CRM returns with those records.
* **Credentials are never loaded.** Cubo CRM includes some access tokens and passwords inside its answers (for example in the users embedded in deals, and in the company settings). The connector removes every field whose name looks like a credential (password, token, API key, authorization, session, cookie, signature and similar), the same way in every table and inside JSON columns. The values of your records are never changed.
* **Dates** are loaded as Cubo CRM sends them (Brasília time, `-03:00`). Dates written as day/month/year are read day first. A date in a format the connector does not know is left empty and kept as text in `extra_fields` (`<column>_raw`).
* **Values** such as `price` are loaded as exact numbers.

### API Limits & Performance

* Cubo CRM does not publish a request limit. The connector makes at most about 4 requests per second and, when Cubo CRM asks it to slow down, waits as long as Cubo CRM says.
* Lists are read 100 records per request. An account with 20,000 deals needs about 200 requests for the Deals table. Annotations and Custom Field Values reuse the pages of Deals, People and Organizations when those tables are selected, so selecting them together costs no extra requests.

## Troubleshooting

| Error or symptom | What it means | What to do |
| :- | :- | :- |
| "Cubo CRM rejected the API key of this source" | The key is wrong, was revoked, or its user was deactivated. | Create a new key in Cubo CRM (Meu Perfil > Chaves API) and update the source. |
| "Cubo CRM refused access to these tables" | The user who created the key cannot see those tables. They were skipped; the others were loaded. | Create the key with an administrator user, or deselect the skipped tables. |
| "Cubo CRM refused every request of this sync" | Cubo CRM denied access to everything the sync asked for. | Check that the key belongs to an active user of the account. |
| "The Cubo CRM API key of this source belongs to a regular user" or deals, people or activities seem to be missing | The key was created by a regular user, who only sees their own records. | Create the key with an administrator user and update the source. |
| "... has N records in this sync, against M in the previous one" | The table lost more than half of its records since the previous sync. | If the records were not deleted in Cubo CRM, check that the API key belongs to an administrator user. |
| "The ... data kept changing in Cubo CRM while it was being read" | Records were deleted while the table was being read, three times in a row. The table was kept as it was. | Usually temporary; the next sync tries again. |
| "Cubo CRM returned no ... records at all, although the previous sync read N" | Cubo CRM returned an empty list for a table that had rows. The table was kept. | If the data really was removed, run a full sync of the source. Otherwise run the sync again later. |
| "Could not reach Cubo CRM" or "Cubo CRM kept failing" | Cubo CRM did not answer, or answered with errors, after several attempts. | Usually temporary; the next sync tries again. |
| "Cubo CRM answered ... in a format this connector does not recognize" | The Cubo CRM API changed. | Contact Nekt support. |

## Skills for agents

<Snippet file="agent-skills-intro.mdx" />

> [card] [Download Cubo CRM skills file](https://docs.nekt.com/sources/cubo-crm.md)
>
> Cubo CRM connector documentation as plain markdown, for use in AI agent contexts.


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