Adding contacts from Snowflake to Gong Engage
Code
Before getting started make sure to set your Polytomic API key as an environment variable:
This example tutorial will cover 6 steps:
- Connecting to Snowflake.
- Connecting to Gong.
- Surfacing user data from Snowflake using a custom SQL query.
- Retrieving the list of Gong Engage flows from Gong.
- Retrieving the list of target fields for a specific flow.
- Adding users from Snowflake to a Gong Engage flow.
1. Create a Snowflake Connection
The Snowflake instance must be network-accessible from Polytomic. You can see Polytomic whitelist IP addresses here.
cURL
Python
Typescript
Go
2. Create a Gong connection
The following request will create a Gong connection using Polytomic Connect’s embedded OAuth modal. You can also handle OAuth yourself and provide the client credentials to Polytomic. See configuration config parameters here.
cURL
Python
Typescript
Go
If you’re using OAuth to authenticate to Gong rather than an API key, you’ll need to follow the link returned in the auth_url
parameter in the response
Redirection
By default, the API expects the auth_url
to be opened in a new browser window. If you’d like to modify the redirect behavior, there is an optional redirect_url
parameter that can be added to the request body.
3. Create a Snowflake data model
The Snowflake query here is an example; you can replace it with any query of your own:
cURL
Python
Typescript
Go
4. Obtain the list of Gong Engage flows
Polytomic can sync to Accounts, People, and Cadences. All Gong Engage flows are listed as target objects.
cURL
Python
Typescript
Go
5. Retrieve the list of target fields for a Gong Engage flow
To retrieve the list of available target fields for the Gong Engage flow you want to sync to, you can make a call to the Get Sync Target Fields API. The fields you map to in Step 6 below will come from this set:
cURL
Python
Typescript
Go
6. Sync contacts from your Snowflake model to a Gong Engage flow
When adding contacts to Gong Engage flows, you need to supply your CRM’s contact ID (e.g. HubSpot or Salesforce’s contact ID). These IDs can come from anywhere (including Snowflake, as in this example), but they need to also exist the CRM you integrated Gong with.
This sync uses the id
field from Snowflake to add contacts with this ID from HubSpot/Salesforce to a Gong Engage flow.
The Gong Engage flow that you are adding contacts to needs to be specified using the target.object
argument: