> ## 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 Upload Crm Data: Inputs, Cost & CLI Example

> Upload CRM objects (/v2/crm/entities). Includes inputs, outputs, pricing notes, Deepline CLI examples, and GTM automation guidance.

## Run in Enrichment Spreadsheet

<Info>
  Use this function as a column step in `deepline enrich`.
</Info>

```bash theme={null}
deepline enrich --input leads.csv --output leads.enriched.csv --with 'result=gong_upload_crm_data:{"dataFile":"{{dataFile}}"}' --json
```

<Tip>
  Map payload values to spreadsheet columns with `{{column_name}}` placeholders.
</Tip>

## Input Schema

| Name               | Type     | Required | Default | Description                                                 |
| ------------------ | -------- | -------- | ------- | ----------------------------------------------------------- |
| `payload.dataFile` | `string` | Yes      |         | The CRM data file. You may attach files up to 200MB in size |

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

  ### Input JSON Schema

  ```json theme={null}
  {
    "type": "object",
    "description": ".public-api-info { background: rgb(222, 235, 255);}.public-api-tip { background: rgb(227, 252, 239);}.public-api-parameter { background: rgba(9,30,66,0.08);}.public-api-note { background: rgb(234, 230, 255);}.public-api-important { background: rgb(255, 250, 230);}.public-api-critical { background: rgb(255, 235, 230);}table, th, td { border: 1px solid gray; border-collapse: collapse;}th, td { padding: 5px;}th { text-align: left;}img { border: 2px solid #D3D5D9;} Inserts, updates, or deletes a CRM entity in Gong. Gong searches for existing entities with the same ID, to determine whether the entity should be added or updated. Ensure you have an authentication key and that you have registered your integration before uploading your CRM data. When accessed using a bearer token, this endpoint requires the 'api:crm:upload' scope. Request parameters Query String parameters Mandatory parameters are marked with a * . Name Description Data Type integrationId * Integration ID generated when creating the integration long objectType * The object being uploaded. Options are (case-sensitive): ACCOUNT CONTACT DEAL LEAD BUSINESS_USER STAGE string clientRequestId * A unique identifier sent by you to allow troubleshooting and to prevent repeated attempts to upload the same list of objects. Valid characters: letters, numbers, dashes and underscores. string Request Body Content-Type should be multipart/form-data Maximum payload size: 200 megabytes Name Description Data Type dataFile * The LDJSON file with the entity data to upload. A file should only contain objects of one entity type. Records that have multiple updates should be sent in separate files. Each JSON object should be on a separate line. file CRM Entities This section details the entities that can be uploaded to Gong Business User The CRM business user represents the Gong user in the CRM and is responsible for the relationship with the account and for creating opportunities and closing deals. Uploading business users enables Gong to associate CRM entities such as accounts and contacts with the relevant user in Gong and with their Gong activity, such as conversations. Mandatory parameters are marked with a * . To upload your business users to Gong, generate a JSON file with the following fields: Name Description Data Type objectId * The CRM unique ID for the object. Note: objectId can have a maximum of 64 characters and can have the following characters: alpha numeric characters and a \"-\" a valid email address No other special characters can be used string modifiedDate * The date and time the object was last modified in the CRM ISO-8601 datetime format, without milliseconds isDeleted (Default: false) When true, the object is deleted from the database. boolean url The full URL path to view this object in the CRM string (Qualified URI) emailAddress * The business user's email address. Used to associate the Gong user with the CRM user. Not mandatory when isDeleted = true. string Associating the Gong user with the CRM user The CRM user is associated with the Gong user according to the email address. Each CRM deal contains an ownerId field, which is the CRM user ID. To update an existing user: Delete the existing user by uploading the business user entity with isDeleted=true. In a new request, send the new user details with isDeleted=false, or send a different user with the same email address. Account The account object is an active customer in the CRM. Emails and calls in Gong are associated with this account object. Mandatory parameters are marked with a * . To upload your CRM accounts to Gong, generate a JSON file with the following fields: Name Description Data Type objectId * The CRM unique ID for the object. Note: objectId can have a maximum of 64 characters and can have the following characters: alpha numeric characters and a \"-\" a valid email address No other special characters can be used string modifiedDate * The date and time the object was last modified in the CRM ISO-8601 datetime format, without milliseconds isDeleted (Default: false) When true, the object is deleted from the database boolean url A full http URL to browse this object in the CRM string (Qualified URI) name The account name. Default value: \"Account_#\"+objectId string domains The account's domain/s. When an activity can’t be associated with a contact, the participants domain is used to associate the activity to an account via the account domain in this field. string array Contact A contact in Gong is the contact associated with the account. Gong uses a contact to match an activity to the correct account. Mandatory parameters are marked with a * . To upload your CRM contacts to Gong, generate a JSON file with the following fields: Name Description Data Type objectId * The CRM unique ID for the object. Note: objectId can have a maximum of 64 characters and can have the following characters: alpha numeric characters and a \"-\" a valid email address No other special characters can be used string modifiedDate * The date and time the object was last modified in the CRM ISO-8601 datetime format, without milliseconds isDeleted (Default: false) When true, the object is deleted from the database. boolean url A full http URL to browse this object in the CRM string (Qualified URI) accountId The ID of the account associated with the contact in the CRM. Used to associate an activity to an account once the activity has been associated with a contact. string emailAddress The contact's email address. Used to associate activities to a contact, based on the participants email. string firstName The contact's first name string lastName The contact's last name string title The contact's title string phoneNumber The contact's phone number. Used to associate telephony system calls to a contact based on the call participant's phone number. string Deal A deal in Gong is a qualified opportunity or contract in a specific account. Mandatory parameters are marked with a * . To upload your deals to Gong, generate a JSON file with the following fields: Name Description Data Type objectId * The CRM unique ID for the object. Note: objectId can have a maximum of 64 characters and can have the following characters: alpha numeric characters and a \"-\" a valid email address No other special characters can be used string modifiedDate * The date and time the object was last modified in the CRM ISO-8601 datetime format, without milliseconds isDeleted (Default: false) When true, the object is deleted from the database. boolean url A full http URL to access this object in the CRM string (Qualified URI) accountId The ID of the account the deal is associated with in the CRM. Note : Deals without an accountId will not appear in Gong string ownerId The ID of the deal owner in the CRM. This ID should be the same as the business user objectId so the deal can be associated with the correct Gong user. Note : Deals without an ownerId will not appear in the deal board in Gong. string name The deal name Default value: Deal_# + objectId string createdDate The date and time the deal was created in the CRM. ISO-8601 datetime without milliseconds closeDate The date the deal closed or is expected to close. Note : Deals without a closeDate will not appear in the deal board in Gong. string status The deal status. Possible values are: WON LOST OPEN Default value: OPEN string stage The stage the deal is in. If empty, it will not always be possible to associate activities with deals. Must be the same as one of the values in the objectId field in the stages object string amount The deal amount in the currency unit. Companies set their default currency in the Company Settings page. All amounts should be sent in this currency. If your deal is in a different currency, convert the deal amount to the currency defined in the Company Settings page. Default value: 0 currency Lead A Lead is a potential customer, who may not yet be associated with an account. If conversations can't be associated with a contact, Gong then checks to see whether there is a relevant lead to associate with the conversation. Mandatory parameters are marked with a * . To upload your leads to Gong, generate a JSON file with the following fields: Name Description Data Type objectId * The CRM unique ID for the object. Note: objectId can have a maximum of 64 characters and can have the following characters: alpha numeric characters and a \"-\" a valid email address No other special characters can be used string modifiedDate * The date and time the object was last modified in the CRM ISO-8601 datetime format, without milliseconds isDeleted (Default: false) When true, the object is deleted from the database. boolean url A full http URL to browse this object in the CRM string (Qualified URI) emailAddress The lead's email address. Used to associate activities to a lead, based on the participants email. string firstName The lead's first name string lastName The lead's last name string title The lead's title string phoneNumber The lead's phone number. Used to associated telephony system calls to a lead based on the call participant's phone number. string convertedToDealId The deal ID in the CRM. Relevant if the lead is converted to a deal string convertedToContactId The contact ID in the CRM the lead was converted to. Relevant if the lead is converted to a contact string convertedToAccountId The account ID in the CRM the lead was converted to. Relevant if the lead is converted to an account string Stage The list of stages the deal can be in, in the CRM. Stages are set to be active or inactive so that if you want to delete them, the stage is still associated with existing deals in that stage but will not be available for new deals. Mandatory parameters are marked with a * . To upload your stages to Gong, generate a JSON file with the following fields: Name Description Data Type objectId * The CRM unique ID for the object. Note: objectId can have a maximum of 64 characters and can have the following characters: alpha numeric characters and a \"-\" a valid email address No other special characters can be used string name * The display name for the stage string isActive When true, sets the stage to active in Gong. When false, sets the stage to inactive in Gong. Default value: true boolean sortOrder The order of the stage in the sales process (starting from 1). The stages are displayed according to this order. If two stages have the same sort order they will be displayed one after another. Default value: 1 integer Example Upload Business User account POST https://api.gong.io/v2/crm/entities?clientRequestId=1234&integrationId=6286478263646&objectType=BUSINESS_USER {\"objectId\": \"user1_Id_In_The_CRM\", \"emailAddress\": \"john.doe@acme.com\", \"modifiedDate\": \"2019-01-03T23:45:57+01:00\"} // remove user mapping for user user2_Id_In_The_CRM {\"objectId\": \"user2_Id_In_The_CRM\", \"isDeleted\": true, \"emailAddress\": \"john.taylor@acme.com\", \"modifiedDate\": \"2019-01-03T23:45:57+01:00\"} Upload Stage example POST https://api.gong.io/v2/crm/entities?clientRequestId=1234&integrationId=6286478263646&objectType=STAGE {\"objectId\": \"discovery\", \"name\": \"Discovery\", \"isActive\": true, \"sortOrder\": 1} {\"objectId\": \"won\", \"modifiedDate\": \"2019-01-03T23:45:57+01:00\", \"name\": \"Closed Won\", \"isActive\": true, \"sortOrder\": 5} Upload Account example POST https://api.gong.io/v2/crm/entities?clientRequestId=1234&integrationId=6286478263646&objectType=ACCOUNT // account with additional field {\"objectId\": \"5ybyh6n6n65\", \"modifiedDate\": \"2019-01-03T23:45:57+01:00\", \"url\": \"https://crm.com/accounts/5ybyh6n6n65\", \"name\": \"PBR\", \"domains\": [\"pbr.com\", \"pbr.gov\"], \"type\": \"Investor\"} // remove account gfjhty756th from Gong {\"objectId\": \"gfjhty756th\", \"modifiedDate\": \"2019-01-03T22:45:57Z\", \"name\": \"PBR\", \"domains\": [\"pbr.com\", \"pbr.gov\"], \"isDeleted\": true} Upload Contact example POST https://api.gong.io/v2/crm/entities?clientRequestId=1234&integrationId=6286478263646&objectType=CONTACT {\"objectId\": \"5zbwd7n5n65\", \"modifiedDate\": \"2019-01-03T23:45:57+01:00\", \"url\": \"https://crm.com/contacts/5zbwd7n5n65\", \"accountId\": \"5ybyh6n6n65\", \"emailAddress\": \"john.smith@acme.com\", \"firstName\": \"john\", \"lastName\": \"smith\", \"phoneNumber\": \"(912) 507-4395\"} Upload Lead example POST https://api.gong.io/v2/crm/entities?clientRequestId=1234&integrationId=6286478263646&objectType=LEAD {\"objectId\": \"4v5bt54t553\", \"modifiedDate\": \"2019-01-03T23:45:57+01:00\", \"url\": \"https://crm.com/leads/45k4j5j5k44\", \"emailAddress\": \"jane.doe@acme.com\", \"firstName\": \"Jane\", \"lastName\": \"Doe\", \"title\": \"VP Special Effects\", \"phoneNumber\": \"(912) 507-4395\"} // remove lead gf4543gf6th {\"objectId\": \"gf4543gf6th\", \"modifiedDate\": \"2019-01-03T22:45:57Z\", \"emailAddress\": \"john.smith@acme.com\", \"firstName\": \"John\", \"lastName\": \"Smith\", \"isDeleted\": true} // lead 63473hjg53h converted to account 6sjk47jf78d, contact 87grhn74hg6 and deal dkfj8dfgf87 {\"objectId\": \"63473hjg53h\", \"modifiedDate\": \"2019-01-03T23:45:57+01:00\", \"emailAddress\": \"bob.smith@acme.com\", \"firstName\": \"Bob\", \"lastName\": \"Smith\", \"convertedToDealId\": \"dkfj8dfgf87\", \"convertedToContactId\": \"87grhn74hg6\", \"convertedToAccountId\": \"6sjk47jf78d\"} Upload Deal example POST https://api.gong.io/v2/crm/entities?clientRequestId=1234&integrationId=6286478263646&objectType=DEAL {\"objectId\": \"8608553\", \"modifiedDate\": \"2022-02-04T18:24:59Z\", \"url\": \"http://crm.com/deals/8608553\", \"accountId\": \"5ybyh6n6n65\", \"ownerId\": \"5486951\", \"name\": \"Deal name\", \"createdDate\": \"2022-02-04T17:57:23Z\", \"closeDate\": \"2022-09-04\", \"status\": OPEN, \"stage\": \"discovery\", \"amount\": 7000, \"custom_field_1\": \"2022-02-04T17:57:23.000Z\", \"custom_field_2\": null} Uploading additional fields If you defined additional fields using the /v2/crm/entity-schema API, include those fields in the JSON file.",
    "properties": {
      "dataFile": {
        "type": "string",
        "description": "The CRM data file. You may attach files up to 200MB in size",
        "format": "binary"
      }
    },
    "required": [
      "dataFile"
    ],
    "additionalProperties": false
  }
  ```
</details>

## Output Schema

| Name          | Type     | Required | Default | Description                                    |
| ------------- | -------- | -------- | ------- | ---------------------------------------------- |
| `result.data` | `object` | Yes      |         | Provider response payload.                     |
| `result.meta` | `object` | No       |         | Additional response metadata (status, paging). |

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

  ### Output JSON Schema

  ```json theme={null}
  {
    "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."
          },
          "clientRequestId": {
            "type": "string",
            "description": "The clientRequestId sent in the request - used to monitor the request process"
          }
        },
        "additionalProperties": false
      },
      "meta": {
        "type": "object",
        "description": "Additional response metadata (status, paging).",
        "additionalProperties": true
      }
    },
    "required": [
      "data"
    ],
    "additionalProperties": false
  }
  ```
</details>

## Advanced: Direct CLI

<Info>
  Use direct execution for single payload debugging.
</Info>

```bash theme={null}
deepline tools execute gong_upload_crm_data --payload '{
  "dataFile": "string"
}' --json
```

### CLI flags

| Flag                        | Description                                         |
| --------------------------- | --------------------------------------------------- |
| `--json`                    | Print machine-readable output.                      |
| `--wait`                    | Wait for terminal provider status when supported.   |
| `--debug`                   | Enable wait mode with additional status/log output. |
| `--wait-timeout SECONDS`    | Max seconds to wait in wait mode.                   |
| `--poll-interval SECONDS`   | Polling interval in seconds during wait mode.       |
| `--timeout SECONDS`         | Request timeout in seconds.                         |
| `--connect-timeout SECONDS` | Connection timeout in seconds.                      |

## Cost

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