For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Log inBook a demo
GuidesAPI Reference
GuidesAPI Reference
  • Getting started
    • Introduction
    • IP Whitelisting
    • Obtaining API keys
    • LLMs.txt
    • MCP server
    • Quickstart
    • Native clients
    • Concepts
    • Embedding authentication
    • Multitenancy
    • Versioning
    • Idempotent requests
    • Events
    • Self-hosted option
    • 2025-09-18 Migration Guide
  • Configuring your connections
    • Overview
    • CDC streaming from databases
    • Syncing to custom webhooks
  • Code examples
    • Overview
    • Bulk sync (ELT) from HubSpot to PostgreSQL
    • Bulk sync (ELT) from Salesforce to S3
    • Bulk sync (ELT) from Salesforce to Snowflake
    • Model sync (Reverse ETL) from Snowflake query to Salesforce
    • Model sync (Reverse ETL) from MongoDB to Salesforce
    • Adding users from Snowflake to Salesloft Cadence
    • Adding contacts from Snowflake to Gong Engage
    • Joined model sync from Postgres, Airtable, and Stripe to Hubspot
    • Model sync from MySQL to Snowflake
    • Model sync from Salesforce to Netsuite
    • Querying Salesforce using SOQL
    • Syncing audiences from Snowflake to LinkedIn Ads
    • Syncing contacts from Google Cloud Storage to Salesforce
    • Syncing contacts from Google Cloud Storage to webhooks
    • Transactional calls with LinkedIn Ads audiences
  • Terraform examples
    • Overview
    • Model sync (Reverse ETL) from BigQuery to Salesforce
    • Model sync (Reverse ETL) from BigQuery to LinkedIn Ads
Logo
Log inBook a demo
On this page
  • UI demo video
  • Code
  • 1. Create a Salesforce Connection
  • 2. Create a Snowflake Connection
  • 3. Create a Bulk Sync
Code examples

Bulk sync (ELT) from Salesforce to Snowflake

Was this page helpful?
Previous

Model sync (Reverse ETL) from Snowflake query to Salesforce

Next

UI demo video

Watch the same steps in the Polytomic admin console in this demo video.

Code

Set your Polytomic API key as an environment variable:

$export POLYTOMIC_API_KEY=YOUR-API-TOKEN

This example covers three steps:

  1. Create a Salesforce Connection.
  2. Create a Snowflake Connection.
  3. Bulk Sync data from Salesforce into Snowflake.

1. Create a Salesforce Connection

The following request creates a Salesforce Connection. See the Salesforce connection configuration for the required fields.

cURL
Python
Typescript
Go
$curl --request POST \
> --url https://app.polytomic.com/api/connections \
> --header "accept: application/json" \
> --header "content-type: application/json" \
> --header "X-Polytomic-Version: 2025-09-18" \
> --header "Authorization: Bearer ${POLYTOMIC_API_KEY}" \
> -d '{"name": "Salesforce Connection","type": "salesforce", "configuration": {"domain": "https://example.my.salesforce.com"}}'

Salesforce Connections authenticate with OAuth. Open the URL returned in the auth_url field of the response to complete the flow.

OAuth redirection

By default, the API expects auth_url to open in a new browser window. Set the optional redirect_url parameter in the request body to change the redirect target.

2. Create a Snowflake Connection

The Snowflake instance must be reachable from Polytomic over the network. For details, see the Snowflake connection guide.

cURL
Python
Typescript
Go
$ curl --request POST \
> --url https://app.polytomic.com/api/connections \
> --header "accept: application/json" \
> --header "content-type: application/json" \
> --header "X-Polytomic-Version: 2025-09-18" \
> --header "Authorization: Bearer ${POLYTOMIC_API_KEY}" \
> -d '{
> "name": "Snowflake Connection",
> "type": "snowflake",
> "configuration": {
> "account": "uc193736182",
> "username": "user",
> "password": "secret",
> "dbname": "database"
> }
> }'

3. Create a Bulk Sync

Before creating the sync, poll the Get Schema Status endpoint for your Salesforce Connection ID until cache_status is cached. This confirms Polytomic has read the full Salesforce schema. Caching takes a few seconds after Step 1, and you should wait for it after connecting Polytomic to any SaaS platform.

ℹ️ Retry while schemas cache

Until the cache is populated, Bulk Sync creation returns:

1{"status":400,"message":"No schemas found. This can mean that the Polytomic has not cached any schemas yet. Please try again.","metadata":null}

This request is safe to retry until it returns a 2xx response.

Once the schema is cached, the following request creates a Bulk Sync that replicates the Salesforce Account and Contact objects into Snowflake. Omit schemas to sync every object on the source:

cURL
Python
Typescript
Go
$curl --request POST \
> --url https://app.polytomic.com/api/bulk/syncs \
> --header "accept: application/json" \
> --header "content-type: application/json" \
> --header "X-Polytomic-Version: 2025-09-18" \
> --header "Authorization: Bearer ${POLYTOMIC_API_KEY}" \
> -d '{
> "name": "Salesforce Bulk Sync",
> "source_connection_id": "YOUR-SALESFORCE-CONNECTION-ID",
> "destination_connection_id": "YOUR-SNOWFLAKE-CONNECTION-ID",
> "mode": "replicate",
> "default_schedule": {
> "frequency": "continuous"
> },
> "destination_configuration": {
> "schema": "SALESFORCE_CONNECTION"
> },
> "schemas": ["Account", "Contact"]
> }'