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

# Gong: Find All References To Phone Number

> Retrieve all references to a phone number. Includes SDK V2 guidance, input constraints, response fields, and Deepline credit cost.

Retrieve all references to a phone number.

> [!NOTE]
>
> Tool ID: `gong_find_all_references_to_phone_number`

## Run this action

Use the TypeScript SDK for one call. Use `ctx.tools.execute(...)` inside a Play for durable calls, scheduled calls, or CSV processing.

```ts theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
import { Deepline } from 'deepline';

const deepline = await Deepline.connect();
const result = await deepline.tools.execute(
  'gong_find_all_references_to_phone_number',
  {
    "phoneNumber": "+14155550123"
  },
);

console.log(result.toolResponse.raw);
```

### CLI

```bash theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
deepline tools execute gong_find_all_references_to_phone_number --input '{
  "phoneNumber": "+14155550123"
}' --json
```

## Example response

The SDK returns this shape at `result.toolResponse.raw`. The example values illustrate the response.

```json theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
{
  "data": {
    "requestId": "request_123",
    "emails": [
      {
        "from": "example",
        "id": "id_123",
        "sentTime": "example"
      }
    ],
    "calls": [
      {
        "id": "id_123",
        "status": "example",
        "externalSystems": [
          {}
        ]
      }
    ]
  }
}
```

Use `deepline describe gong_find_all_references_to_phone_number --json` for the latest machine-readable contract.

## Input reference

Shows the elements in the Gong system that reference the given phone number. Given a phone number, this endpoint returns details of any leads or contacts with this phone number and their associated calls and email messages. When accessed through a Bearer token authorization method, this endpoint requires the scope 'api:data-privacy:read'.

| Name | Type | Required | Default | Details |
| - | - | - | - | - |
| `payload.phoneNumber` | `string` | Yes | — | The phone number. This number must start with a + (plus) sign followed by the country code, area code, and local phone number. All other non-digits are ignored. The following are examples of permitted phone numbers: +1 425 555 2671, +1-425-555-2671, +1 425 5552671, +14255552671, +1 425 555 26 71, +1(425) 555-2671, etc. Note: This parameter should be URL-encoded. |

<details>
  <summary>Show raw input schema</summary>

  ### Input JSON Schema

  ```json theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
  {
    "type": "object",
    "description": "Shows the elements in the Gong system that reference the given phone number. Given a phone number, this endpoint returns details of any leads or contacts with this phone number and their associated calls and email messages. When accessed through a Bearer token authorization method, this endpoint requires the scope 'api:data-privacy:read'.",
    "properties": {
      "phoneNumber": {
        "type": "string",
        "description": "The phone number. This number must start with a + (plus) sign followed by the country code, area code, and local phone number. All other non-digits are ignored. The following are examples of permitted phone numbers: +1 425 555 2671, +1-425-555-2671, +1 425 5552671, +14255552671, +1 425 555 26 71, +1(425) 555-2671, etc. Note: This parameter should be URL-encoded."
      }
    },
    "required": [
      "phoneNumber"
    ],
    "additionalProperties": false
  }
  ```
</details>

## Output reference

Standard tool result payload.

| Name | Type | Required | Default | Details |
| - | - | - | - | - |
| `result.data` | `object` | Yes | — | Provider response payload. |
| `result.data.requestId` | `string` | No | — | A Gong request reference Id, generated for this request. Can be used for troubleshooting purposes. |
| `result.data.emails` | `array` | No | — | Related email messages. |
| `result.data.emails[].from` | `string` | No | — | The sender's email address. |
| `result.data.emails[].id` | `string` | No | — | Gong's unique 32 character identifier for the email message. |
| `result.data.emails[].sentTime` | `string` | No | — | The date and time the email message was sent in the ISO-8601 format, for example: '2024-01-17T16:20:05-03:00' or '2016-02-16T03:57:04.834+05:30' or '2020-11-20T21:30:07.233692Z', where Z stands for UTC. |
| `result.data.emails[].mailbox` | `string` | No | — | The mailbox from which the email was retrieved. |
| `result.data.emails[].messageHash` | `string` | No | — | Hash code of the email message. |
| `result.data.calls` | `array` | No | — | Related calls. |
| `result.data.calls[].id` | `string` | No | — | Gong's unique numeric identifier for the call (up to 20 digits). |
| `result.data.calls[].status` | `string` | No | — | Call status |
| `result.data.calls[].externalSystems` | `array` | No | — | A list of links to external systems such as CRM, Telephony System, Case Management, etc. |
| `result.data.calls[].externalSystems[].system` | `"Salesforce" \| "HubSpot" \| "MicrosoftDynamic" \| "Generic"` | No | — | External system name. Allowed: `Salesforce`, `HubSpot`, `MicrosoftDynamic`, `Generic`. |
| `result.data.calls[].externalSystems[].objects` | `array` | No | — | List of objects within the external system. |
| `result.data.calls[].externalSystems[].objects[].objectType` | `"Conversation" \| "Task"` | No | — | Object Type. Allowed: `Conversation`, `Task`. |
| `result.data.calls[].externalSystems[].objects[].externalId` | `string` | No | — | External ID. |
| `result.data.meetings` | `array` | No | — | Related meetings. |
| `result.data.meetings[].id` | `string` | No | — | Gong's unique identifier for the meeting. |
| `result.data.customerData` | `array` | No | — | A list of links to data from external systems (such as CRM, Telephony System, Case Management, etc.) that reference the email address and that Gong stores. |
| `result.data.customerData[].system` | `"Salesforce" \| "HubSpot" \| "MicrosoftDynamic" \| "Generic"` | No | — | External system name. Allowed: `Salesforce`, `HubSpot`, `MicrosoftDynamic`, `Generic`. |
| `result.data.customerData[].objects` | `array` | No | — | List of objects in the external system. |
| `result.data.customerData[].objects[].id` | `string` | No | — | Gong's unique numeric identifier (up to 20 digits) for the Lead or Contact. |
| `result.data.customerData[].objects[].objectType` | `"Lead" \| "Contact"` | No | — | Object Type. Allowed: `Lead`, `Contact`. |
| `result.data.customerData[].objects[].externalId` | `string` | No | — | External ID. |
| `result.data.customerData[].objects[].mirrorId` | `string` | No | — | Crm Mirror ID. |
| `result.data.customerData[].objects[].fields` | `array` | No | — | Object fields. |
| `result.data.customerData[].objects[].fields[].name` | `string` | No | — | Field name. For Account supported fields are: Name, Website, Industry and all the custom fields. For Opportunity supported fields are Name, LeadSource, Type, StageName, Probability, Amount, CloseDate and all the custom fields. |
| `result.data.customerData[].objects[].fields[].value` | `record` | No | — | Field value |
| `result.data.suppliedPhoneNumber` | `string` | No | — | The supplied phone number. |
| `result.data.matchingPhoneNumbers` | `array` | No | — | Matching phone numbers found. Items must be unique. |
| `result.data.emailAddresses` | `array` | No | — | Related email addresses. Items must be unique. |
| `result.meta` | `object` | No | — | Additional response metadata (status, paging). |

<details>
  <summary>Show raw output schema</summary>

  ### Output JSON Schema

  ```json theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
  {
    "type": "object",
    "description": "Standard tool result payload.",
    "properties": {
      "data": {
        "type": "object",
        "description": "Provider response payload.",
        "properties": {
          "requestId": {
            "type": "string",
            "description": "A Gong request reference Id, generated for this request. Can be used for troubleshooting purposes."
          },
          "emails": {
            "type": "array",
            "description": "Related email messages.",
            "items": {
              "type": "object",
              "description": "Related email messages.",
              "properties": {
                "from": {
                  "type": "string",
                  "description": "The sender's email address."
                },
                "id": {
                  "type": "string",
                  "description": "Gong's unique 32 character identifier for the email message."
                },
                "sentTime": {
                  "type": "string",
                  "description": "The date and time the email message was sent in the ISO-8601 format, for example: '2024-01-17T16:20:05-03:00' or '2016-02-16T03:57:04.834+05:30' or '2020-11-20T21:30:07.233692Z', where Z stands for UTC."
                },
                "mailbox": {
                  "type": "string",
                  "description": "The mailbox from which the email was retrieved."
                },
                "messageHash": {
                  "type": "string",
                  "description": "Hash code of the email message."
                }
              },
              "additionalProperties": false
            }
          },
          "calls": {
            "type": "array",
            "description": "Related calls.",
            "items": {
              "type": "object",
              "description": "Details of a call referencing the email address.",
              "properties": {
                "id": {
                  "type": "string",
                  "description": "Gong's unique numeric identifier for the call (up to 20 digits)."
                },
                "status": {
                  "type": "string",
                  "description": "Call status"
                },
                "externalSystems": {
                  "type": "array",
                  "description": "A list of links to external systems such as CRM, Telephony System, Case Management, etc.",
                  "items": {
                    "type": "object",
                    "description": "A list of links to external systems such as CRM, Telephony System, Case Management, etc.",
                    "properties": {
                      "system": {
                        "type": "string",
                        "description": "External system name.",
                        "enum": [
                          "Salesforce",
                          "HubSpot",
                          "MicrosoftDynamic",
                          "Generic"
                        ]
                      },
                      "objects": {
                        "type": "array",
                        "description": "List of objects within the external system.",
                        "items": {
                          "type": "object",
                          "description": "List of objects within the external system.",
                          "properties": {
                            "objectType": {
                              "type": "string",
                              "description": "Object Type.",
                              "enum": [
                                "Conversation",
                                "Task"
                              ]
                            },
                            "externalId": {
                              "type": "string",
                              "description": "External ID."
                            }
                          },
                          "additionalProperties": false
                        }
                      }
                    },
                    "additionalProperties": false
                  }
                }
              },
              "additionalProperties": false
            }
          },
          "meetings": {
            "type": "array",
            "description": "Related meetings.",
            "items": {
              "type": "object",
              "description": "Related meetings.",
              "properties": {
                "id": {
                  "type": "string",
                  "description": "Gong's unique identifier for the meeting."
                }
              },
              "additionalProperties": false
            }
          },
          "customerData": {
            "type": "array",
            "description": "A list of links to data from external systems (such as CRM, Telephony System, Case Management, etc.) that reference the email address and that Gong stores.",
            "items": {
              "type": "object",
              "description": "A list of links to data from external systems (such as CRM, Telephony System, Case Management, etc.) that reference the email address and that Gong stores.",
              "properties": {
                "system": {
                  "type": "string",
                  "description": "External system name.",
                  "enum": [
                    "Salesforce",
                    "HubSpot",
                    "MicrosoftDynamic",
                    "Generic"
                  ]
                },
                "objects": {
                  "type": "array",
                  "description": "List of objects in the external system.",
                  "items": {
                    "type": "object",
                    "description": "List of objects in the external system.",
                    "properties": {
                      "id": {
                        "type": "string",
                        "description": "Gong's unique numeric identifier (up to 20 digits) for the Lead or Contact."
                      },
                      "objectType": {
                        "type": "string",
                        "description": "Object Type.",
                        "enum": [
                          "Lead",
                          "Contact"
                        ]
                      },
                      "externalId": {
                        "type": "string",
                        "description": "External ID."
                      },
                      "mirrorId": {
                        "type": "string",
                        "description": "Crm Mirror ID."
                      },
                      "fields": {
                        "type": "array",
                        "description": "Object fields.",
                        "items": {
                          "type": "object",
                          "description": "External object data",
                          "properties": {
                            "name": {
                              "type": "string",
                              "description": "Field name. For Account supported fields are: Name, Website, Industry and all the custom fields. For Opportunity supported fields are Name, LeadSource, Type, StageName, Probability, Amount, CloseDate and all the custom fields."
                            },
                            "value": {
                              "type": "object",
                              "description": "Field value"
                            }
                          },
                          "additionalProperties": false
                        }
                      }
                    },
                    "additionalProperties": false
                  }
                }
              },
              "additionalProperties": false
            }
          },
          "suppliedPhoneNumber": {
            "type": "string",
            "description": "The supplied phone number."
          },
          "matchingPhoneNumbers": {
            "type": "array",
            "description": "Matching phone numbers found.",
            "uniqueItems": true,
            "items": {
              "type": "string",
              "description": "Matching phone numbers found."
            }
          },
          "emailAddresses": {
            "type": "array",
            "description": "Related email addresses.",
            "uniqueItems": true,
            "items": {
              "type": "string",
              "description": "Related email addresses."
            }
          }
        },
        "additionalProperties": false
      },
      "meta": {
        "type": "object",
        "description": "Additional response metadata (status, paging).",
        "additionalProperties": true
      }
    },
    "required": [
      "data"
    ],
    "additionalProperties": false
  }
  ```
</details>

## Deepline cost

* Pricing model: `fixed` (per call).
* Estimated Deepline credits: `0` per pricing unit.
* Provider-native pricing may still exist outside Deepline credit billing.

## Related documentation

* [Gong provider guide](https://deepline.com/docs/providers/gong/guide.md)
* [SDK V2 quickstart](https://deepline.com/docs/sdk-v2/quickstart.md)
* [SDK reference](https://deepline.com/docs/sdk-v2/sdk-reference.md)
* [Run tools across a CSV](https://deepline.com/docs/sdk-v2/batch-csv.md)


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