All URIs are relative to //127.0.0.1/
Method | HTTP request | Description |
---|---|---|
delete_generic_crm_integration_using_delete | DELETE /v2/crm/integration/delete | Delete a Generic CRM integration (/v2/crm/integration/delete) |
get_crm_objects_using_get | GET /v2/crm/object/list | Get CRM objects (/v2/crm/object/list) |
get_request_status_using_get | GET /v2/crm/request-status | Get Request Status (/v2/crm/request-status) |
list_crm_schema_fields_using_get | GET /v2/crm/object/schema/list | List Schema Fields (/v2/crm/object/schema/list) |
list_generic_crm_integration_using_get | GET /v2/crm/integration/list | Get Generic CRM integration details (/v2/crm/integration/list) |
map_crm_users_using_post | POST /v2/crm/map/users | Map Users (Deprecated) |
register_generic_crm_integration_using_put | PUT /v2/crm/integration/new | Register a Generic CRM integration (/v2/crm/integration/new) |
upload_crm_data_using_post | POST /v2/crm/object/entities | Upload CRM objects (/v2/crm/object/entities) |
upload_crm_schema_field_using_post | POST /v2/crm/object/schema | Upload Object Schema (/v2/crm/object/schema) |
upload_stages_using_post | POST /v2/crm/stages | Upload Stages (Deprecated) |
AsyncProcessingResponse delete_generic_crm_integration_using_delete(client_request_id, integration_id)
Delete a Generic CRM integration (/v2/crm/integration/delete)
<style>.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;}</style>Deletes a Generic CRM integration and all its associated crm objects (Accounts, Contacts, Deals, Leads, and Users).
This API is asynchronous. Call \"/request-status\" API with the clientRequestId sent to this API to track progress of the delete request:
Status DONE indicates that the integration and all its associated crm objects have been successfully deleted. Calls associations may take up to 24 hours to be deleted.
DELETE https://api.gong.io/v2/crm/integration/delete?clientRequestId=1234&integrationId=6286478263646
When accessed using a bearer token, this endpoint requires the scope 'api:crm:integration:delete'.
# load the gem
require 'gong_api'
api_instance = GongAPI::CRMApi.new
client_request_id = 'client_request_id_example' # String | A unique identifier sent by you to allow troubleshooting requests. Valid characters for this field are letters, numbers, dashes and underscores.
integration_id = 789 # Integer | Integration ID generated when creating the integration
begin
#Delete a Generic CRM integration (/v2/crm/integration/delete)
result = api_instance.delete_generic_crm_integration_using_delete(client_request_id, integration_id)
p result
rescue GongAPI::ApiError => e
puts "Exception when calling CRMApi->delete_generic_crm_integration_using_delete: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
client_request_id | String | A unique identifier sent by you to allow troubleshooting requests. Valid characters for this field are letters, numbers, dashes and underscores. | |
integration_id | Integer | Integration ID generated when creating the integration |
No authorization required
- Content-Type: Not defined
- Accept: application/json
GetGenericCrmObjectsResponse get_crm_objects_using_get(bodyintegration_idobject_type)
Get CRM objects (/v2/crm/object/list)
<style>.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;}</style>This API is intended to be used in development phase only, to manually verify that objects are uploaded and processed correctly in Gong.
Returns a JSON object where each key is the object crm id and the corresponding value is a nested JSON object representing the CRM object fields. Each key in the nested JSON is the field name and the corresponding value is the field value.
The objects are fetched from the Gong main DB. If the object is not found, the JSON’s value will be null.
The request body contains an array of objects ids.
The request is limited to 100 objects. If more than 100 objects are requested only the first 100 are returned.
When accessed using a bearer token, this endpoint requires the scope 'api:crm:get-objects'.
# load the gem
require 'gong_api'
api_instance = GongAPI::CRMApi.new
body = ['body_example'] # Array<String> | Requested objects crm ids
integration_id = 789 # Integer | Integration ID generated when creating the integration
object_type = 'object_type_example' # String | Requested objects type
begin
#Get CRM objects (/v2/crm/object/list)
result = api_instance.get_crm_objects_using_get(bodyintegration_idobject_type)
p result
rescue GongAPI::ApiError => e
puts "Exception when calling CRMApi->get_crm_objects_using_get: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
body | Array<String> | Requested objects crm ids | |
integration_id | Integer | Integration ID generated when creating the integration | |
object_type | String | Requested objects type |
No authorization required
- Content-Type: /
- Accept: application/json
RequestStatusResponse get_request_status_using_get(client_request_id, integration_id)
Get Request Status (/v2/crm/request-status)
<style>.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;}</style>Returns the current status of the request for \"/map/users\", \"/object/entities\" or \"/integration/delete\" API.
When accessed using a bearer token, this endpoint requires the scope 'api:crm:upload'.
- PENDING - File is pending parsing
- IN_PROGRESS - File is being parsed
- DONE - All objects in the file were successfully parsed
- FAILED - Failed to parse some objects in the file or on a general error when the file was being processed
- For \"/object/entities\" API, status DONE indicates that all objects in the LDJSON file were successfully parsed and stored in raw storage.
Note that it can take up to 1 hour from the time the LDJSON file was uploaded using the \"/object/entities\" API until deals are fully processed and available to the end user on the Deals Board. - For \"/map/users\" API, status DONE indicates that the mapping was successfully created and is available in Gong for the processing of other objects.
- FAILED:
- If you receive a FAILED status with a specific error list there are errors you need to address in the object:
- Fix the objects' JSON.
- Resend the entire LDJSON file to \"/object/entities\" or \"/map/users\" API.
Note that The returned errors list is limited to the first 20 errors. To make sure you have corrected all the possible errors you need to upload the entire file repeatedly until you receive a DONE status.
- If you received a FAILED status with a single error in the form of
{\"line\":0,\"description\":\".....\"} this indicates a general processing error:- Fix the LDJSON file according to the error message.
- Upload the entire LDJSON file again.
- If you receive a FAILED status with a specific error list there are errors you need to address in the object:
# load the gem
require 'gong_api'
api_instance = GongAPI::CRMApi.new
client_request_id = 'client_request_id_example' # String | <span style='background: rgba(9,30,66,0.08)'>clientRequestId</span> sent to \"/map/users\", \"/object/entities\" or \"/integration/delete\" API
integration_id = 789 # Integer | Integration ID generated when creating the integration
begin
#Get Request Status (/v2/crm/request-status)
result = api_instance.get_request_status_using_get(client_request_id, integration_id)
p result
rescue GongAPI::ApiError => e
puts "Exception when calling CRMApi->get_request_status_using_get: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
client_request_id | String | <span style='background: rgba(9,30,66,0.08)'>clientRequestId</span> sent to "/map/users", "/object/entities" or "/integration/delete" API | |
integration_id | Integer | Integration ID generated when creating the integration |
No authorization required
- Content-Type: Not defined
- Accept: application/json
ListSelectedFieldsResponse list_crm_schema_fields_using_get(integration_id, object_type)
List Schema Fields (/v2/crm/object/schema/list)
<style>.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;}</style>Retrieves a list of the object schema fields.
When accessed using a bearer token, this endpoint requires the scope 'api:crm:schema'.
GET https://api.gong.io/v2/crm/object/schema/list?integrationId=6286478263646&objectType=ACCOUNT
{ \"requestId\": \"afjkzqkqglog7ueki5\", \"selectedFields\": { \"ACCOUNT\": [ { \"name\": \"accountTypePicklist\", \"label\": \"Account Type\", \"type\": \"PICKLIST\", \"lastModified\": null, \"isDeleted\": false, \"referenceTo\": null, \"orderedValueList\": null }, { \"name\": \"accountTypePicklist2\", \"label\": \"Account Type2\", \"type\": \"PICKLIST\", \"lastModified\": null, \"isDeleted\": false, \"referenceTo\": null, \"orderedValueList\": null }, { \"name\": \"fooBar\", \"label\": \"Foo Bar\", \"type\": \"STRING\", \"lastModified\": null, \"isDeleted\": false, \"referenceTo\": null, \"orderedValueList\": null } ] }}
# load the gem
require 'gong_api'
api_instance = GongAPI::CRMApi.new
integration_id = 789 # Integer | Integration ID generated when creating the integration
object_type = 'object_type_example' # String | Type of object to retrieve the schema fields for (case-sensitive). <br>Omitting this parameter returns the schema for all object types.
begin
#List Schema Fields (/v2/crm/object/schema/list)
result = api_instance.list_crm_schema_fields_using_get(integration_id, object_type)
p result
rescue GongAPI::ApiError => e
puts "Exception when calling CRMApi->list_crm_schema_fields_using_get: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
integration_id | Integer | Integration ID generated when creating the integration | |
object_type | String | Type of object to retrieve the schema fields for (case-sensitive). <br>Omitting this parameter returns the schema for all object types. |
No authorization required
- Content-Type: Not defined
- Accept: application/json
ListGenericCrmIntegrationsResponse list_generic_crm_integration_using_get
Get Generic CRM integration details (/v2/crm/integration/list)
<style>.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;}</style>Returns a list of all active Generic CRM integrations of the company. Only integrations created with 'Register a Generic CRM integration' API are returned.
Only one active integration is currently supported.
When accessed using a bearer token, this endpoint requires the scope 'api:crm:integrations:read'.
# load the gem
require 'gong_api'
api_instance = GongAPI::CRMApi.new
begin
#Get Generic CRM integration details (/v2/crm/integration/list)
result = api_instance.list_generic_crm_integration_using_get
p result
rescue GongAPI::ApiError => e
puts "Exception when calling CRMApi->list_generic_crm_integration_using_get: #{e}"
end
This endpoint does not need any parameter.
ListGenericCrmIntegrationsResponse
No authorization required
- Content-Type: Not defined
- Accept: application/json
AsyncProcessingResponse map_crm_users_using_post(opts)
Map Users (Deprecated)
<style>.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;}</style>This API is Deprecated. Please use \"/object/entities?objectType=BUSINESS_USER\" API instead.
Gong associates users with the CRM User entity. Mapping users accurately is essential for Gong to connect users with all their associated objects in the CRM.
This API creates a mapping in Gong between the user ID in the CRM system and the user ID in Gong.
User mapping is important to ensure deals are processed in Gong correctly. Each uploaded deal contains an ownerId field, which contains a user ID from the CRM system.
Gong only processes a deal if this user ID is mapped to a user in Gong who is set to record or import calls.
Each request to this API must include the complete list of users from the CRM system.
If a user mapping is sent after a deal is uploaded:
- Gong retroactively searches for deals whose ownerId matches the user ID mapping.
- Gong starts to reprocess those matched deals from raw storage into Gong’s main database.
Gong matches the user from the uploaded JSON to a user in Gong based on the email address.
The user mapping will not be created when:
- There is no user in Gong with the supplied email address
- Mapping already exists for the supplied email address
To update an existing mapping:
- Delete the existing mapping by sending an existing mapping with isDeleted=true.
- In a separate request send a new mapping for the email address.
The request body is a file in LDJSON format, meaning the file should contain JSON objects - where each JSON object is on a separate line and represents a single user from the CRM system.
Request Body Specifications:
- Content-Type should be multipart/form-data
- Maximum payload size: 200 megabytes
- The request body should include one parameter named \"dataFile\" which contains the LDJSON file.
Name | Description | Data Type | Mandatory |
---|---|---|---|
clientRequestId | A unique identifier sent by you to enable troubleshooting communication. Gong uses this identifier to prevent repeated attempts to upload the same users list. Valid characters for this field: Letters, numbers, dashes, and underscores. | string | Y |
integrationId | Integration ID generated when creating the integration | long | Y |
User JSON object requires the following fields:
Name | Description | Data Type | Mandatory |
---|---|---|---|
crmUserId | User ID in the CRM system | string | Y |
emailAddress | Must match an email address of a user in Gong. Not mandatory when isDeleted = true. | string | Y |
isDeleted | \"true\" deletes the user mapping. Default = \"false\" | boolean | N |
201 Created
Name | Data Type | Description |
---|---|---|
clientRequestId | string | the clientRequestId sent in the request |
requestId | string | A Gong request reference Id, generated for this request |
Important: The users mapping API is asynchronous. A 201 response only indicates that the file successfully uploaded to Gong and is pending processing. Use the clientRequestId to troubleshoot failed requests and watch the request status using \"/request-status\" API.
401 - Access denied
409 Conflict - clientRequestId already exists
429 - API request limit exceeded
500 - Internal Server Error
When accessed using a bearer token, this endpoint requires the scope 'api:crm:upload'.
POST https://api.gong.io/v2/crm/map/users?clientRequestId=1234&integrationId=6286478263646
{\"crmUserId\": \"2356ddfwe32\", \"emailAddress\": \"[email protected]\"}
{\"crmUserId\": \"67534ghf745\", \"isDeleted\": true} // remove user mapping for user 67534ghf745
# load the gem
require 'gong_api'
api_instance = GongAPI::CRMApi.new
opts = {
data_file: 'data_file_example' # String |
}
begin
#Map Users (Deprecated)
result = api_instance.map_crm_users_using_post(opts)
p result
rescue GongAPI::ApiError => e
puts "Exception when calling CRMApi->map_crm_users_using_post: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
data_file | String | [optional] |
No authorization required
- Content-Type: multipart/form-data
- Accept: application/json
RegisterGenericCrmResponse register_generic_crm_integration_using_put(body)
Register a Generic CRM integration (/v2/crm/integration/new)
<style>.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;}</style>Register the CRM application in Gong and use the returned integrationId in future requests to the CRM API to correlate the data with the specific CRM.
Multiple CRM integrations are not currently supported. To create a new integration, first delete the old one.
When accessed using a bearer token, this endpoint requires the scope 'api:crm:integration:register'.
# load the gem
require 'gong_api'
api_instance = GongAPI::CRMApi.new
body = GongAPI::GenericCrmRegistrationRequest.new # GenericCrmRegistrationRequest | registrationRequest
begin
#Register a Generic CRM integration (/v2/crm/integration/new)
result = api_instance.register_generic_crm_integration_using_put(body)
p result
rescue GongAPI::ApiError => e
puts "Exception when calling CRMApi->register_generic_crm_integration_using_put: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
body | GenericCrmRegistrationRequest | registrationRequest |
No authorization required
- Content-Type: application/json
- Accept: application/json
AsyncProcessingResponse upload_crm_data_using_post(opts)
Upload CRM objects (/v2/crm/object/entities)
<style>.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;}</style>Inserts, updates, or deletes a CRM object in Gong.
If an existing object with the same id is detected it will be updated, otherwise it will be inserted as a new object.
The request body is a file in LDJSON format, meaning the file should contain JSON objects, where each JSON object is in a separate line and represents a single CRM object.
All objects in a single request should be of the same object type. An object cannot be contained more than once in a given list.
Request Body Specifications:
- Content-Type should be multipart/form-data
- Maximum payload size: 200 megabytes
- The request body should contain one parameter named \"dataFile\" which holds the LDJSON file
Important: The list must be sorted by modifiedDate Ascending.
- On initial upload: Only send the items that weren’t deleted
- On subsequent (incremental) uploads: Send all items.
Dates in the uploaded JSON objects are represented in ISO-8601 format without milliseconds (e.g. '2018-02-18T02:30:00-07:00' or '2018-02-18T08:00:00Z', where Z stands for UTC).
Name | Description | Data Type | Mandatory |
---|---|---|---|
integrationId | Integration ID generated when creating the integration | long | Y |
objectType | Must be one of: \"ACCOUNT\", \"CONTACT\", \"DEAL\", \"LEAD\", \"BUSINESS_USER\", or \"STAGE\" (case-sensitive) | string | Y |
clientRequestId | A unique identifier sent by you to allow troubleshooting communication. Gong also uses this identifier to prevent repeated attempts to upload the same object list. Valid characters for this field are letters, numbers, dashes and underscores. | string | Y |
201 Created
Name | Data Type | Description |
---|---|---|
clientRequestId | string | the clientRequestId sent in the request |
requestId | string | A Gong request reference Id, generated for this request |
Important: The upload objects API is asynchronous. A 201 response only indicates that the file successfully uploaded to Gong and is pending processing. Use the clientRequestId to troubleshoot failed requests and watch the request status using \"/request-status\" API.
401 - Access denied
409 Conflict - clientRequestId already exists
429 - API request limit exceeded
500 - Internal Server Error
When accessed using a bearer token, this endpoint requires the scope 'api:crm:upload'.
All uploaded CRM objects should contain the following common JSON fields. In addition, each uploaded object should contain mandatory and optional fields as specified below for each object type.
Name | Description | Data Type | Mandatory |
---|---|---|---|
objectId | Each object must have a unique id field provided by the CRM. | string | Y |
modifiedDate | The object’s last modification date and time in the CRM in ISO-8601 datetime format, without milliseconds | datetime | Y |
lastModified(Deprecated) | Deprecated. Please use modifiedDate | datetime | N |
isDeleted | \"true\" deletes the object (For objectType=BUSINESS_USER deletes also the user mapping. For objectType=STAGE sets the stage to inactive). Default = \"false\" | boolean | N |
url | A full http URL to browse this object in the CRM | string (Qualified URI) | N |
Gong associates users with the CRM User entity. Mapping users accurately is essential for Gong to connect users with all their associated objects in the CRM.
Uploading user objects via this API creates a mapping in Gong between the user ID in the CRM system and the user ID in Gong.
User mapping is important to ensure deals are processed in Gong correctly. Each uploaded deal contains an ownerId field, which contains a user ID from the CRM system.
Gong only processes a deal if this user ID is mapped to a user in Gong who is set to record or import calls.
On initial upload send the complete list of users from the CRM system. On incremental upload send only users that have changed.
If a user is uploaded after a deal is uploaded:
- Gong retroactively searches for deals whose ownerId matches the user ID mapping.
- Gong starts to reprocess those matched deals from raw storage into Gong’s main database.
Gong matches the user from the uploaded JSON to a user in Gong based on the email address.
The user mapping will not be created when:
- There is no user in Gong with the supplied email address
- Mapping already exists for the supplied email address
To update an existing mapping:
- Delete the existing mapping by sending the user with isDeleted=true.
- In a separate request send the user with isDeleted=false and a new email address, or send a different user for the same email address.
Business User JSON object requires the following fields:
Name | Description | Data Type | Mandatory |
---|---|---|---|
emailAddress | Must match an email address of a user in Gong. Not mandatory when isDeleted = true. | string | Y |
POST https://api.gong.io/v2/crm/object/entities?clientRequestId=1234&integrationId=6286478263646&objectType=BUSINESS_USER
{\"objectId\": \"user1_Id_In_The_CRM\", \"emailAddress\": \"[email protected]\", \"modifiedDate\": \"2019-01-03T23:45:57+01:00\"}
{\"objectId\": \"user2_Id_In_The_CRM\", \"isDeleted\": true, \"emailAddress\": \"[email protected]\", \"modifiedDate\": \"2019-01-03T23:45:57+01:00\"} // remove user mapping for user user2_Id_In_The_CRM
Update the list of stages from the CRM system.
Stages must be uploaded via this API before you upload Deal objects. When you upload your Deal object, make sure that the stage field matches one of the stages you’ve uploaded using this API.
The upload stages request should only be sent after:
- You have created a new integration.
- There are any changes to the list of stages in the CRM. You can also send a stages update request before any request to the '/object/entities' API.
Stage JSON object requires the following fields:
Name | Description | Data Type | Mandatory |
---|---|---|---|
internalName | Unique name or unique identifier that identifies the stage in the CRM. | string | Y |
name | Stage name (for display in Gong UI). | string | Y |
isActive | Indicates if the stage is active in the CRM. | boolean | Y |
sortOrder | The order of the stage in the sales process (starting from 1). | integer | Y |
POST https://api.gong.io/v2/crm/object/entities?clientRequestId=1234&integrationId=6286478263646&objectType=STAGE
{\"objectId\": \"discovery\", \"modifiedDate\": \"2019-01-03T23:45:57+01:00\", \"internalName\": \"discovery\", \"name\": \"Discovery\", \"isActive\": true, \"sortOrder\": 1}
{\"objectId\": \"won\", \"modifiedDate\": \"2019-01-03T23:45:57+01:00\", \"internalName\": \"won\", \"name\": \"Closed Won\", \"isActive\": true, \"sortOrder\": 5}
- The Account object represents an active customer in the CRM system.
- The Account object is used by Gong to connect activities such as emails and calls to their associated account.
The Deals page displays all the activities in Gong associated with an account as well as account status, contacts, and insights.
Contacts and Deals are associated with accounts, and their processing in Gong requires the associated account.
In order for Deals to be processed correctly by Gong:
- Upload Accounts.
- Wait 60 seconds.
- Upload Contacts and Deals.
When deals are being processed, the account referenced by Deal.accountId must exist in the Gong database.
If it does not exist in the database, the deal will not be processed or displayed in the Deals page and other areas throughout Gong.
The Account JSON object includes the following fields:
Name | Description | Data Type | Mandatory |
---|---|---|---|
name | Account name | string | Y |
domains | Domain names related to the account | string array | Y |
POST https://api.gong.io/v2/crm/object/entities?clientRequestId=1234&integrationId=6286478263646&objectType=ACCOUNT
{\"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\"} // account with additional field
{\"objectId\": \"gfjhty756th\", \"modifiedDate\": \"2019-01-03T22:45:57Z\", \"name\": \"PBR\", \"domains\": [\"pbr.com\", \"pbr.gov\"], \"isDeleted\": true} // remove account gfjhty756th from Gong
- A contact in Gong is a person with contact details associated with the account.
- Gong uses a contact to match an activity to the correct account.
The Contact JSON object includes the following fields:
Name | Description | Data Type | Mandatory |
---|---|---|---|
accountId | The ID of the contact’s connected account in the CRM | string | Y |
emailAddress | The contact’s main email address | string | Y |
firstName | The contact’s first name | string | Y |
lastName | The contact’s last name | string | Y |
title | The contact’s title (if available) | string | N |
phoneNumber | The contact’s main phone number. If Gong is configured to import dialer calls the phoneNumber parameter is mandatory. | string | Y for dialer calls, N otherwise |
POST https://api.gong.io/v2/crm/object/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\": \"[email protected]\", \"firstName\": \"john\", \"lastName\": \"smith\", \"phoneNumber\": \"(912) 507-4395\"}
- The Lead object represents a potential customer.
- Calls and emails are first associated with contacts based on email addresses.
- If there is no matching contact, Gong tries to match calls and emails to a lead.
The Lead JSON object includes the following fields:
Name | Description | Data Type | Mandatory |
---|---|---|---|
emailAddress | The Lead’s main email address | string | Y |
firstName | The Lead’s first name | string | Y |
lastName | The Lead’s last name | string | Y |
title | The Lead’s title (if available) | string | N |
phoneNumber | The Lead’s phone number. If Gong is configured to import dialer calls the phoneNumber parameter is mandatory. | string | Y for dialer calls, N otherwise |
convertedToDealId | The deal CRM ID, if the lead was converted to a Deal | string | N |
convertedToContactId | The contact CRM ID if the lead was converted to a Contact | string | N |
convertedToAccountId | The account CRM ID if the lead was converted to an Account | string | N |
POST https://api.gong.io/v2/crm/object/entities?clientRequestId=1234&integrationId=6286478263646&objectType=LEAD
{\"objectId\": \"4v5bt54t553\", \"modifiedDate\": \"2019-01-03T23:45:57+01:00\", \"url\": \"https://crm.com/leads/45k4j5j5k44\", \"emailAddress\": \"[email protected]\", \"firstName\": \"Jane\", \"lastName\": \"Doe\", \"title\": \"VP Special Effects\", \"phoneNumber\": \"(912) 507-4395\"}
{\"objectId\": \"gf4543gf6th\", \"modifiedDate\": \"2019-01-03T22:45:57Z\", \"emailAddress\": \"[email protected]\", \"firstName\": \"John\", \"lastName\": \"Smith\", \"isDeleted\": true} // remove lead gf4543gf6th
{\"objectId\": \"63473hjg53h\", \"modifiedDate\": \"2019-01-03T23:45:57+01:00\", \"emailAddress\": \"[email protected]\", \"firstName\": \"Bob\", \"lastName\": \"Smith\", \"convertedToDealId\": \"dkfj8dfgf87\", \"convertedToContactId\": \"87grhn74hg6\", \"convertedToAccountId\": \"6sjk47jf78d\"} // lead 63473hjg53h converted to account 6sjk47jf78d, contact 87grhn74hg6 and deal dkfj8dfgf87
A deal in Gong represents a qualified opportunity or contract in a specific account.
The Deal JSON object includes the following fields:
Name | Description | Data Type | Mandatory |
---|---|---|---|
accountId | The ID of the account the deal is associated with in the CRM An account with the same objectId must be uploaded first in order for the deal to be processed. The accountId needs to match an Account with the same value in its objectId. | string | Y |
ownerId | The ID of the owning User in the CRM This field is a reference to a CRM user which must be mapped to a Gong user via \"/map/users\" API and the Gong user must be set to record or import calls, otherwise the deal will not be processed | string | Y |
name | The deal’s name | string | Y |
createdDate | The deal’s creation date and time (ISO-8601 datetime without milliseconds) | datetime | Y |
estimatedCloseDate*(Deprecated) | Deprecated. Please use closeDate instead | date | N |
actualCloseDate*(Deprecated) | Deprecated. Please use closeDate instead | date | N |
closeDate | The deal’s close date (ISO-8601), without time e.g. \"2021-05-19\" | date | Y |
isOpen | Indicates if the Deal’s status is Open or Closed | boolean | Y |
isWon | Indicates if the Deal’s status is Won or Lost | boolean | Y |
stage | The value of this field must be equal to the internalName of one of the stages uploaded via \"/stages\" API | string | Y |
estimatedAmount**(Deprecated) | Deprecated. Please use amount instead | currency | N |
actualAmount**(Deprecated) | Deprecated. Please use amount instead | currency | N |
amount | The deal’s amount in the currency unit | currency | Y |
* Either estimatedCloseDate or actualCloseDate (or both) must exist in the JSON
** Either estimatedAmount or actualAmount (or both) must exist in the JSON
POST https://api.gong.io/v2/crm/object/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\", \"isOpen\": true, \"isWon\": false, \"stage\": \"discovery\", \"amount\": 7000, \"custom_field_1\": \"2022-02-04T17:57:23.000Z\", \"custom_field_2\": null}
In addition to the fields required by Gong, you can also add any other field to each object if the following two conditions are met:
- The field name is defined in the object's schema and has been uploaded using \"/object/schema\" API
- The field value matches the type defined in the schema
# load the gem
require 'gong_api'
api_instance = GongAPI::CRMApi.new
opts = {
data_file: 'data_file_example' # String |
}
begin
#Upload CRM objects (/v2/crm/object/entities)
result = api_instance.upload_crm_data_using_post(opts)
p result
rescue GongAPI::ApiError => e
puts "Exception when calling CRMApi->upload_crm_data_using_post: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
data_file | String | [optional] |
No authorization required
- Content-Type: multipart/form-data
- Accept: application/json
SchemaUpdateResponse upload_crm_schema_field_using_post(bodyintegration_idobject_type)
Upload Object Schema (/v2/crm/object/schema)
<style>.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;}</style>All CRM object fields in Gong must have a representative schema that describes the field (unique name, type, etc.).
Any field uploaded by the \"Upload CRM objects\" API (\"/object/entities\" path) that is not described in the schema will be stored in Gong’s raw data storage. However, it will not be parsed by Gong and it will not be available to the end user.
For new integrations created via \"/integration/new\" API, Gong creates a default schema for each object type (Contact, Account, Deal, Lead) that contains the mandatory and optional fields specified in this guide. See the Upload CRM objects API section for more information.
If there are additional fields for any object type that are needed by the end user, send their schema via this API.
- You have created a new integration.
- There are changes to the schema of any object type. You can also send a schema update request before any request to the '/object/entities' API.
When accessed using a bearer token, this endpoint requires the scope 'api:crm:schema'.
Field Type | Format in JSON | Sample Values |
---|---|---|
BOOLEAN | boolean | true, false |
DATE | string (ISO-8601 date without time) | \"2020-05-31\" |
DATETIME | string (ISO-8601 datetime without milliseconds) | \"2020-12-17T07:37:21+02:00\" \"2020-12-17T05:37:21Z\" |
PICKLIST | string - one of the values in an orderedValueList | \"Analyst\" |
NUMBER | number | 45.66, 8453 |
PERCENT | number (between 0 to 100) | 67.3 |
CURRENCY* | number | 34.68 |
PHONENUMBER | string | \"+14055766687\" |
EMAILADDRESS | string | \"[email protected]\" |
REFERENCE | string - the id of another object | \"48b009drax\" |
ID | string - the id of the object | \"843hf8484jr84htg\" |
STRING | string | \"whatever you want\" |
STRINGARRAY** | array of strings | [\"http://customer.com\"] |
URL | string | \"https://crm.com/account/6d4r578f\" |
* In the integration send a number value, and specify the correct currency symbol in the Gong UI. Currently Gong does not support multiple currencies per company.
** Can only be used for Gong-defined fields.
POST https://api.gong.io/v2/crm/object/schema?integrationId=6286478263646&objectType=ACCOUNT
[{\"uniqueName\": \"orderId\", \"label\": \"ID\", \"type\": \"ID\", \"lastModified\": \"2020-11-11T08:11:34+01:00\"},
{\"uniqueName\": \"parentAccount\", \"label\": \"Main Account\", \"type\": \"REFERENCE\", \"referenceTo\": \"ACCOUNT\", \"lastModified\": \"2020-11-11T08:11:34+01:00\"},
{\"uniqueName\": \"category\", \"label\": \"Category\", \"type\": \"PICKLIST\", \"orderedValueList\": [\"Analyst\", \"Competitor\", \"Customer\", \"Integrator\", \"Investor\", \"Partner\", \"Other\"], \"lastModified\": \"2020-11-11T08:11:34+01:00\"}, // custom field
{\"uniqueName\": \"industry\", \"isDeleted\": true, \"lastModified\": \"2020-11-21T08:11:34+01:00\"}] // remove custom field
# load the gem
require 'gong_api'
api_instance = GongAPI::CRMApi.new
body = [GongAPI::GenericSchemaFieldRequest.new] # Array<GenericSchemaFieldRequest> | fields
integration_id = 789 # Integer | Integration ID generated when creating the integration
object_type = 'object_type_example' # String | Type of object to set the schema for (case-sensitive)
begin
#Upload Object Schema (/v2/crm/object/schema)
result = api_instance.upload_crm_schema_field_using_post(bodyintegration_idobject_type)
p result
rescue GongAPI::ApiError => e
puts "Exception when calling CRMApi->upload_crm_schema_field_using_post: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
body | Array<GenericSchemaFieldRequest> | fields | |
integration_id | Integer | Integration ID generated when creating the integration | |
object_type | String | Type of object to set the schema for (case-sensitive) |
No authorization required
- Content-Type: application/json
- Accept: application/json
SchemaUpdateResponse upload_stages_using_post(bodyintegration_id)
Upload Stages (Deprecated)
<style>.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;}</style>This API is Deprecated. Please use \"/object/entities?objectType=STAGE\" API instead.
Update the list of stages from the CRM system.
This API must be called before you upload Deal objects. When you upload your Deal object, make sure that the stage field matches one of the stages you’ve uploaded using this API.
The upload stages request should only be sent after:
- You have created a new integration.
- There are any changes to the list of stages in the CRM. You can also send a stages update request before any request to the '/object/entities' API.
When accessed using a bearer token, this endpoint requires the scope 'api:crm:schema'.
# load the gem
require 'gong_api'
api_instance = GongAPI::CRMApi.new
body = [GongAPI::GenericDealStageRequest.new] # Array<GenericDealStageRequest> | stages
integration_id = 789 # Integer | Integration ID generated when creating the integration
begin
#Upload Stages (Deprecated)
result = api_instance.upload_stages_using_post(bodyintegration_id)
p result
rescue GongAPI::ApiError => e
puts "Exception when calling CRMApi->upload_stages_using_post: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
body | Array<GenericDealStageRequest> | stages | |
integration_id | Integer | Integration ID generated when creating the integration |
No authorization required
- Content-Type: application/json
- Accept: application/json