Heroku Connect FAQ and Best Practices
Last updated July 22, 2021
Syncs and Connections FAQs
Can I synchronize a subset of data from Salesforce?
Heroku Connect does not provide a mechanism for partially syncing data as doing so can cause issues when trying to keep track of which records should or shouldn’t be synchronized to your database, leading to mappings that can drift out of sync with Salesforce.
Can I retry records that failed to write to Salesforce?
See Resolving Write Errors for instructions.
Why were rows still synchronized after I paused my connection?
When you pause synchronization Heroku Connect will finish processing any active synchronization tasks. Any further changes made either in your database or in Salesforce after you pause will not be synchronized until you resume your connection.
What does resuming the connection do?
Resuming a connection is a non-destructive action that allows Heroku Connect to recover from unexpected errors. Processes are restarted and will resume synchronization from the time of the last successful poll.
To resume a connection, navigate to the
Manage Connection and click the
Why do several large text fields cause synchronization performance problems?
If you have a number of fields mapped that are Long Text Area fields or Rich Text Area fields, these tend to hold large amounts of data. The Salesforce API imposes restrictions on the size of responses or generated bulk results files. This means that Heroku Connect will need to make many more network requests to fetch your data than it would without those fields being mapped. The extra time spent querying Salesforce’s API will decrease the performance of Heroku Connect for the mapping(s) containing these fields.
The performance penalty is only paid on mappings that have several of these large text area fields.
Can Heroku Connect sync images from Salesforce?
Heroku Connect does not currently support images or other types of binary data. 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.
Why aren’t all of my Events or Tasks being synchronized?
Event and Task objects can be archived by Salesforce resulting in the
IsArchived flag being set. Unfortunately the Salesforce Bulk API does not allow archived Events and Tasks to be retrieved, which in turn means Heroku Connect cannot synchronize them. Only unarchived Events and Tasks are synced.
Why are some of my Salesforce row counts missing?
For mapped objects with a high number of records, some counting operations take too long to succeed. When this happens, Heroku Connect will attempt to use a Salesforce API that provides row count estimates instead, but this API isn’t available for all objects. In those situations, such as
CaseComment, Heroku Connect may be unable to retrieve a row count at all. Heroku Connect will still sync data successfully under these conditions, even though your Heroku Connect dashboard will not show the number of Salesforce records.
I can’t find certain records by their 15-character Salesforce ID
Heroku Connect uses 18 character Salesforce IDs (or
sfids). You may occasionally encounter Salesforce IDs outside of Heroku Connect that are 15 characters long. If you need to search for the corresponding record in your database, use a wildcard search, like this:
SELECT * FROM salesforce.contact WHERE sfid LIKE '0030P00001yr8Fq%';
Managing Heroku Connect FAQs
What happens to my data if I delete my application?
Heroku Connect is an application-specific add-on (it cannot be shared): this means that when you delete the application, the add-on and the associated data from the database will also be deleted. If the Heroku Postgres database is attached to other applications then the database itself will not be deleted, but the mapped tables used by Connect will be removed.
Can I use Sharing Rules to restrict record visibility?
You may be considering Sharing Rules as a workaround to ensure Connect can only synchronize a subset of data. However, this approach is unsupported as it can cause mappings to become out of sync and can have an adverse impact on performance.
Sharing Rules do not provide any form of notification mechanism when records move in or out of scope, potentially causing them to be orphaned either in your database or Salesforce. For example, if Heroku Connect has synced a record that later moves out of the scope of the Sharing Rule, Connect will no longer have access to it via the Salesforce APIs, but it will still exist in the database.
Heroku Connect performs best with “View All” permissions on each mapped object as this removes the need for Salesforce APIs to carry out permissions checks on each record being accessed. Removing this permission from the integration user in order to use Sharing Rules can have drastic performance implications when querying and updating data in your Salesforce organization.
How can I get my Salesforce assignment rules to run for Leads and Cases?
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, please enter a support ticket. If you have multiple connections, be sure to mention them so that we can enable the setting for each one.
Can I create more than one Heroku Connect add-on per app/database?
You can have more than one Heroku Connect add-on (a.k.a, connection) per app. Each connection, however, must use a different Postgres schema.
We find that Heroku Postgres performance typically begins degrading when there are around 50 schemas in one database.
How do I change the recipients of notifications?
In the Heroku Connect dashboard navigate to the
Manage Connection and check or uncheck the
Notifications Enabled box next to the relevant users in the Access list. For more information see Errors with associated notifications.
How many Postgres connections does Heroku Connect require?
Heroku Connect uses 1 connection per mapping and another connection if any of the mappings are in read-write mode. For example, if you have a connection with 20 mappings, 5 of which are in read-write mode, then Heroku Connect will likely use 21 connections to your Postgres database at once.
Is Heroku Connect compatible with Shield Private Spaces and Shield Postgres?
Yes, there is a Shield Connect plan that 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, please first 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 cannot be provisioned inside of a Shield Private Space.
Can I store tables in my Connect schema that aren’t synchronized with Salesforce?
No. It is not advised to store tables that are not synchronized by Connect in your Connect schema. These tables can pollute your
_trigger_log and cause Connect to slow down while trying to process and ignore those captured changes. Further, if you’re developing against a sandbox organization, you may have to recreate the connection after a sandbox refresh and lose those tables.
If you need an easy way to access tables across multiple schema, you should look into PostgreSQL’s
search_path functionality for your application.
Does Heroku Connect support database rollbacks?
No. Heroku Connect uses a high-water mark methodology. By rolling your database into the past, your data will become inconsistent. You can reload all of your mappings in order to get your data into a consistent state again after performing a rollback.
Why does some of my data in Postgres not match what I wrote to Salesforce?
There are a few scenarios where data in Postgres might not exactly match what was written to Salesforce:
- Salesforce trims extra spaces from the start and end of any strings that are entered. This is done before Heroku Connect ever gets the value, and can be seen if you enter a value surrounded by spaces directly in the Salesforce UI and immediately view the value afterward.
- If a string value is completely empty, the Salesforce API will send it as NULL, and therefore that’s how it will be stored in Postgres. This is a feature of the Salesforce API, which Heroku Connect has no control over.
- Number values are stored in Postgres as a
doublecolumn, which has 15-digit precision. Salesforce values that exceed this limitation will still sync via Heroku Connect, but with reduced precision. This is particularly noticeable with extremely large values.
How can I ensure my own custom Postgres triggers work well with Connect?
Detailed information about using triggers with Heroku Connect can be found in the Using Custom Trigger With Heroku Connect section of the docs.
Is the use of Amazon RDS with Heroku Connect supported?
The use of Amazon RDS with Heroku Connect is not currently supported. Heroku Connect is designed and optimized to work with Heroku Postgres so as to provide the best possible experience across the full application development lifecycle.