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

# Z-Pro as a data source

> Bring data from Z-Pro to Nekt.

Z-Pro is a WhatsApp-based customer service and communication platform that helps businesses manage conversations, tickets, contacts, and team workflows through the WhatsApp Business API.

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

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

### 1. Add account access

You'll need the following credentials from your Z-Pro instance:

* **Base URL**: The API base URL of your Z-Pro instance (e.g. `api.yourdomain.com`).

* **Token**: The Bearer token for API authentication. This can be found under Settings > API on your Z-Pro instance.

* **App ID**: The application ID for your Z-Pro instance.

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

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.

> 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, 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 being created from this new data source.
* **Table name**: a name is suggested, but feel free to customize it. You can add a **prefix** to all tables at once.
* **Sync Type**: choose between INCREMENTAL and FULL\_TABLE.

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

Below you'll find all available data streams from Z-Pro and their corresponding fields:

<AccordionGroup>
  <Accordion title="Channels">
    List of all WhatsApp channels configured in the Z-Pro instance.

    | Field     | Type     |
    | --------- | -------- |
    | id        | integer  |
    | name      | string   |
    | type      | string   |
    | status    | string   |
    | number    | string   |
    | tokenAPI  | string   |
    | wabaId    | string   |
    | isActive  | boolean  |
    | createdAt | datetime |
    | updatedAt | datetime |
  </Accordion>

  <Accordion title="Sessions">
    List of all WhatsApp sessions.

    | Field     | Type     |
    | --------- | -------- |
    | id        | integer  |
    | name      | string   |
    | type      | string   |
    | status    | string   |
    | number    | string   |
    | tokenAPI  | string   |
    | wabaId    | string   |
    | isActive  | boolean  |
    | qrcode    | string   |
    | retries   | integer  |
    | createdAt | datetime |
    | updatedAt | datetime |
  </Accordion>

  <Accordion title="Tags">
    List of all tags used to categorize tickets and contacts.

    | Field     | Type     |
    | --------- | -------- |
    | id        | integer  |
    | tag       | string   |
    | color     | string   |
    | isActive  | boolean  |
    | userId    | integer  |
    | tenantId  | integer  |
    | createdAt | datetime |
    | updatedAt | datetime |
  </Accordion>

  <Accordion title="Queues">
    List of all service queues for ticket routing.

    | Field                | Type     |
    | -------------------- | -------- |
    | id                   | integer  |
    | queue                | string   |
    | isActive             | boolean  |
    | businessHours        | array    |
    | messageBusinessHours | string   |
    | userId               | integer  |
    | tenantId             | integer  |
    | createdAt            | datetime |
    | updatedAt            | datetime |
  </Accordion>

  <Accordion title="Users">
    List of all users (agents/admins) in the platform.

    | Field           | Type     |
    | --------------- | -------- |
    | id              | integer  |
    | name            | string   |
    | email           | string   |
    | profile         | string   |
    | blockWavoip     | boolean  |
    | menuPermissions | object   |
    | isOnline        | boolean  |
    | sipEnabled      | boolean  |
    | sipStatus       | string   |
    | sipUsername     | string   |
    | sipPassword     | string   |
    | sipServer       | string   |
    | sipPort         | integer  |
    | sipTransport    | string   |
    | businessHours   | array    |
    | createdAt       | datetime |
    | updatedAt       | datetime |
  </Accordion>

  <Accordion title="Tickets">
    All tickets (conversations) across open, pending, and closed statuses.

    | Field               | Type     |
    | ------------------- | -------- |
    | id                  | integer  |
    | status              | string   |
    | unreadMessages      | integer  |
    | lastMessage         | string   |
    | channel             | string   |
    | answered            | boolean  |
    | isGroup             | boolean  |
    | createdAt           | datetime |
    | updatedAt           | datetime |
    | lastMessageAt       | string   |
    | lastMessageReceived | string   |
    | userId              | integer  |
    | contactId           | integer  |
    | whatsappId          | integer  |
    | chatFlowId          | integer  |
    | queueId             | integer  |
    | tenantId            | integer  |
    | reasons             | string   |
    | value               | string   |
    | name                | string   |
    | kanban              | string   |
    | username            | string   |
    | queue               | string   |
    | whatsapp            | object   |
    | tags                | array    |
  </Accordion>

  <Accordion title="Messages">
    All messages for each ticket. This is a child stream of Tickets.

    | Field            | Type     |
    | ---------------- | -------- |
    | id               | string   |
    | messageId        | string   |
    | ack              | integer  |
    | status           | string   |
    | read             | boolean  |
    | fromMe           | boolean  |
    | body             | string   |
    | mediaName        | string   |
    | mediaUrl         | string   |
    | mediaType        | string   |
    | reaction         | string   |
    | isSticker        | boolean  |
    | templateName     | string   |
    | templateLanguage | string   |
    | isDeleted        | boolean  |
    | sendAttempts     | integer  |
    | createdAt        | datetime |
    | updatedAt        | datetime |
    | ticketId         | integer  |
    | queueId          | integer  |
    | contactId        | integer  |
    | timestamp        | string   |
    | userId           | integer  |
    | tenantId         | integer  |
  </Accordion>

  <Accordion title="Contacts">
    All contacts in the platform.

    | Field          | Type     |
    | -------------- | -------- |
    | id             | integer  |
    | name           | string   |
    | number         | string   |
    | email          | string   |
    | profilePicUrl  | string   |
    | pushname       | string   |
    | isUser         | boolean  |
    | isWAContact    | boolean  |
    | isGroup        | boolean  |
    | blocked        | boolean  |
    | chatbotBlocked | boolean  |
    | tenantId       | integer  |
    | cpf            | string   |
    | firstName      | string   |
    | lastName       | string   |
    | businessName   | string   |
    | birthdayDate   | string   |
    | createdAt      | datetime |
    | updatedAt      | datetime |
    | walletId       | integer  |
    | wallet         | string   |
    | tags           | array    |
  </Accordion>

  <Accordion title="Opportunities">
    List of all sales opportunities in the CRM pipeline.

    | Field       | Type     |
    | ----------- | -------- |
    | id          | integer  |
    | title       | string   |
    | status      | string   |
    | value       | number   |
    | pipelineId  | integer  |
    | stageId     | integer  |
    | contactId   | integer  |
    | userId      | integer  |
    | tenantId    | integer  |
    | description | string   |
    | closedAt    | datetime |
    | createdAt   | datetime |
    | updatedAt   | datetime |
  </Accordion>
</AccordionGroup>
