Heroku Connect Diagnostics
Last updated 10 August 2017
Table of Contents
Heroku Connect interacts with your Salesforce org and your Postgres database in a variety of ways, which means there are a number of factors than can impact the performance, reliability and correctness of sync operations.
We provide a CLI plugin to inspect the current state of your connection and perform basic operations. One of those operations is the ability to run some simple diagnostics to identify common problems that may affect you, using the
$ heroku connect:diagnose --verbose Diagnosing connection... done === Connection: protected-ridge-4963 GREEN: Salesforce API Version GREEN: Number of Mappings GREEN: Database Plan === Account GREEN: Calculated Fields GREEN: Upsert Field GREEN: Binary Fields GREEN: Number of Fields GREEN: Required Fields
Results can be either red, yellow or green. Red results indicate errors that are likely causing problems with the flow of data. Yellow results indicate warnings that may or may not be actual problems, depending on your application. Both red or yellow results will include additional details about the problem, as well as a link to more documentation, where applicable. Green results indicate no known problems, and therefore no additional detail is provided.
Check: Salesforce API Version
Salesforce periodically upgrades the capabilities of its API, but Heroku Connect will not automatically use newer versions as they’re released, in order to ensure consistency in how your data is handled. If you’re using a very old API version, you should consider recreating your connection with a newer API version.
Check: Number of Mappings
Heroku Connect performance degrades as more mappings are added to your connection. This affects reading from and writing to Salesforce, as well as the responsiveness of your dashboard.
Check: Database Plan
Hobby tier Postgres databases are underpowered for typical Heroku Connect usage. If you’re using the paid
danketsu Heroku Connect plan, you should also be using a paid Heroku Postgres plan.
Check: Binary Fields
Binary fields aren’t supported by Heroku Connect, and may not behave as you expect.
Read more: Base64 binary fields
Check: Calculated Fields
Calculated fields aren’t supported by Heroku Connect, and may not behave as you expect.
Check: Number of Fields
When Heroku Connect pulls data from Salesforce, it reads in the entire record at once. When a lot of fields are mapped, this can severely degrade performance.
Check: Required Fields
There are a number of fields required for Heroku Connect to properly insert data from Postgres into Salesforce. If you have failed to map any of the required fields in Heroku Connect, you’ll need to ensure they’re being populated in Salesforce, for example by using a “before insert” trigger in Apex code.
Check: Upsert Field
When writing from Postgres to Salesforce, an upsert field is required to ensure that data can be matched up correctly between the two systems. An upsert field must be defined as a unique external ID field in Salesforce.
Read more: Upsert field
Check: Number of Large Text Area Fields
When Heroku Connect pulls data from Salesforce, it reads in the entire record at once. When this includes multiple large text area fields (which can be Long Text Area fields or Rich Text Area fields), this can severely degrade performance.
Check: Synthetic Fields
Synthetic fields are created by Heroku Connect and used to reference objects when writing data to Salesforce. Synthetic fields are unnecessary for read-only mappings and typically shouldn’t be mapped. In cases where you need or expect to switch between read-only and read-write, they can be mapped.
Check: Salesforce Field Changes
When the definition of a mapped field is changed in Salesforce, a corresponding change needs to be made to your database. Increases to the length of text fields are safe changes that can be done with an
ALTER TABLE statement. For example, if you increase the length of a field called
my_field__c from 50 to 60 on your
Lead object, you would execute a SQL command similar to:
ALTER TABLE salesforce.lead ALTER COLUMN my_field__c TYPE varchar(60);
All other field definition changes are considered to be unsafe and require you to:
- Remove the field from the mapping by editing the mapping, unselecting the field, and saving the mapping.
- Add the field to the mapping again by editing the mapping, selecting the field, and saving the mapping.