Deep-dive on the Next Gen Platform. Join the Webinar!

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
Hide 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
      • Working with Node.js
      • Troubleshooting Node.js Apps
      • Node.js Behavior in Heroku
    • 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
      • PHP Behavior in Heroku
      • Working with PHP
    • 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
    • Working with AI
  • 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

Heroku Connect

English — 日本語に切り替える

Last updated July 12, 2024

Table of Contents

  • Use Cases
  • Supported Objects and API Versions
  • Setting Up Heroku Connect
  • Mapping Objects
  • Sync Performance
  • The Heroku Connect Dashboard
  • Salesforce Organizations
  • Security
  • Advanced Usage
  • Managing Add-on Plans
  • Limitations
  • What Happens If You Delete Your Application
  • Support

Heroku Connect is an add-on that synchronizes data between your Salesforce organization and a Heroku Postgres database. Using Heroku Connect with Heroku Postgres, you can build custom applications that interact with your Salesforce data.

If you’re new to Heroku in general, see our Getting Started guides before setting up Heroku Connect.

Use Cases

Heroku Connect provides a pure data integration. It syncs only object and table data. You can decide which objects sync as read-only or as read-write. This architecture is useful in many scenarios where you want a Heroku application to store or manipulate the data. If you’re building a Heroku app or already have data in Heroku Postgres, then Heroku Connect is a good fit for your Heroku to Salesforce integration.

For example, one or more Salesforce orgs can sync to the same Heroku Postgres database. Your Heroku app can pull from the Postgres database to perform analytics, invoice generation, lookups with other services, and so on. The output of these actions can modify or generate Postgres database rows which sync back to Salesforce.

Supported Objects and API Versions

The complete list of objects that Heroku Connect supports for your version of Salesforce is available on the Supported Salesforce Standard Objects page. The Bulk API isn’t available in versions before Salesforce API v39 so use at least v39 with Heroku Connect. See Supported Salesforce Objects for more info.

New Heroku Connect add-ons default to the current major release version of the Salesforce API. You can also specify the API version at connection creation.

Setting Up Heroku Connect

Heroku Connect can only be used with Salesforce editions that have API access. Some Salesforce plan types, including trial versions, don’t have API access by default and can’t be used with Heroku Connect.

Heroku Connect instances are located in the same region as the application that they’re attached to.

By default, the Heroku Connect demo plan is used when the add-on is provisioned. Customers with contracts for Heroku Connect’s paid plans can also provision enterprise and/or shield plans. See the Available plans section and contact sales for more details.

Quick Start Guides

See setup instructions using the tool of your choice:

  • Quick Start: Heroku Connect: This guide helps you set up Heroku Connect via the dashboard.
  • Quick Start: Heroku Connect CLI: This guide helps you set up using the Heroku Connect CLI plugin.
  • Quick Start: Heroku Connect API: This guide helps you set up using the Heroku Connect API.

Setup Recommendations and Considerations

  • Although you can use a smaller plan with Heroku Connect, it’s strongly recommended to use at least a standard-4, premium-4, private-4 or shield-4 database. Smaller database plans have insufficient connection limits and I/O performance for most production use cases of Heroku Connect.
  • It’s important to carefully consider the solution architecture of geographically distributed architectures as network latency can become a significant factor in service performance. The best practice is to co-locate Connect and Postgres in the same region, as geographically close to the Salesforce org as possible.
  • After authenticating to an org, you can’t change it at a later date: see Salesforce organizations for more information.
  • After selecting the Salesforce API version you want Heroku Connect to use during setup, the API version can’t be changed. Create a new instance using a different API version to change it at a later date.
  • It’s recommended to leave your Heroku Postgres database times in the UTC timezone. Heroku Connect expects the UTC timezone to operate properly.
  • Use a dedicated integration user for Heroku Connect with sufficient permissions for syncing. Following the principle of least privilege, tailor the permissions of the integration user based on your specific needs. Both the user and the Salesforce org must have the API Enabled permission granted. To ensure optimal performance, grant the View All or Modify All permissions in the object you’re granting permission to. Without the View All permission, Salesforce checks permissions for each row individually, which precludes the use of indices and results in greatly reduced performance. For larger connections, the lack of View All can also result in OPERATION_TOO_LARGE errors that cause sync to fail altogether. It’s also recommended to grant the View Setup and Configuration permission to your integration user. Granting this permission lets Heroku Connect use a more efficient method for returning row counts for objects with a large number of records.

When the integration user’s password changes or expires in Salesforce, it doesn’t affect the session or refresh token that Heroku Connect is using. It doesn’t cause connections to become unauthorized.

Mapping Objects

A mapping determines how a Salesforce object and its fields are persisted in Heroku Postgres and Salesforce. See Managing Heroku Connect Mappings and Mapping Configuration Options for more info.

Sync Performance

Factors that affect sync performance:

  • Object size (mapping many columns)
  • High volumes of changes on either side (Salesforce or database)
  • Using an ORM that ‘touches’ or saves nonexistent changes to records
  • Overall database load

Sync performance varies widely from one connection to another. The best way to determine performance is testing with a production Salesforce org and a production database plan. See Optimizing Heroku Connect Performance for more info.

The Heroku Connect Dashboard

Heroku Connect comes with its own dashboard to configure, monitor and troubleshoot your connection. See The Heroku Connect Dashboard for more info.

Salesforce Organizations

You authenticate to a Salesforce org as part of the configuration process for Heroku Connect.

When you authenticate Heroku Connect to an org, the mappings you create are specific to that org. This includes both the structure of the underlying database tables and the data that is synchronized between Salesforce and the database. In order to reduce the potential for data conflict and corruption, it’s not possible to reauthenticate an existing Heroku Connect connection to a different Salesforce org.

Sandbox orgs can be periodically refreshed: this involves creating a new snapshot of data from the production org and, at the point of activation, replaces the current sandbox with a new org.

To sync data from a new production or a refreshed sandbox org, see Managing Heroku Connect Sync and Connections.

Login IP Restrictions

If your Salesforce org has org-wide or profile-based IP restrictions, you must extend your range of allowed IP addresses to include Heroku Connect. Connect runs inside its own Private Space and you can add these IPs to your allowed list in Salesforce.

Cell IP Addresses
Dublin (EU) 52.214.175.26, 52.208.24.13, 52.208.130.154, 52.51.165.133
Dublin-2 (EU) 54.216.192.111, 54.220.228.19, 52.211.107.184, 54.247.146.62
Frankfurt 35.156.46.88, 35.156.50.253, 35.156.52.2, 35.156.47.9
London 35.179.69.185, 35.176.61.130, 18.132.75.161, 18.170.156.203
Montreal 3.98.151.8, 3.96.95.102, 35.182.53.41, 15.156.115.7
Mumbai 35.154.208.62, 15.206.112.151, 3.110.39.82, 15.207.246.110
Oregon 52.37.54.207, 52.37.42.188, 52.37.54.223, 52.37.32.69
Singapore 18.143.231.77, 3.1.125.189, 18.141.97.227, 18.143.254.53
Sydney 52.62.247.222, 52.64.71.172, 52.62.66.221, 52.62.69.183
Tokyo 52.193.240.226, 52.68.146.69, 52.196.222.211, 52.196.223.90
Virginia (US) 52.201.85.23, 52.201.89.242, 52.71.226.41, 52.201.69.94
Virginia-2 (US) 3.210.174.175, 3.210.168.103, 52.205.195.161, 54.163.146.74
Virginia-3 (US) 3.209.200.83, 18.205.77.142, 34.238.32.220, 54.205.161.147
Virginia-4 (US) 3.218.231.103, 35.173.98.137, 52.45.188.236, 54.205.104.78

You can find your connection’s cell by going to the connection’s Manage Connection page and finding the Cell Label value.

You can verify that Heroku Connect is logging in successfully by viewing the Login History for your Salesforce org. You should see entries where the Username matches the email address you have used to authenticate and the Application is either Heroku Connect or Heroku Connect EU depending on the region where your instance is located.

Salesforce has a session setting that allows you to lock sessions to the IP address from which they originated. Because Heroku Connect uses multiple IP addresses, avoid enabling this setting.

 

Heroku announces changes made to these IP addresses in the Changelog. Subscribe to the changelog to get notifications of these changes.

Security

Heroku Connect observes Salesforce secure practices by storing an OAuth token which can be revoked at any time by the Salesforce admin. Heroku Connect automatically refreshes the access token in Salesforce when the token expires.

Heroku Connect uses secure SSL connections whenever data moves from Salesforce to the Heroku Postgres database, or from the Heroku Postgres database to Salesforce. Encrypted data may travel over the public internet while in flight and may be temporarily stored on an encrypted volume for up to 24 hours while being processed but otherwise isn’t stored outside of your Heroku Postgres database.

More information on Heroku security can be found here.

Using with Heroku Shield

Heroku provides a Shield Connect plan that is compatible with Shield Private Spaces. This plan meets HIPAA data processor requirements. To provision this plan, you must have both a Shield Private Space and Shield Postgres provisioned and a contractual entitlement in place. To enable access to Shield Connect, work with your account representative.

You can choose the Shield plan when adding a Heroku Connect add-on via the Heroku Dashboard. You can also provision it via the CLI: heroku addons:create herokuconnect:shield -a your_app_name

Note that the standard Heroku Connect plan can’t be provisioned inside of a Shield Private Space.

Revoking Access to a Heroku Connect Add-on

Heroku Connect uses Heroku App Permissions to allow access to the Heroku Connect dashboard. Users are remembered the first time they perform an addons:open or use the CLI to associate themselves with the Connect Add-on. Heroku Connect proactively checks that the user has access after 6 hours or a period of inactivity, whichever comes first. If you wish to revoke access to a specific user sooner, then you can revoke permissions for the target user and perform an addons:open with any other user to force the target user to lose access to the add-on.

Advanced Usage

Optimizing Performance

See Optimizing Heroku Connect Performance.

Multiple Instances of Heroku Connect

It’s possible to add multiple Heroku Connect add-ons to a single application; for example, you may wish to synchronize data from multiple Salesforce organizations and one way to achieve this is to have multiple add-ons each authorized and configured to work with different organizations.

Using a different database schema name for each organization allows a single Heroku Postgres database to be used with multiple Heroku Connect add-ons. Heroku Postgres performance typically begins degrading when there are around 50 schemas in one database.

It’s also possible for multiple instances of Heroku Connect to be connected to the same Salesforce organization. This may be desirable to synchronize large numbers of Salesforce objects from a single organization.

When using multiple Heroku Connect add-ons, you must use a distinct integration user per add-on. Salesforce enforces a limit of ten concurrent queries per user. Additionally, each Heroku Connect add-on uses a different access token for Salesforce API calls, and Salesforce has a default limit of five tokens per integration user. If you use the same integration user for multiple add-ons and exceed the limit, your connections will require frequent reauthorization into Salesforce, which will repeatedly pause synchronization.

When multiple Heroku Connect add-ons exist it’s necessary to use the globally unique identifier assigned to the add-on when running commands from the CLI. For example to open the Heroku Connect dashboard:

$ heroku addons:open herokuconnect-gladly-8321

For more detailed information on Heroku Connect usage and features, see the Heroku Connect category page.

Managing Add-on Plans

Available Plans

There are three plans for Heroku Connect:

  • demo: This is the default plan when provisioning the add-on and provides access to all features of Heroku Connect with the following limitations:

    • A maximum of 10,000 synchronized rows across all mappings.
    • A minimum polling interval of 10 minutes.
    • The trigger log is archived for 7 days instead of 31 days.

The 10,000 synchronized rows limit counts the total rows synced in Postgres. The limit doesn’t count all sync activity across your rows, such as each update to a row.

  • enterprise: This is the paid plan that you’ll use after purchasing Heroku Connect. If you have existing add-ons using the demo plan, you can upgrade them by following the steps in the Upgrading the add-on plan section. Rows allocated to you under your contract are calculated according to the total rows synchronized across all mappings, regardless of how often they change.

The enterprise plan was called danketsu previously.

  • shield: This is the paid plan that you’ll use after purchasing Heroku Shield Connect. Heroku Shield Connect can only synchronize data with Heroku Postgres databases that have shield plans.

The enterprise, shield, and danketsu plans will appear with a ‘contract’ price in the add-ons list for your application in the Heroku dashboard. You should verify that the plan name is enterprise, shield, or danketsu if you wish to ensure that you’re using a paid plan.

Contact sales for more information on the Heroku Connect enterprise or shield plans.

You can use the heroku addons command to see if your application already has Heroku Connect provisioned and the current plan:

$ heroku addons | grep herokuconnect
herokuconnect (herokuconnect-gladly-8321)  demo   free

Upgrading the Add-on Plan

If you’re operating inside a Heroku team with a paid plan entitlement, you can upgrade by using the Edit plan option in the Heroku Dashboard or using the CLI:

$ heroku addons:upgrade herokuconnect:enterprise
WARNING: No add-on name specified (see `heroku help addons:upgrade`)
Finding add-on from service herokuconnect on app sleepy-ocean-5276... done
Found herokuconnect-gladly-8321 (herokuconnect:demo) on sleepy-ocean-5276.
Changing herokuconnect-gladly-8321 plan to herokuconnect:enterprise... done, (contract)
Plan change successful

If you have multiple Heroku Connect add-ons attached to your application you’ll also need to specify the globally unique identifier assigned to the add-on when running the upgrade command:

$ heroku addons:upgrade herokuconnect-gladly-8321 herokuconnect:enterprise
Changing herokuconnect-gladly-8321 plan to herokuconnect:enterprise... done, (contract)
Plan change successful

Removing the Add-on

You can remove the add-on using the Heroku dashboard or using the CLI.

Mapped tables are dropped from your Postgres database when removing the add-on. Ensure you have an up-to-date backup of your database before proceeding.

 

When you remove your add-on, we try to DROP SCHEMA for your connection schema. The schema isn’t dropped if there are any remaining tables or functions associated with the schema.

$ heroku addons:destroy herokuconnect

 !    WARNING: Destructive Action
 !    This command will affect the app: sleepy-ocean-5276
 !    To proceed, type "sleepy-ocean-5276" or re-run this command with --confirm sleepy-ocean-5276

> sleepy-ocean-5276
Destroying herokuconnect-gladly-8321 on sleepy-ocean-5276... done

If you have multiple Heroku Connect add-ons attached to your application, you must specify the globally unique identifier assigned to the add-on you wish to remove when using the CLI. For example herokuconnect-gladly-8321.

Limitations

  • Heroku Connect is incompatible with connection pooling for Heroku Postgres.
  • Heroku Connect can’t be added to review apps via the app.json file. You can manually provision Heroku Connect after the review app has been created.
  • Heroku Connect creates functions in the public schema of your database in order to sync your data. If the public schema is removed from your search_path or if these functions are deleted, Heroku Connect can no longer find them which impairs data syncs. See this Knowledge Base article if Heroku Connect can’t find get_xmlbinary or other shared functions.
  • Foreign data wrappers can’t be used with Heroku Connect as postgres_fdw changes the search_path to pg_catalog. This prevents Connect from using shared functions stored in the public schema needed to sync data.
  • Heroku Connect uses Postgres triggers to observe changes in your Connect tables and write your changes to Salesforce. If you implement your own custom triggers on Connect tables, Connect may miss your updates, or you may create additional load. Heroku Support may not be able to provide help with custom triggers, so use them at your own risk. See more guidance on using custom triggers.
  • By default, when Heroku Connect writes data to Salesforce, assignment rules aren’t run. If you’d like to enable your default assignment rules for Leads and Cases, create a support ticket. If you have multiple connections, be sure to mention them so that they can enable the setting for each one.

What Happens If You Delete Your Application

Heroku Connect is an application-specific add-on. You can’t share the add-on across applications. When you delete the application, it also deletes the add-on and the associated data from the database. If the Heroku Postgres database used by Heroku Connect is attached to other applications, then the database remains when you delete the application. However, deleting the app still removes the mapped tables used by Connect from the database.

Support

All Heroku Connect support and runtime issues should be submitted via one of the Heroku Support channels.

Keep reading

  • Heroku Connect (Salesforce sync)

Feedback

Log in to submit feedback.

Writing Data to Salesforce with Heroku Connect Heroku External Objects

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