Documentation Index

Fetch the complete documentation index at: https://help.gong.io/llms.txt

Use this file to discover all available pages before exploring further.

Upload Object Schema (/v2/crm/entity-schema)

Prev Next
Post
/v2/crm/entity-schema

Enables you to add, edit or remove fields to Gong CRM entities, so that you can display additional CRM data in Gong. Fields that are not included in the Gong CRM objects, and are uploaded without updating your schema, are not displayed in Gong.

Update your schema when:

  • You create 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 /v2/crm/entities API.

When updating your schema:

  • Add or change field: include all fields you want in the schema, including those sent previously. Example:
    Date Action Result
    3/4/2023 Send account schema with fieldA fieldA added to the account
    6/4/23 Send account schema with fieldA and fieldB fieldA still included in account schema. fieldB added to the account
    8/4/23 Send account schema with fieldC but without fieldA and fieldB Receive an error that you must include all fields in the schema
    15/4/23 Send account schema with fieldB, fieldC, and isDeleted for fieldA fieldA and all it's data are deleted. fieldB and fieldC remain in the schema
  • Changing a field: if you change the field type, a new field is created and the data associated with the original field is deleted. Other changes, such as the label do not result in data being deleted.
  • Deleting a field: to delete a field and it's associated data, send the field with isDeleted = true

When accessed using a bearer token, this endpoint requires the 'api:crm:schema' scope.

Supported field types

This table describes the field types that can be added to your schema

Field typeFormat in JSONPossible values
BOOLEANbooleantrue, false
DATEstring (ISO-8601 date without time)"2020-05-31"
DATETIMEstring (ISO-8601 datetime without milliseconds)"2020-12-17T07:37:21+02:00"

"2020-12-17T05:37:21Z"

PICKLISTstring - one of the values in an orderedValueList"Analyst"
NUMBERnumber45.66, 8453
PERCENTnumber (between 0 to 100)67.3
CURRENCY*number34.68
PHONENUMBERstring"+14055766687"
EMAILADDRESSstring"john.doe@anywhere.com"
REFERENCEstring - the id of another object"48b009drax"
IDstring - the id of the object"843hf8484jr84htg"
STRINGstring"whatever you want"
URLstring"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.

Example

Request

POST https://api.gong.io/v2/crm/entity-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"},

// remove custom field

{"uniqueName": "industry", "isDeleted": true, "label": "Industry", "type": "PICKLIST", "lastModified": "2020-11-21T08:11:34+01:00"}]

Query parameters
integrationId
integer (int64) Required

Integration ID generated when creating the integration

objectType
stringRequired

The object type to set the schema for (case-sensitive)

Valid values[ "ACCOUNT", "CONTACT", "DEAL", "LEAD" ]
Body parameters
Array of object
object

selectedFields

uniqueName
string Required

The unique name of the field in the CRM system

Exampleaccountowner
label
string Required

The label to use in the UI for this field

ExampleAccount Owner
type
string Required

The field type (case-sensitive). Must be one of the types listed above.

Valid values[ "DATE", "DATETIME", "NUMBER", "PERCENT", "CURRENCY", "ID", "URL", "STRING", "BOOLEAN", "PHONENUMBER", "EMAILADDRESS", "PICKLIST", "REFERENCE", "STRINGARRAY" ]
ExampleREFERENCE
lastModified
string

The date and time the schema was last modified.
Valid format: ISO-8601 format without milliseconds e.g., "2020-12-17T13:45:01Z"

Example2020-12-17T13:45:01Z
isDeleted
boolean

When true, deletes the field from the schema and its value is removed from all objects. Use with caution

Examplefalse
referenceTo
string

The object type this field refers to. Required for field of type REFERENCE. Must be one of "ACCOUNT", "CONTACT", "DEAL", "LEAD" or "USER"

ExampleUSER
orderedValueList
Array of string

The list of values for the field. Required for PICKLIST fields

Example[ "Analyst", "Competitor", "Customer", "Integrator", "Investor", "Partner", "Other" ]
string

The list of values for the field. Required for PICKLIST fields

Example["Analyst","Competitor","Customer","Integrator","Investor","Partner","Other"]
Responses
200

OK

object
requestId
string

A Gong request reference Id, generated for this request. Can be used for troubleshooting purposes.

Example4al018gzaztcr8nbukw
201

Successfully uploaded crm schema fields

object
requestId
string

A Gong request reference Id, generated for this request. Can be used for troubleshooting purposes.

Example4al018gzaztcr8nbukw
400

Malformed request

object
requestId
string

A Gong request reference Id, generated for this request. Can be used for troubleshooting purposes.

Example4al018gzaztcr8nbukw
errors
Array of string

Error messages.

Example[ "An error has occurred" ]
string
401

Access denied

object
requestId
string

A Gong request reference Id, generated for this request. Can be used for troubleshooting purposes.

Example4al018gzaztcr8nbukw
errors
Array of string

Error messages.

Example[ "An error has occurred" ]
string
429

API request limit exceeded

Headers
Retry-After
integer
Number of seconds to wait before making a new request.
object
requestId
string

A Gong request reference Id, generated for this request. Can be used for troubleshooting purposes.

Example4al018gzaztcr8nbukw
errors
Array of string

Error messages.

Example[ "An error has occurred" ]
string
500

Failed to complete the operation due to an unexpected error

object
requestId
string

A Gong request reference Id, generated for this request. Can be used for troubleshooting purposes.

Example4al018gzaztcr8nbukw
errors
Array of string

Error messages.

Example[ "An error has occurred" ]
string