Upload CRM objects

Prev Next
Post
/v2/crm/entities

Uploads a file of CRM objects of one type, to add, update or delete them in Gong. Gong matches each object to the ones it has by objectId.

The request is asynchronous. The 201 response means Gong received the file. To check processing, call GET /v2/crm/request-status with the integrationId and clientRequestId. Continue polling until status is DONE or FAILED. DONE means Gong read every object; the objects can take a while longer to appear in Gong.

Query parameters (all required):

  • integrationId: the Gong ID of the integration. Returned when you create the integration.
  • objectType: the type of the objects in the file (case-sensitive). Accepted values: ACCOUNT, CONTACT, DEAL, LEAD, BUSINESS_USER, STAGE.
  • clientRequestId: an ID you create for this request, unique within the integration. Up to 50 characters: letters, numbers, dashes and underscores. Use it to check the request's status with GET /v2/crm/request-status. A second request with the same ID fails, so the same file isn't processed twice.

Request body: multipart/form-data, with the file in dataFile. The file can be up to 200 MB. It holds newline-delimited JSON (LDJSON): one JSON object per line, UTF-8 encoded, all of the type in objectType. Send several updates of the same object in separate files.

How updates work:

  • Each upload of an object replaces the version Gong has. Send all of the object's fields each time.
  • Gong updates an object only when its modifiedDate is later than the one Gong has. An object with the same or an earlier modifiedDate doesn't change the current version, and isn't reported as an error. Gong keeps it as history.
  • Field names are case-sensitive and must match the names below, or the uniqueName of a field in your schema. Gong doesn't read a field with any other name.
  • To upload history, upload earlier versions of an object, each with the modifiedDate of that change. Gong keeps them as history, for example to show a deal's stage at the time of a call.

Fields of every object type except stages:

  • objectId (required): the CRM ID of the object, unique within its type. Up to 64 characters: letters, numbers and dashes, or an email address.
  • modifiedDate (required, except for business users): the date and time the object was last modified in your CRM, in ISO-8601 format without milliseconds, in UTC (Z) or with a timezone offset such as -07:00. If your CRM doesn't store it, send the time of the upload.
  • isDeleted: set to true to delete the object from Gong. Default: false.
  • url: the URL of the object in your CRM.

Business users (BUSINESS_USER): the CRM users who own accounts and deals. Gong matches each business user to the Gong user with the same email address.

  • emailAddress (required unless isDeleted is true): the email address of the business user.
  • modifiedDate is optional for business users. Without it, Gong uses the time of the upload.

To change a business user's objectId, upload the user with isDeleted set to true, then upload them again with the new objectId.

Accounts (ACCOUNT): the companies you sell to. Gong associates calls and emails with accounts.

  • name: the name of the account. Default: Account_# followed by the objectId.
  • domains: the domains of the account, as a list. When Gong can't associate a call or email with a contact, it uses the participants' domains to find the account.

Contacts (CONTACT): people at an account.

  • accountId: the CRM ID of the contact's account. Gong uses it to associate the contact's calls and emails with the account.
  • emailAddress: the email address of the contact. Gong uses it to associate calls and emails with the contact.
  • firstName, lastName: the first and last name of the contact.
  • title: the job title of the contact.
  • phoneNumber: the phone number of the contact. Gong uses it to associate telephony calls with the contact.

Deals (DEAL): opportunities or contracts of an account.

  • accountId: the CRM ID of the deal's account. A deal without it doesn't appear in Gong.
  • ownerId: the objectId of the business user who owns the deal. A deal appears on deal boards only when its owner is a business user whose email address belongs to a Gong user.
  • name: the name of the deal. Default: Deal_# followed by the objectId.
  • createdDate: the date and time the deal was created in your CRM, in ISO-8601 format without milliseconds, in UTC (Z) or with a timezone offset such as -07:00.
  • closeDate: the date the deal closed or is expected to close, in ISO-8601 format without a time. A deal without it doesn't appear on deal boards.
  • status: the status of the deal. Accepted values: OPEN, WON, LOST. Default: OPEN. Gong treats WON and LOST deals as closed.
  • stage: the objectId of the deal's stage. Without it, Gong can't always associate calls and emails with the deal.
  • amount: the amount of the deal, in the currency set for the company in Gong. Convert amounts in other currencies before you upload them. Default: 0.

Leads (LEAD): people who aren't linked to an account yet. When Gong can't associate a call or email with a contact, it looks for a lead.

  • emailAddress: the email address of the lead. Gong uses it to associate calls and emails with the lead.
  • firstName, lastName: the first and last name of the lead.
  • title: the job title of the lead.
  • phoneNumber: the phone number of the lead. Gong uses it to associate telephony calls with the lead.
  • convertedToAccountId, convertedToContactId, convertedToDealId: the CRM IDs of the account, contact and deal the lead was converted to. When any of them is set, Gong marks the lead as converted and removes it.

Stages (STAGE): the stages a deal can be in. Stages take objectId but not modifiedDate. Each upload of a stage replaces the stage with the same objectId.

  • name (required): the name of the stage, as Gong shows it.
  • isActive: set to false to stop offering the stage for new deals. Deals already in it keep it. Default: true.
  • sortOrder: the place of the stage in the sales process, starting from 1. Gong shows stages in this order. Default: 1.

Custom fields: add the fields you defined with POST /v2/crm/entity-schema, named by their uniqueName.

Required authorization scope: 'api:crm:upload'.

Body parameters
object
dataFile
string (binary) Required

The LDJSON file of objects to upload, up to 200 MB.

Responses
201

Gong received the file. Gong processes it asynchronously: check its status with GET /v2/crm/request-status.

object
requestId
string

The Gong ID of this request. Provide it to Gong Support to troubleshoot a problem with the request.

Example4al018gzaztcr8nbukw
clientRequestId
string

The clientRequestId you sent. Use it to check the request's status with GET /v2/crm/request-status.

ExampleclientRequest1
400
  • A parameter has the wrong type or format. The error message names the parameter.
  • clientRequestId is longer than 50 characters, or has characters other than letters, numbers, dashes and underscores.
  • The file is larger than 200 MB.
  • The company has no CRM integration registered through the API.
  • integrationId isn't the ID of the company's integration. Read the ID as a 64-bit integer, so it isn't rounded.
object
requestId
string

The Gong ID of this request. Provide it to Gong Support to troubleshoot a problem with the request.

Example4al018gzaztcr8nbukw
errors
Array of string

Error messages.

Example[ "An error has occurred" ]
string
401
  • The API key or access token is missing or isn't valid.
  • The integration uses OAuth, and its token doesn't have the scope this endpoint requires. The error message names the scope.
object
requestId
string

The Gong ID of this request. Provide it to Gong Support to troubleshoot a problem with the request.

Example4al018gzaztcr8nbukw
errors
Array of string

Error messages.

Example[ "An error has occurred" ]
string
409
  • clientRequestId was already used for this integration. Send a new one.
object
requestId
string

The Gong ID of this request. Provide it to Gong Support to troubleshoot a problem with the request.

Example4al018gzaztcr8nbukw
errors
Array of string

Error messages.

Example[ "An error has occurred" ]
string
429
  • The company sent more requests than its rate limit allows. Wait the number of seconds in Retry-After, then send the request again.
Headers
Retry-After
integer (int32)
The number of seconds to wait before you send the request again.
object
requestId
string

The Gong ID of this request. Provide it to Gong Support to troubleshoot a problem with the request.

Example4al018gzaztcr8nbukw
errors
Array of string

Error messages.

Example[ "An error has occurred" ]
string
500
  • Gong couldn't complete the request because of an unexpected error. Try again. If the error continues, contact Gong Support and give them the requestId from the response.
object
requestId
string

The Gong ID of this request. Provide it to Gong Support to troubleshoot a problem with the request.

Example4al018gzaztcr8nbukw
errors
Array of string

Error messages.

Example[ "An error has occurred" ]
string