> ## Documentation Index
> Fetch the complete documentation index at: https://docs.salesfinity.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Gong

> How Salesfinity sends calls to Gong, works Gong Engage call tasks, what permissions the Gong app needs, and how to configure user and outcome mapping.

The Gong integration does two things. It **uploads dialed calls to Gong**, recording and all, so
they are transcribed, tracked, and scored alongside the rest of your team's conversations. And
for teams on Gong Engage, it **imports your open call tasks** into the dialer and marks them done
when you call.

Unlike the CRM integrations, Gong is connected **once per team**, and only a team admin can change
its configuration. Connect it from **Settings → Connections & API → Gong**.

## Architecture

```mermaid theme={null}
sequenceDiagram
  autonumber
  actor Admin as Team admin
  actor Rep
  participant SF as Salesfinity
  participant Gong
  Admin->>SF: Connect Gong (once per team)
  SF->>Gong: OAuth (technical administrator)
  Gong-->>SF: Access + refresh token
  Admin->>SF: Map users and dispositions
  Rep->>SF: Import Engage call tasks (optional)
  SF->>Gong: Open call tasks for the mapped user, due today
  Gong-->>SF: Tasks with contact, flow, and step
  Rep->>SF: Dial, then log the call
  SF->>SF: CRM sync first (HubSpot, Salesforce, ...)
  SF->>Gong: Upload call + recording URL under the mapped user
  Gong-->>SF: Call ID (duplicates rejected, treated as done)
  SF->>Gong: Mark the Engage task done
  Gong->>Gong: Fetch recording, transcribe, run trackers
```

## Permissions required to connect

Salesfinity authorizes with Gong through OAuth. Gong restricts app authorization to users with
**technical administrator** rights, so have your Gong technical admin do the connection. The
consent screen asks for these scopes:

| Scope                                              | Why Salesfinity needs it                                                                                            |
| -------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- |
| `api:calls:create`                                 | Upload each dialed call, with its recording, to Gong.                                                               |
| `api:calls:read:basic`, `api:calls:read:extensive` | Show a contact's past Gong calls on the contact card and answer AI Companion questions about calls and transcripts. |
| `api:users:read`                                   | List Gong users for the user mapping.                                                                               |
| `api:call-outcomes:read`                           | List Gong call outcomes for the disposition mapping.                                                                |
| `api:tasks:read`, `api:tasks:write`                | Import open Engage call tasks and mark them done after the call.                                                    |
| `api:flows:read`, `api:flows:write`                | Read the Engage flow and step a task belongs to.                                                                    |
| `api:crm:upload`                                   | Attach uploaded calls to the right CRM records inside Gong.                                                         |
| `api:data-privacy:read`                            | Find a contact's Gong calls by phone number or email for the contact card.                                          |

The connection is stored for the team. Gong access tokens last about a day and Salesfinity
refreshes them automatically; Gong rotates the refresh token on every use, and Salesfinity keeps
the newest one so the two never drift.

## Configuration

Open **Configure** on the Gong card. There are two tabs, and both are admin-only.

<AccordionGroup>
  <Accordion title="User mapping">
    Pairs each Salesfinity user with a Gong user. The mapping decides which Gong user an uploaded
    call belongs to and whose Engage tasks a rep imports.

    Map **every rep who dials**. A call from a rep with no mapping is still uploaded, but under
    one of the other mapped users, so it lands on the wrong person's Gong profile.
  </Accordion>

  <Accordion title="Field mapping">
    Maps each Salesfinity disposition to a Gong call outcome. The outcome is sent with every
    uploaded call. Leave a disposition unmapped and the call is uploaded without an outcome.
  </Accordion>
</AccordionGroup>

## What Salesfinity sends to Gong

Every call is uploaded through Gong's calls API as an **outbound call** titled "Salesfinity Call"
with:

| Field                   | Value                                                                                                 |
| ----------------------- | ----------------------------------------------------------------------------------------------------- |
| Primary user            | The Gong user mapped to the rep                                                                       |
| Start time and duration | From the call log                                                                                     |
| Recording               | A download URL for the call recording; Gong fetches it and transcribes it                             |
| Disposition             | The Gong outcome mapped from the Salesfinity disposition                                              |
| Purpose                 | The call purpose, when one was set                                                                    |
| Parties                 | The rep, identified by email and Gong user, and the contact, identified by name and the number dialed |
| Client unique ID        | The Salesfinity call log ID, so the same call can never be uploaded twice                             |

Gong rejects a second upload carrying an ID it has already seen. Salesfinity treats that as
success, which makes retries safe: a call is never duplicated in Gong.

### Which calls are uploaded

Calls are uploaded on two paths, depending on where the contact came from.

* **Contacts imported from Gong Engage.** Every logged call is uploaded, together with the task it
  belonged to, and the task is marked done when you finished the call. This runs as the contact's
  primary sync, the same slot a CRM sync occupies for a HubSpot contact.
* **Contacts from anywhere else** (CSV, HubSpot, Salesforce, Outreach, and so on). The call is
  uploaded after its CRM sync, and only if it is a real conversation: **at least ten seconds
  long, recorded, and not a left-voicemail disposition**. Short dials, unrecorded calls, and
  voicemails are skipped so they do not clutter Gong.

Uploaded calls are marked on the Salesfinity call log, so a call is never sent twice even if its
sync is retried.

## Gong Engage call tasks

If your team uses Gong Engage, import with Gong as the list source and Salesfinity pulls your
**open call tasks** into a list named "All tasks". A task qualifies when it is:

* a manual task or a flow step, whose action is a **call**,
* **open**, assigned to the Gong user mapped to you,
* **due today or earlier**.

Each imported contact carries the task ID, the flow and step it came from, and the contact's CRM
ID and URL from Gong. Gong Engage tasks can only be imported this way; there is no list picker,
because Engage has no lists to pick from.

After you log the call, Salesfinity marks the task **done** in Gong as the mapped user. If Gong
reports that no task changed, for example because the task was already closed or reassigned, the
call log records that so the rep can see the task still needs attention.

## Gong data inside Salesfinity

* **Contact card.** The Gong Calls card lists a contact's past Gong calls, found by their phone
  numbers and email, with direction, disposition, participants, and a link to the call in Gong.
* **AI Companion.** The Gong specialist can pull calls, transcripts, activity and interaction
  stats, scorecards, trackers, library folders, tasks, flows, users, workspaces, and audit logs
  to answer questions such as "summarize my last three calls with Acme" or "which trackers fired
  on yesterday's demo".

## Troubleshooting

| Symptom                                  | Cause                                                                                                | Fix                                                                |
| ---------------------------------------- | ---------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------ |
| A call is in Salesfinity but not in Gong | It was under ten seconds, had no recording, or was a voicemail.                                      | Expected. Only real conversations are uploaded.                    |
| Calls appear under the wrong Gong user   | The rep has no user mapping.                                                                         | Map the rep in the User mapping tab.                               |
| An Engage task stays open after the call | Gong matched no task for the mapped user, usually because the task was reassigned or closed in Gong. | Close it in Gong. Future calls on that contact will not reopen it. |
| The Gong card reads disconnected         | The refresh token was revoked, or the authorizing user lost technical admin rights.                  | Have a Gong technical admin reconnect from the settings card.      |
| "User mapping not found" on import       | Your Salesfinity user is not mapped to a Gong user.                                                  | Ask a team admin to add the mapping.                               |
