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

# Syncro as a data source

> Bring data from Syncro to your Lakehouse.

Syncro is a Brazilian CRM for commercial automation, with sales pipelines, WhatsApp messaging, tasks, and nurture sequences. The connector uses the Syncro public API to extract your leads (deals) with their products, contacts, notes, sales, and tasks, along with your pipelines and stages, lost reasons, custom fields, nurture sequences, and users. With it you can analyze your funnel, your conversion, and your team's performance in your Lakehouse.

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

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

### 1. Add account access

The connector authenticates with a Syncro **API key**. To create one:

<Steps>
  <Step title="Open the API Keys page">
    In Syncro, go to **Configurações → API Keys**.
  </Step>

  <Step title="Create a key">
    Click **Nova API Key**, give it a name (for example, "Nekt"), and confirm.
  </Step>

  <Step title="Copy the key">
    Copy the key right away. It starts with `crm_`, and Syncro shows it only once. If you lose it, delete it and create a new one.
  </Step>
</Steps>

<Note>
  A new key has access to everything the connector reads. If you restrict the key's permissions, keep the read permission of every stream you select (for example, `leads:read` for leads and `tasks:read` for tasks); otherwise the sync stops and names the missing permission.
</Note>

The following configurations are available:

* **API Key**: the Syncro API key. Required.

* **Start Date** (advanced): the earliest last-update date of the leads read on the first sync. Later syncs continue from where the previous one stopped. Leave it empty to read every lead. Tasks, pipelines, and the other lists are always extracted in full.

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**: leads are INCREMENTAL: each sync brings the leads changed since the previous one. The other streams are FULL\_TABLE: each sync replaces the table with what Syncro currently holds. Read more about Sync Types [here](https://docs.nekt.com/get-started/core-concepts/types-of-sync).

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/get-started/core-concepts/triggers), 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).

Optionally, you can define some additional settings:

* 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).

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.</Warning>

# Streams and Fields

Below you'll find all available data streams from Syncro and their corresponding fields. API reference: [Syncro API](https://docs.syncro.chat/pt-BR).

<Note>
  Lists and objects (such as the products, contacts, and sales of a lead) are stored as JSON text. Syncro allows 60 requests per minute per API key, shared with any other integration that uses the same key; the connector stays below that and, when Syncro asks it to slow down, waits and continues automatically.
</Note>

<AccordionGroup>
  <Accordion title="Leads">
    Leads (deals) of your CRM with their products, contacts, notes, won and lost sales, tasks, nurture sequences and score. Incremental: each sync reads the leads changed since the previous one (from one day before, as Syncro filters by date).

    Table: `leads` · Primary key: `id` · Sync: Incremental · Replication key: `synced_at`

    | Field | Type | Description |
    | :- | :- | :- |
    | `id` | Integer | Unique identifier of the lead. |
    | `name` | String | Name of the lead (contact or deal). |
    | `phone` | String | Phone number of the lead. |
    | `email` | String | Email address of the lead. |
    | `company` | String | Company of the lead. |
    | `birthday` | Date | Birthday of the lead. |
    | `value` | Number | Monetary value of the deal. |
    | `source` | String | Source the lead came from (e.g. site, form). |
    | `tags` | Array of strings | Names of the tags on the lead. |
    | `pipeline_id` | Integer | Identifier of the pipeline of the lead. |
    | `pipeline_name` | String | Name of the pipeline. |
    | `stage_id` | Integer | Identifier of the pipeline stage the lead is in. |
    | `stage_name` | String | Name of the current stage. |
    | `notes` | String | Free-text notes of the lead. |
    | `utm_source` | String | UTM source of the lead. |
    | `utm_medium` | String | UTM medium of the lead. |
    | `utm_campaign` | String | UTM campaign of the lead. |
    | `utm_term` | String | UTM term of the lead. |
    | `utm_content` | String | UTM content of the lead. |
    | `created_at` | Datetime | When the lead was created. |
    | `custom_fields` | String (JSON) | Custom field values of the lead (JSON object keyed by the custom field name; see the custom\_fields stream). |
    | `assigned_to` | Integer | Identifier of the user who owns the lead (see the users stream). |
    | `owner_name` | String | Name of the owner of the lead. |
    | `owner_email` | String | Email of the owner of the lead. |
    | `products` | String (JSON) | Products of the deal (JSON array of `{id, product_id, product_name, quantity, unit_price, discount_percent, total}`). |
    | `contacts` | String (JSON) | Contacts linked to the lead (JSON array of `{id, name, role, phone, email, is_primary}`). |
    | `notes_list` | String (JSON) | Notes posted on the lead (JSON array of `{id, body, author, created_at}`). |
    | `sales` | String (JSON) | Sales won from the lead (JSON array of `{id, pipeline_id, value, closed_by, closed_at}`). |
    | `lost_sales` | String (JSON) | Losses recorded on the lead (JSON array of `{id, pipeline_id, reason_id, lost_at, lost_by}`; reason\_id refers to the lost\_reasons stream). |
    | `tasks` | String (JSON) | Tasks of the lead (JSON array of `{id, subject, type, status, priority, due_date, due_time, completed_at, assigned_to}`; also in the tasks stream). |
    | `active_sequence` | String (JSON) | Nurture sequence the lead is currently in (JSON object `{id, name, current_step, total_steps, status}`). |
    | `sequences` | String (JSON) | Nurture sequences the lead was enrolled in (JSON array of `{id, sequence_id, name, status, next_step_at}`). |
    | `score` | Integer | Lead score. |
    | `score_updated_at` | Datetime | When the lead score last changed. |
    | `synced_at` | Datetime | When the sync that read this version of the lead started (UTC), used as the incremental replication key. |
  </Accordion>

  <Accordion title="Tasks">
    Tasks of your team, linked to a lead or standalone. Extracted in full on every sync.

    Table: `tasks` · Primary key: `id` · Sync: Full table

    | Field | Type | Description |
    | :- | :- | :- |
    | `id` | Integer | Unique identifier of the task. |
    | `subject` | String | Subject (title) of the task. |
    | `description` | String | Description of the task. |
    | `type` | String | Type of the task: call, email, task, visit, whatsapp or meeting. |
    | `status` | String | Status of the task: pending or completed. |
    | `priority` | String | Priority of the task: low, medium or high. |
    | `due_date` | Date | Date the task is due. |
    | `due_time` | String | Time of day the task is due (HH:MM). |
    | `completed_at` | Datetime | When the task was completed. |
    | `lead_id` | Integer | Identifier of the lead the task belongs to; empty for standalone tasks. |
    | `lead_name` | String | Name of the lead of the task. |
    | `assigned_to` | Integer | Identifier of the user the task is assigned to (see the users stream). |
    | `assigned_user_name` | String | Name of the user the task is assigned to. |
    | `notes` | String | Notes of the task. |
    | `is_overdue` | Boolean | Whether the task is past its due date. |
    | `created_at` | Datetime | When the task was created. |
    | `updated_at` | Datetime | When the task was last updated. |
  </Accordion>

  <Accordion title="Pipelines">
    Sales pipelines (funnels) of the account. Extracted in full on every sync.

    Table: `pipelines` · Primary key: `id` · Sync: Full table

    | Field | Type | Description |
    | :- | :- | :- |
    | `id` | Integer | Unique identifier of the pipeline. |
    | `name` | String | Name of the pipeline. |
    | `stages_count` | Integer | Number of stages in the pipeline. |
  </Accordion>

  <Accordion title="Pipeline Stages">
    Stages of every pipeline, in pipeline order, with the flags that mark won and lost stages. Use it to name the `stage_id` of leads. Extracted in full on every sync.

    Table: `pipeline_stages` · Primary key: `id` · Sync: Full table

    | Field | Type | Description |
    | :- | :- | :- |
    | `id` | Integer | Unique identifier of the stage. |
    | `pipeline_id` | Integer | Identifier of the pipeline of the stage. |
    | `pipeline_name` | String | Name of the pipeline. |
    | `name` | String | Name of the stage. |
    | `position` | Integer | Order of the stage within its pipeline, starting at 1. |
    | `color` | String | Display color of the stage (hex). |
    | `is_won` | Boolean | Whether the stage marks the deal as won. |
    | `is_lost` | Boolean | Whether the stage marks the deal as lost. |
  </Accordion>

  <Accordion title="Lost Reasons">
    Reasons a deal can be marked as lost; `reason_id` in the lost sales of a lead refers to this list. Extracted in full on every sync.

    Table: `lost_reasons` · Primary key: `id` · Sync: Full table

    | Field | Type | Description |
    | :- | :- | :- |
    | `id` | Integer | Unique identifier of the lost reason. |
    | `name` | String | Description of the lost reason. |
  </Accordion>

  <Accordion title="Custom Fields">
    Definitions of the lead custom fields, active or not. Their `name` is the key used in the `custom_fields` column of the leads table. Extracted in full on every sync.

    Table: `custom_fields` · Primary key: `id` · Sync: Full table

    | Field | Type | Description |
    | :- | :- | :- |
    | `id` | Integer | Unique identifier of the custom field. |
    | `name` | String | Key of the field in the custom\_fields column of the leads stream. |
    | `label` | String | Label of the field shown in Syncro. |
    | `field_type` | String | Type of the field (e.g. text, select). |
    | `options` | String (JSON) | Allowed options of a selection field (JSON array). |
    | `is_required` | Boolean | Whether the field is mandatory. |
    | `is_active` | Boolean | Whether the field is active. |
    | `show_on_card` | Boolean | Whether the field is shown on the lead card. |
    | `sort_order` | Integer | Display order of the field. |
  </Accordion>

  <Accordion title="Nurture Sequences">
    Nurture sequences (automated message cadences), active or not. Extracted in full on every sync.

    Table: `nurture_sequences` · Primary key: `id` · Sync: Full table

    | Field | Type | Description |
    | :- | :- | :- |
    | `id` | Integer | Unique identifier of the sequence. |
    | `name` | String | Name of the sequence. |
    | `description` | String | Description of the sequence. |
    | `channel` | String | Channel the sequence sends on (e.g. email). |
    | `is_active` | Boolean | Whether the sequence is active. |
    | `steps_count` | Integer | Number of steps in the sequence. |
    | `stats_enrolled` | Integer | Number of leads enrolled in the sequence. |
  </Accordion>

  <Accordion title="Users">
    Users of your Syncro account. Extracted in full on every sync.

    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 | Email address of the user. |
    | `role` | String | Role of the user (e.g. admin, manager). |
  </Accordion>

  <Accordion title="Account">
    The Syncro account the API key belongs to (one row). Extracted in full on every sync.

    Table: `account` · Primary key: `id` · Sync: Full table

    | Field | Type | Description |
    | :- | :- | :- |
    | `id` | Integer | Unique identifier of the account. |
    | `name` | String | Name of the account (company). |
    | `plan` | String | Syncro plan of the account. |
  </Accordion>
</AccordionGroup>


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