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 Administration
  • Mapping Configuration Options

Mapping Configuration Options

English — 日本語に切り替える

Last updated February 28, 2025

Table of Contents

  • Supported Salesforce Objects
  • Read Mode: Salesforce to Heroku Postgres Sync
  • Enable Write Mode: Heroku Postgres to Salesforce Sync
  • Troubleshooting Mapping Configurations (BAD_CONFIG)

A Heroku Connect mapping determines how a Salesforce object and its fields are persisted in Heroku Postgres and Salesforce. Mappings can be read-only from Salesforce, or read-write. Each mapping has its own polling method and frequency. This article is a reference of the configuration options available for mappings.

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.

Supported Salesforce Objects

The Supported Salesforce Standard Objects page lists the objects that can be mapped for the version of the Salesforce API being used by your connection.

Missing Objects and Fields

The most common reason for Heroku Connect not showing specific objects or fields upon creating or editing a mapping is insufficient permissions. Check the permissions for the Salesforce user used to authorize the connection and modify those permissions. Heroku Connect requires View All permissions for optimal operation. If an object doesn’t have that option, use View All Data instead.

Unsupported Objects

Heroku Connect supports most standard and custom objects that are retrievable via the SOAP and Bulk APIs. Greyed-out objects have caveats due to Salesforce API limitations. Exceptions are objects that require the use of object-specific filter criteria or aren’t fully supported by Bulk API. For example, these objects can’t be mapped with Heroku Connect:

  • KnowledgeArticleVersion and objects that end with __kav require the use of additional query criteria (PublishStatus=Online).
  • LeadHistory doesn’t support Bulk Paging and can’t be retrieved when there are more than 20,000 changed records to sync.
  • The Base64 type of Attachment is unsupported by Bulk API and can’t be retrieved when there are more than 20,000 changed records to sync. This means that images or other types of binary data are unsupported. An alternative approach is to store images in Amazon S3 and sync a simple text field containing a URI for the image between Salesforce and your database.
  • Archiving Event and Task objects in Salesforce results in the IsArchived flag being set. Since the Salesforce Bulk API can’t retrieve archived Events and Tasks, Heroku Connect can’t synchronize them. Only unarchived Events and Tasks are synced.

Other exceptions and warnings apply. See Heroku Connect Database Tables for more info.

Read Mode: Salesforce to Heroku Postgres Sync

Mappings are read-only by default: Heroku Connect polls your Salesforce org for changes and synchronizes them to your database. Changes made in your Heroku Postgres database don’t synchronize back to Salesforce unless you enable write mode.

You can select a sync method and frequency when creating or editing a mapping: standard polling or accelerated polling.

Synchronization screenshot

For demo connections, Connect reduces mapping poll times to once an hour after 7 days of inactivity. After 14 days of inactivity, polling happens once a day. Connections are paused after 31 days of inactivity. These limits don’t apply to paid plans.

Standard Polling of Salesforce

By default, Heroku Connect polls your Salesforce org for changes every ten minutes. The interval can range from two minutes (ten minutes in the demo plan) to 60 minutes. You can change the polling interval in one-minute increments.

A shorter polling interval is suitable for mappings where data changes frequently. A longer polling interval is best for mappings that change less often as it reduces API usage and processing overhead.

Accelerated Polling of Salesforce

Accelerated polling is ‘polling on demand’ versus the standard ‘polling at a fixed interval’.

Accelerated polling uses Salesforce’s Streaming API to notify Heroku Connect when data changes in your mapped objects in Salesforce. Heroku Connect uses these notifications to trigger polling in addition to standard polling.

Accelerated polling is available for all custom objects and some standard objects. For those objects that don’t support streaming, you can’t select this option when creating or editing a mapping.

If multiple notifications are received within a ten-second period, Connect triggers a single poll to reduce Salesforce API utilization.

Streaming isn’t a reliable indicator of change and operates on a best effort basis. To avoid interruptions to sync, Connect continues to automatically fall back to standard interval polling when streaming notifications aren’t received.

 

Accelerated polling sends a notification to Heroku Connect when data changes, but without any details of what data has changed. Accelerated polling only affects synchronizing data from Salesforce to Heroku, not synchronizing data from Heroku to Salesforce.

Enable Write Mode: Heroku Postgres to Salesforce Sync

To enable sync between Postgres back to your Salesforce org, check the Write database updates box in the Database > Salesforce section of the create/edit mapping page. See Writing to Salesforce for more details about how Connect writes to Salesforce.

All read-write mappings are synced using the same write algorithm chosen for the entire Heroku Connect instance.

Unique Identifier

Because Heroku Connect uses separate threads for reading and writing, use unique identifiers to prevent duplicate records. You can set a unique identifier (external ID) for each read-write mapping.

Salesforce provides a mechanism to define a custom field with the External ID and Unique attributes. These attributes help uniquely identify records coming from an external source, such as Heroku Postgres. You must enable both attributes on a field in Salesforce before you can select it as the unique identifier for a mapping.

When writing changes from Salesforce to Heroku Postgres, Heroku Connect matches records coming from Salesforce by the Salesforce ID (sfid) or by the unique identifier if the Salesforce ID is NULL.

If there’s no sfid or unique identifier match, Connect creates a new, duplicate record in Postgres. The duplicate has the sfid retrieved from Salesforce while the original record is left without a sfid. Using a unique identifier ensures that no matter which process attempts to write the record first, there are no integrity errors and the record is always matched. You can also reference the newly inserted row from a foreign table by this external id. See Simple Relationships Between Two Objects and Relationship External IDs for more info.

Newly created custom fields may be hidden by default, even if the user is a System Administrator. After creating a custom field in Salesforce, navigate to the custom field editor and click View Field Accessibility to edit permissions as required.

 

Changing the external ID values can lead to a lack of parity in the data synced between your database and Salesforce.

There are several considerations to keep in mind while using unique identifiers with Heroku Connect: Treat unique external IDs as aliases for a Salesforce ID. Don’t manually change these IDs. Choose a unique mechanism for generating external IDs, such as uuid_generate_v4() or gen_random_uuid() for generating random UUIDs. Postgres integer sequences aren’t recommended as they’re not guaranteed to be unique. Don’t use the ID field in the Heroku Connect database as the unique external ID. These ID numbers reset when importing your configuration into a new database or when reloading a table.

Re-inserted Records

Even when using unique identifiers, it’s possible to create duplicate records if you delete records in Salesforce shortly after syncing them via Heroku Connect.

See Re-inserted Records for more info.

Heroku Postgres Polling

Heroku Connect polls your Heroku Postgres database for updates every two minutes. This interval isn’t configurable. If updates are detected, Heroku Connect begins to write those changes back to Salesforce. Heroku Connect doesn’t poll for additional database updates while the write operation to Salesforce is underway. Write operations are executed across all mappings in chronological order. When a given write operation completes, the poll cycle begins again every two minutes.

In addition to the two-minute poll, your database attempts to detect new or updated records and notify Connect to initiate a poll using pg_notify. This notification happens at most every 10 seconds. These intervals aren’t configurable.

Troubleshooting Mapping Configurations (BAD_CONFIG)

Connect performs the following validations to ensure that your configuration is correct:

  • The object isn’t a Big Object or a Platform Event.
  • The object doesn’t require a filter to query (e.g., CollaborationGroupRecord, ContentDocumentLink, ContentFolderItem, ContentFolderMember, FeedPollVote, IdeaComment, KnowledgeArticleVersion, Vote, etc.)
  • The object is listed as “queryable” by the Salesforce API
  • The object doesn’t have implementation restrictions (e.g., KnowledgeArticleVersion objects)
  • The object has a timestamp field that can be used for synchronization (e.g., SystemModstamp)
  • The object has an Id field
  • If the mapping is set to read-write, the object must be updateable
  • The fields of the mapping have known types that can be mapped into Postgres types

If your mapping is in the BAD_CONFIG state, go through this list and edit your mapping accordingly. Heroku Connect attempts to recover from this error after you save your mapping changes.

Keep reading

  • Heroku Connect Administration

Feedback

Log in to submit feedback.

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