Skip Navigation
Show nav
Dev Center
  • Get Started
  • Documentation
  • Changelog
  • Search
  • Get Started
    • Node.js
    • Ruby on Rails
    • Ruby
    • Python
    • Java
    • PHP
    • Go
    • Scala
    • Clojure
    • .NET
  • Documentation
  • Changelog
  • More
    Additional Resources
    • Home
    • Elements
    • Products
    • Pricing
    • Careers
    • Help
    • Status
    • Events
    • Podcasts
    • Compliance Center
    Heroku Blog

    Heroku Blog

    Find out what's new with Heroku on our blog.

    Visit Blog
  • Log inorSign up
View categories

Categories

  • Heroku Architecture
    • Compute (Dynos)
      • Dyno Management
      • Dyno Concepts
      • Dyno Behavior
      • Dyno Reference
      • Dyno Troubleshooting
    • Stacks (operating system images)
    • Networking & DNS
    • Platform Policies
    • Platform Principles
  • Developer Tools
    • Command Line
    • Heroku VS Code Extension
  • Deployment
    • Deploying with Git
    • Deploying with Docker
    • Deployment Integrations
  • Continuous Delivery & Integration (Heroku Flow)
    • Continuous Integration
  • Language Support
    • Node.js
      • Node.js Behavior in Heroku
      • Troubleshooting Node.js Apps
      • Working with Node.js
    • Ruby
      • Rails Support
      • Working with Bundler
      • Working with Ruby
      • Ruby Behavior in Heroku
      • Troubleshooting Ruby Apps
    • Python
      • Working with Python
      • Background Jobs in Python
      • Python Behavior in Heroku
      • Working with Django
    • Java
      • Java Behavior in Heroku
      • Working with Java
      • Working with Maven
      • Working with Spring Boot
      • Troubleshooting Java Apps
    • PHP
      • Working with PHP
      • PHP Behavior in Heroku
    • Go
      • Go Dependency Management
    • Scala
    • Clojure
    • .NET
      • Working with .NET
  • Databases & Data Management
    • Heroku Postgres
      • Postgres Basics
      • Postgres Getting Started
      • Postgres Performance
      • Postgres Data Transfer & Preservation
      • Postgres Availability
      • Postgres Special Topics
      • Migrating to Heroku Postgres
    • Heroku Key-Value Store
    • Apache Kafka on Heroku
    • Other Data Stores
  • AI
    • Heroku Inference
      • AI Models
      • Inference Essentials
      • Inference API
      • Heroku Inference Quick Start Guides
    • Working with AI
    • Model Context Protocol
    • Vector Database
  • Monitoring & Metrics
    • Logging
  • App Performance
  • Add-ons
    • All Add-ons
  • Collaboration
  • Security
    • App Security
    • Identities & Authentication
      • Single Sign-on (SSO)
    • Private Spaces
      • Infrastructure Networking
    • Compliance
  • Heroku Enterprise
    • Enterprise Accounts
    • Enterprise Teams
    • Heroku Connect (Salesforce sync)
      • Heroku Connect Administration
      • Heroku Connect Reference
      • Heroku Connect Troubleshooting
  • Patterns & Best Practices
  • Extending Heroku
    • Platform API
    • App Webhooks
    • Heroku Labs
    • Building Add-ons
      • Add-on Development Tasks
      • Add-on APIs
      • Add-on Guidelines & Requirements
    • Building CLI Plugins
    • Developing Buildpacks
    • Dev Center
  • Accounts & Billing
  • Troubleshooting & Support
  • Integrating with Salesforce
  • Heroku Enterprise
  • Heroku Connect (Salesforce sync)
  • Heroku Connect Administration
  • Managing Heroku Connect Sync and Connections

Managing Heroku Connect Sync and Connections

English — 日本語に切り替える

Last updated June 20, 2025

Table of Contents

  • Configuring a Connection
  • Pause a Connection
  • Resume a Connection
  • Recreating a Connection After a Sandbox Refresh
  • Select the Write Algorithm For Your Connection
  • Recover Synchronization After an Error
  • Recover Synchronization After a Database Rollback
  • Changing Field Definitions in Salesforce
  • Connection Configuration Audit Trail

Each Heroku Connect add-on is configured to connect to a single Heroku Postgres database and a single Salesforce org. This article covers how to manage your sync and connections.

Heroku Connect doesn’t provide a mechanism for partially syncing data. A mapping always syncs all records. See Unsupported Objects for exceptions involving archived Tasks and Events.

Configuring a Connection

See the Quick Start: Heroku Connect to configure your connection.

Pause a Connection

When performing certain tasks, such as upgrading your database, you can pause synchronization activity in Heroku Connect.

To pause synchronization:

  1. Open the Heroku Connect dashboard.
  2. Select the Settings tab.
  3. Select Manage Connection. 4.Selectk the Pause button.

Heroku Connect completes any pending operations before entering the paused state. When paused, changes to data in the database are still added to the trigger log. There’s no polling for changes made in Salesforce. Push Topic notifications from Salesforce for mappings using the streaming mode are also ignored.

Connections can only be paused when they are in the IDLE state. If your connection remains in the POLLING_DB_CHANGES status for an extended time, check your logs to debug.

Resume a Connection

Any changes made to data in the Heroku Postgres database or in Salesforce while it was paused automatically syncs upon resuming the connection.

To resume synchronization:

  1. Open the Heroku Connect dashboard.
  2. Select the Settings tab.
  3. Select Manage Connection.
  4. Select Resume.

Heroku Connect continues where it left off by processing trigger log entries to push changes to Salesforce. It also retrieves changes made in Salesforce using polling, including mappings that normally use the Streaming API.

Recreating a Connection After a Sandbox Refresh

If you reloaded a sandbox organization, you must delete your existing connection and recreate it. You must manually configure these settings in the sandbox org:

  • Collaborators and their notifications settings
  • Beta features
  • The Write Algorithm
  • The Salesforce API version

To automate the rest of the recreation, follow these instructions for the Heroku CLI or the Heroku Connect Dashboard.

CLI

From the Heroku CLI:

  1. Export your Heroku Connect configuration with:

    $ heroku connect:export -a appname herokuconnect-resource-name
    
  2. If you have any read or write mappings, make sure you aren’t writing any new data to those tables. Also, make sure all the mappings are in DATA_SYNCED to ensure all your data is present in Salesforce. To stop activity on the connection, run:

    $ heroku connect:pause -a appname herokuconnect-resource-name
    
  3. Destroy the Heroku Connect add-on with:

    $ heroku addons:destroy -a appname herokuconnect-resource-name
    
  4. Create a new Heroku Connect add-on with:

    $ heroku addons:create herokuconnect
    
  5. Authenticate your add-on with the following command and login with your Salesforce credentials:

    $ heroku connect:sf:auth -a appname herokuconnect-resource-name
    
  6. Import the mapping configuration you exported from step one with:

    $ heroku connect:export mapping_file.json -a appname herokuconnect-resource-name
    

Dashboard

From the Heroku Connect Dashboard:

  1. Export your Heroku Connect configuration from the Settings tab.

    a. Select Import/Export Configuration, then Export, and Export again in the confirmation window to download the JSON file.

  2. If you have any read or write mappings, make sure you aren’t writing any new data to those tables. Also, make sure all the mappings are in DATA_SYNCED to ensure all your data is present in Salesforce. From the Settings tab, click Manage Connection, and then Pause to stop activity on the connection.

  3. Destroy the Heroku Connect add-on from the Resources tab on Heroku Dashboard. Select the actions button (three vertically-stacked dots) on the add-on’s to open the menu. Then select Delete Add-on.

  4. Create a new Heroku Connect add-on from the Resources tab on Heroku Dashboard. Search for and add the Heroku Connect add-on.

  5. Authenticate your add-on by opening the Heroku Connect Dashboard and select Setup Connection.

    a. Select the Heroku Postgres database and schema to connect to your add-on, and click Next.

    b. Select the Salesforce org type and API version for your connection and select Authorize to log in with your Salesforce credentials.

  6. Import the mapping configuration you exported from step one from the Settings tab.

    a. Select Import/Export Configuration, then Import.

    b. Select Choose File and select the file to upload, and then select Upload.

Select the Write Algorithm For Your Connection

Select the algorithm Heroku Connect uses when writing data to Salesforce. The same algorithm is used for all read-write mappings. See Write Algorithms for more info.

  1. Open the Heroku Connect dashboard.
  2. Select the Settings tab.
  3. Select Manage Connection.
  4. Scroll down to the Write Algorithm section and select your choice.

Recover Synchronization After an Error

  1. Open the Heroku Connect dashboard.
  2. Select the Settings tab.
  3. Select Manage Connection.
  4. Select Recover From Error to clear out an unexpected error state and resume synchronization. See Heroku Connect Log Messages and Common Errors for more info.

Recover Synchronization After a Database Rollback

Heroku Connect uses a high-water mark methodology. Rolling back a synced Heroku Postgres database causes inconsistent data. Reload mappings after a database rollback to recover data consistency.

Changing Field Definitions in Salesforce

Heroku Connect doesn’t automatically change the table schema in PostgreSQL after you’ve changed the corresponding field definition in Salesforce. Attempts to automatically change the field can result in data loss or corruption. See Changing Field Definitions in Salesforce for more info.

Connection Configuration Audit Trail

Heroku Connect keeps a record of administrative changes to your connection’s configuration. Click Download Audit Trail to export to CSV. See Audit Messages for more info.

Keep reading

  • Heroku Connect Administration

Feedback

Log in to submit feedback.

Mapping Configuration Options Mapping Configuration Options

Information & Support

  • Getting Started
  • Documentation
  • Changelog
  • Compliance Center
  • Training & Education
  • Blog
  • Support Channels
  • Status

Language Reference

  • Node.js
  • Ruby
  • Java
  • PHP
  • Python
  • Go
  • Scala
  • Clojure
  • .NET

Other Resources

  • Careers
  • Elements
  • Products
  • Pricing
  • RSS
    • Dev Center Articles
    • Dev Center Changelog
    • Heroku Blog
    • Heroku News Blog
    • Heroku Engineering Blog
  • Twitter
    • Dev Center Articles
    • Dev Center Changelog
    • Heroku
    • Heroku Status
  • Github
  • LinkedIn
  • © 2025 Salesforce, Inc. All rights reserved. Various trademarks held by their respective owners. Salesforce Tower, 415 Mission Street, 3rd Floor, San Francisco, CA 94105, United States
  • heroku.com
  • Legal
  • Terms of Service
  • Privacy Information
  • Responsible Disclosure
  • Trust
  • Contact
  • Cookie Preferences
  • Your Privacy Choices