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

# JustCall as a data source

> Bring your JustCall calls, SMS, users, user groups, phone numbers, contacts and SMS tags to Nekt.

JustCall is a cloud phone system for sales and support teams: calls, SMS, IVR, queues and call analytics on business phone numbers. This connector reads your JustCall account through the JustCall REST API (v2.1) and brings the calls made and received (with duration, outcome, notes, disposition and, optionally, queue and JustCall AI data), the SMS, and the account's users, user groups (teams), phone numbers, contacts and SMS tags.

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

> [!WARNING]
>
> **JustCall's API only returns the last 3 months of calls and SMS.** The first sync loads at most those 3 months, and older calls and SMS cannot be read through the API (JustCall support can export them once). Because of this, avoid running a **Full Sync** on the calls and SMS tables: a full sync replaces the table with the last 3 months and removes the older history that earlier syncs loaded. Keep these tables on **Incremental** and don't enable the **Additional Full Sync** for them.

## Configuring JustCall 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 JustCall 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 the **API Key** and **API Secret** of your JustCall account. API access is available on the JustCall **Team** plan and above.

**1. Open the API credentials page**

Sign in to JustCall, click your profile icon and open **APIs and Webhooks**.

**2. Copy the key and the secret**

Use the copy buttons next to **API Key** and **API Secret**.

**3. Paste them in Nekt**

Paste them in the **API Key** and **API Secret** fields.

The following configurations are available:

* **API Key**: the API Key of your JustCall account.
* **API Secret**: the API Secret shown next to the API Key. If you reset the pair in JustCall ("Reset API key and secret pair"), update both here.
* **Start Date**: the earliest call and SMS read on the first sync. An empty field, or a date more than 3 months ago, reads the 3 months JustCall keeps.
* **Look-back (minutes)** (advanced): each sync reads calls and SMS again from this many minutes before the last one already loaded, to pick up calls that reach JustCall late and later changes such as notes, disposition, rating and AI analysis. Changes made after this window are not picked up. A longer window reads more calls again on every sync. Default: 1440 (one day).
* **Fetch queue data** (advanced): fills the `queue_callback` column of calls with the queue callback details. Default: off.
* **Fetch AI data** (advanced): fills the `justcall_ai` column of calls with the JustCall AI analysis (score, summary, sentiment, moments and tags). Needs JustCall AI in your account. Default: off.

> [!NOTE]
>
> JustCall limits API requests per account and per plan (for example, 1,800 an hour and 30 a minute on the Team plan), and every tool that uses the same API Key shares that limit. When the limit is reached, the sync waits for it to reset and continues by itself; the sync log says when it is pausing.

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.

> [!TIP]
>
> Calls and SMS are read incrementally by the time they happened, so you can schedule this source often (for example, every 30 or 60 minutes) to get new calls shortly after they end. Each sync also reads again the look-back window (one day by default, plus a few hours), using the JustCall API limit you share with your other tools: with a very high call volume, prefer a less frequent schedule or a shorter look-back. Keep the calls and SMS tables on **Incremental**: as **Full table** they would be replaced on every sync by the last 3 months JustCall keeps.

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

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).
* Determine when to execute an **Additional [Full Sync](https://docs.nekt.com/get-started/core-concepts/types-of-sync#additional-full-sync)**. For this source, don't enable it for the calls and SMS tables (see the warning at the top of this page).

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]
>
> Before reading any table, the connector checks that JustCall accepts the API Key and Secret and which tables it can read. Wrong credentials stop the sync with a message saying where to fix them. If JustCall refuses one table (HTTP 403, for example because your plan or account doesn't include that data), that table is skipped, the sync log names it, and the other tables keep syncing. If JustCall refuses every table, check that the account is on the Team plan or above.

## How calls and SMS are kept up to date

* Each sync reads the calls and SMS from the look-back window before the last one loaded until now, ordered by id, and merges them into the table by `id`. Calls that reach JustCall late and changes made shortly after a call (notes, disposition, rating, JustCall AI analysis, calls that were still in progress) are picked up while the call is inside that window.
* JustCall filters these lists in the time zone of your JustCall user, which the API does not report, so the connector always reads some extra hours back (up to about one day) to be safe. Those calls are read again and merged, never duplicated.
* If the source stops syncing for more than 3 months, the calls and SMS of the gap can no longer be read through the API: the next sync loads the 3 months JustCall keeps and says so in the log.
* Changes made to a call after the look-back window (by default, more than about one day after the call) are not picked up by incremental syncs. Increase **Look-back (minutes)** if your team edits calls later.
* Times: `call_datetime` and `sms_datetime` are in UTC. `call_date`/`call_time` (and `sms_date`/`sms_time`) are in UTC as JustCall sends them; `call_user_date`/`call_user_time` (and the SMS equivalents) are in the JustCall user's time zone.

## Fields by stream

> [!NOTE]
>
> Objects and lists of objects (for example, a call's `justcall_ai`, a user's `groups` or a contact's `notes`) are stored as **JSON strings**. Extract the fields you need in a [Query](https://docs.nekt.com/queries), for example `JSON_VALUE(justcall_ai, '$.call_summary')` in BigQuery. The most used fields of `call_info`, `call_duration`, `ivr_info` and `queue` are also split into their own columns.

### Calls and SMS

> [accordion] Calls
>
> Calls made and received on your JustCall numbers, with their duration, outcome and agent. Only the last 3 months are available through JustCall's API.
>
> Table: `calls` · Primary key: `id` · Sync: Incremental (`call_datetime`)
>
> | Field | Type | Description |
> | :- | :- | :- |
> | `id` | Integer | Unique id of the call, generated by JustCall. |
> | `call_sid` | String | Unique sid of the call, also sent by JustCall's webhook events. |
> | `call_datetime` | Datetime | When the call happened, in UTC; used as the incremental replication key. |
> | `call_date` | String | Date of the call in UTC (YYYY-MM-DD). |
> | `call_time` | String | Time of the call in UTC (HH:MM:SS). |
> | `call_user_date` | String | Date of the call in the JustCall user's time zone. |
> | `call_user_time` | String | Time of the call in the JustCall user's time zone. |
> | `contact_number` | String | Phone number of the contact. |
> | `contact_name` | String | Name of the contact. |
> | `contact_email` | String | Email of the contact. |
> | `justcall_number` | String | JustCall number used to make or receive the call. |
> | `justcall_line_name` | String | Name given to the JustCall line. |
> | `agent_id` | Integer | Id of the agent (JustCall user) who made or received the call. |
> | `agent_name` | String | Name of the agent. |
> | `agent_email` | String | Email of the agent. |
> | `agent_active` | String | Whether the agent is active in JustCall. |
> | `cost_incurred` | Number | Charge of the call, as reported by JustCall. |
> | `call_direction` | String | Incoming or outgoing. |
> | `call_type` | String | Outcome within the direction: Answered, Missed, Voicemail, Unanswered, Busy, Failed, In Progress and others. |
> | `call_status` | String | Archived or Unarchived. |
> | `disposition` | String | Call outcome (disposition code) the agent selected at the end of the call. |
> | `notes` | String | Notes taken during or after the call. |
> | `rating` | String | Rating the agent gave the call. |
> | `recording_url` | String | Link to the recording of the call. |
> | `recording_child_url` | String | Link to the child recording of the call. |
> | `missed_call_reason` | String | Why the call was missed, for missed calls. |
> | `voicemail_transcription` | String | Transcription of the voicemail left on the call. |
> | `call_traits` | Array of strings | Traits of the call (IVR, Queue, Callback, Forward, Transfer, Merge...). |
> | `total_duration` | Number | Duration in seconds: conversation time plus hold time. |
> | `conversation_time` | Number | Duration in seconds, without the hold time. |
> | `hold_time` | Number | Seconds the caller was on hold. |
> | `ring_time` | Number | Seconds the call rang before connecting. |
> | `queue_wait_time` | Number | Seconds the caller waited in the queue. |
> | `wrap_up_time` | Number | Seconds the agent spent on notes and disposition after the call. |
> | `handle_time` | Number | Total duration plus wrap-up time, in seconds. |
> | `friendly_duration` | String | Duration as hh:mm:ss. |
> | `ivr_digit_pressed` | String | IVR digit the caller pressed. |
> | `ivr_content` | String | What the pressed IVR digit does. |
> | `queue_entered_at_position` | String | Position the caller got when entering the queue. |
> | `queue_exit_reason` | String | Why the caller left the queue. |
> | `call_info` | String (JSON) | The call\_info object as JustCall sends it. |
> | `call_duration` | String (JSON) | The call\_duration object as JustCall sends it. |
> | `ivr_info` | String (JSON) | IVR details of the call. |
> | `queue` | String (JSON) | Queue details of the call. |
> | `queue_callback` | String (JSON) | Queue callback details (requested, attempted, reached and their times). Filled only with **Fetch queue data** on. |
> | `justcall_ai` | String (JSON) | JustCall AI analysis: call score and score parameters, summary, customer sentiment, moments and tags. Filled only with **Fetch AI data** on. |

> [accordion] SMS
>
> SMS and MMS sent and received on your JustCall numbers. Only the last 3 months are available through JustCall's API.
>
> Table: `sms` · Primary key: `id` · Sync: Incremental (`sms_datetime`)
>
> | Field | Type | Description |
> | :- | :- | :- |
> | `id` | Integer | Unique id of the SMS, generated by JustCall. |
> | `sms_datetime` | Datetime | When the SMS was sent or received, in UTC; used as the incremental replication key. |
> | `sms_date` | String | Date of the SMS in UTC (YYYY-MM-DD). |
> | `sms_time` | String | Time of the SMS in UTC (HH:MM:SS). |
> | `sms_user_date` | String | Date of the SMS in the JustCall user's time zone. |
> | `sms_user_time` | String | Time of the SMS in the JustCall user's time zone. |
> | `contact_number` | String | Phone number of the contact. |
> | `contact_name` | String | Name of the contact. |
> | `contact_email` | String | Email of the contact. |
> | `justcall_number` | String | JustCall number the SMS was sent from or received on. |
> | `justcall_line_name` | String | Name of the JustCall line. |
> | `agent_id` | Integer | Id of the agent who sent or received the SMS. |
> | `agent_name` | String | Name of the agent. |
> | `agent_email` | String | Email of the agent. |
> | `direction` | String | Inbound or outbound. |
> | `delivery_status` | String | Whether the SMS could be delivered. |
> | `medium` | String | Where the SMS was sent from: the app, the API or an automation. |
> | `is_deleted` | Boolean | True when the SMS was deleted in JustCall. |
> | `cost_incurred` | Number | Charge of the SMS, as reported by JustCall. |
> | `body` | String | Content of the SMS. |
> | `is_mms` | String | Whether the message is an MMS (Yes or No). |
> | `mms_media` | String (JSON) | Media files of an MMS, each with its content type and URL. |
> | `sms_info` | String (JSON) | The sms\_info object as JustCall sends it. |

### Account

> [accordion] Users
>
> Users (agents) of the JustCall account. Read in full on every sync.
>
> Table: `users` · Primary key: `id` · Sync: Full table
>
> | Field | Type | Description |
> | :- | :- | :- |
> | `id` | Integer | Unique id of the user; the `agent_id` of calls and SMS. |
> | `name` | String | Full name of the user. |
> | `email` | String | Email of the user. |
> | `extension` | Integer | Extension of the user. |
> | `role` | String | Role of the user (for example, Admin or Agent). |
> | `timezone` | String | Time zone set by the user. |
> | `available` | String | Whether the user was available when the sync ran (Yes or No). |
> | `on_call` | String | Whether the user was on a call when the sync ran (Yes or No). |
> | `unavailability_reason` | String | Latest reason given for being unavailable. |
> | `working_hours_type` | String | Type of working hours (for example, Always Open). |
> | `created_at` | Datetime | When the user was created, in UTC. |
> | `last_login_timestamp` | String | When the user last logged in, as JustCall sends it. |
> | `groups` | String (JSON) | User groups of the user, with group\_id and group\_name. |
> | `owned_numbers` | Array of strings | Phone numbers assigned only to this user. |
> | `shared_numbers` | Array of strings | Phone numbers shared with this user. |

> [accordion] User Groups
>
> User groups (teams) of the JustCall account. Read in full on every sync.
>
> Table: `user_groups` · Primary key: `id` · Sync: Full table
>
> | Field | Type | Description |
> | :- | :- | :- |
> | `id` | Integer | Unique id of the user group. |
> | `group_name` | String | Name of the user group. |
> | `group_extension` | String | Extension of the user group. |
> | `total_members` | Integer | Number of members. |
> | `updated_on` | Datetime | When the user group was last changed, in UTC. |
> | `members` | String (JSON) | Members, each with id, name, email, extension, role and time zone. |

> [accordion] Phone Numbers
>
> Phone numbers of the JustCall account. Read in full on every sync.
>
> Table: `phone_numbers` · Primary key: `id` · Sync: Full table
>
> | Field | Type | Description |
> | :- | :- | :- |
> | `id` | Integer | Unique id of the phone number. |
> | `justcall_number` | String | The JustCall phone number. |
> | `friendly_number` | String | The number formatted for reading. |
> | `justcall_line_name` | String | Name of the line. |
> | `number_type` | String | Local, mobile, national, toll free and others. |
> | `availability_setting` | String | Always Open, Always Closed or Custom Hours. |
> | `business_registration` | String | Whether the number is approved for calling. |
> | `current_status` | String | Availability of the number when the sync ran. |
> | `sms_compliance` | String | Whether the number is verified to send SMS and MMS (US and Canada). |
> | `capability_call` | String | Whether the number can make and receive calls. |
> | `capability_sms` | String | Whether the number can send and receive SMS. |
> | `capability_mms` | String | Whether the number can send and receive MMS. |
> | `number_owner_id` | Integer | Id of the user who owns the number. |
> | `number_owner_name` | String | Name of the owner. |
> | `number_owner_email` | String | Email of the owner. |
> | `capabilities` | String (JSON) | The capabilities object as JustCall sends it. |
> | `number_owner` | String (JSON) | The number\_owner object as JustCall sends it. |
> | `shared_with` | String (JSON) | Users and user groups the number is shared with. |

> [accordion] Contacts
>
> Contacts of every agent of the account. Read in full on every sync.
>
> Table: `contacts` · Primary key: `id` · Sync: Full table
>
> | Field | Type | Description |
> | :- | :- | :- |
> | `id` | Integer | Unique id of the contact. |
> | `name` | String | Full name of the contact. |
> | `first_name` | String | First name. |
> | `last_name` | String | Last name. |
> | `contact_number` | String | Primary phone number. |
> | `email` | String | Email. |
> | `company` | String | Company of the contact. |
> | `address` | String | Address of the contact. |
> | `extension` | Integer | Extension assigned to the contact. |
> | `agent_id` | Integer | Id of the agent who created the contact. |
> | `parent_contact_id` | Integer | Id of the parent contact, for a child contact. |
> | `created_at` | String | Date the contact was created, as JustCall sends it. |
> | `last_updated_at` | String | Date the contact was last updated, as JustCall sends it. |
> | `is_blacklisted` | Boolean | True when the contact is blacklisted. |
> | `is_dnd` | Boolean | True when the contact is on the Do Not Disturb list. |
> | `is_dnm` | Boolean | True when the contact is on the Do Not Message list. |
> | `status_updated_at` | String | Date the status last changed, as JustCall sends it. |
> | `status` | String (JSON) | The status object (blacklist, dnd, dnm). |
> | `notes` | String (JSON) | Notes of the contact, with id, description and dates. |
> | `other_numbers` | String (JSON) | Other phone numbers of the contact, each with a label. |

> [accordion] SMS Tags
>
> Tags for SMS threads. Read in full on every sync.
>
> Table: `sms_tags` · Primary key: `id` · Sync: Full table
>
> | Field | Type | Description |
> | :- | :- | :- |
> | `id` | Integer | Unique id of the tag. |
> | `name` | String | Name of the tag. |
> | `color_code` | String | Hex code of the tag's color. |
> | `created_at` | Datetime | When the tag was created, in UTC. |
> | `created_by_agent_id` | Integer | Id of the agent who created the tag. |
> | `created_by_agent_name` | String | Name of the agent who created the tag. |
> | `created_by_agent_email` | String | Email of the agent who created the tag. |


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