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

# HelenaCRM as a data source

> Bring data from HelenaCRM to Nekt.

HelenaCRM is a Brazilian CRM and customer engagement platform that combines contact management, sales pipelines, and multi-channel messaging (WhatsApp, chat) for businesses managing customer relationships.

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

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

### 1. Add account access

You'll need to provide your HelenaCRM Bearer token. To generate it, go to **Ajustes > Integrações > Integração via API** in your HelenaCRM account.

The following configurations are available:

* **API Key**: Your HelenaCRM Bearer token (required).

* **Start Date**: The earliest date from which records will be synced (advanced setting).

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.

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, and the type of sync.

* **Layer**: choose between the existing layers on your catalog.
* **Folder**: a folder can be created inside the selected layer to group all tables.
* **Table name**: a name is suggested, but feel free to customize it. You can add a **prefix** to all tables at once.
* **Sync Type**: you can choose between INCREMENTAL and FULL\_TABLE.
  * Incremental: only new or updated data is fetched each run.
  * Full table: the current state of the data is fetched each run.

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), consider how often you want data to be extracted from this source.

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

## 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                                                              |
| ------------- | --------------- | ------------------------------------------------------------------------ |
| Agents        | `agents`        | CRM agents/operators, including their profile and department membership. |
| Channels      | `channels`      | Messaging channels (e.g. WhatsApp) connected to the account.             |
| Contacts      | `contacts`      | Contacts, with tags, portfolios, custom fields and origin data.          |
| Custom fields | `custom_fields` | Definitions of custom fields configured in the account.                  |
| Departments   | `departments`   | Departments, including their agents, channels and distribution config.   |
| Office hours  | `office_hours`  | Business/office hours configuration and offline responses.               |
| Portfolios    | `portfolios`    | Contact portfolios (groupings).                                          |
| Tags          | `tags`          | Tags available for labelling contacts.                                   |
| Templates     | `templates`     | Message templates (e.g. WhatsApp templates) and their status.            |

## Fields by stream

Below you'll find all available data streams from HelenaCRM and their corresponding fields:

<AccordionGroup>
  <Accordion title="Agents">
    | Field                | Type             |
    | -------------------- | ---------------- |
    | id                   | string           |
    | createdAt            | datetime         |
    | updatedAt            | datetime         |
    | companyId            | string           |
    | userId               | string           |
    | name                 | string           |
    | email                | string           |
    | phoneNumber          | string           |
    | phoneNumberFormatted | string           |
    | profile              | string           |
    | isOwner              | boolean          |
    | availability         | string           |
    | departments          | array of objects |
  </Accordion>

  <Accordion title="Channels">
    | Field           | Type     |
    | --------------- | -------- |
    | id              | string   |
    | createdAt       | datetime |
    | updatedAt       | datetime |
    | active          | boolean  |
    | type            | string   |
    | number          | string   |
    | numberFormatted | string   |
    | identity        | object   |
  </Accordion>

  <Accordion title="Contacts">
    | Field                | Type             |
    | -------------------- | ---------------- |
    | id                   | string           |
    | createdAt            | datetime         |
    | updatedAt            | datetime         |
    | companyId            | string           |
    | name                 | string           |
    | nameWhatsapp         | string           |
    | nameInstagram        | string           |
    | nameMessenger        | string           |
    | phoneNumber          | string           |
    | phoneNumberFormatted | string           |
    | email                | string           |
    | instagram            | string           |
    | messengerId          | string           |
    | annotation           | string           |
    | tagIds               | array of strings |
    | tagNames             | array of strings |
    | status               | string           |
    | origin               | string           |
    | importedAt           | datetime         |
    | utm                  | string (JSON)    |
    | customFields         | string (JSON)    |
    | portfolioIds         | array of strings |
    | portfolioNames       | array of strings |
    | metadata             | string (JSON)    |
  </Accordion>

  <Accordion title="Custom Fields">
    | Field        | Type          |
    | ------------ | ------------- |
    | id           | string        |
    | createdAt    | datetime      |
    | updatedAt    | datetime      |
    | parentId     | string        |
    | type         | string        |
    | entityType   | string        |
    | scopeId      | string        |
    | companyId    | string        |
    | name         | string        |
    | key          | string        |
    | position     | integer       |
    | required     | boolean       |
    | visible      | boolean       |
    | isValueRange | boolean       |
    | options      | string (JSON) |
    | children     | string (JSON) |
  </Accordion>

  <Accordion title="Departments">
    | Field                | Type             |
    | -------------------- | ---------------- |
    | id                   | string           |
    | companyId            | string           |
    | createdAt            | datetime         |
    | updatedAt            | datetime         |
    | name                 | string           |
    | isDefault            | boolean          |
    | distribuitionEnabled | boolean          |
    | restrictionType      | string           |
    | distributionConfig   | string (JSON)    |
    | directLinks          | string (JSON)    |
    | agents               | array of objects |
    | channels             | array of objects |
  </Accordion>

  <Accordion title="Office Hours">
    | Field           | Type             |
    | --------------- | ---------------- |
    | limitHours      | boolean          |
    | offlineResponse | string           |
    | timezoneDiff    | number           |
    | days            | array of objects |
  </Accordion>

  <Accordion title="Portfolios">
    | Field       | Type     |
    | ----------- | -------- |
    | id          | string   |
    | name        | string   |
    | description | string   |
    | createdAt   | datetime |
    | updatedAt   | datetime |
  </Accordion>

  <Accordion title="Tags">
    | Field     | Type     |
    | --------- | -------- |
    | id        | string   |
    | createdAt | datetime |
    | updatedAt | datetime |
    | name      | string   |
    | bgColor   | string   |
    | textColor | string   |
  </Accordion>

  <Accordion title="Templates">
    | Field               | Type          |
    | ------------------- | ------------- |
    | id                  | string        |
    | createdAt           | datetime      |
    | updatedAt           | datetime      |
    | active              | boolean       |
    | archived            | boolean       |
    | channelId           | string        |
    | name                | string        |
    | text                | string        |
    | footerText          | string        |
    | status              | string        |
    | channelType         | string        |
    | type                | string        |
    | params              | string (JSON) |
    | internalName        | string        |
    | fileType            | string        |
    | quickReplyAlias     | string        |
    | rejectedDescription | string        |
    | categoryId          | string        |
    | categoryName        | string        |
  </Accordion>
</AccordionGroup>
