November 1, 2024

Heroku Connect: What is Heroku Connect and alternatives

Heroku Connect is a data integration tool designed specifically for syncing Salesforce with a Postgres database hosted on Heroku. It works by polling Salesforce for changes at regular intervals and syncing those updates to Postgres.

Most teams use Heroku Connect for bi-directional syncing, where changes in your Postgres database reflect in Salesforce, and vice versa. While this can be useful for some workflows, it’s not without its limitations.

It’s also worth noting that Heroku Connect is different from Salesforce Connect. While Heroku Connect syncs data between Salesforce and Postgres, Salesforce Connect brings external data into Salesforce, allowing it to act as a single source of truth.

It's not real-time

A key limitation with Heroku Connect is its sync performance. Heroku Connect polls data changes at regular intervals from both Salesforce and Postgres to sync it to the other app. The frequency depends on settings, but does not offers real-time performance. Factors like the physical distance between your Heroku Connect cell and your Salesforce instance also introduce latency.

Heroku Connect is not a real-time sync service, but an eventually consistent one. This means updates don’t always happen instantly:

Heroku Connect is designed to be eventually, but not immediately, consistent with Salesforce. With read-write mappings, Postgres may temporarily fall out of sync when multiple updates are made to the same field. This behavior is expected and can vary.

(via)

In practice, this means that if your team is making rapid updates in Salesforce, those changes might not appear in Postgres right away - especially during busy periods. For teams needing real-time visibility across systems, this delay could create problems.

Silent sync failures

Some sync issues fail silently and aren't flagged. These are things like mismatched data types, formatting issues, timezones instead of timestamps, or using 1/0 vs. boolean flags.

An actual issue we've seen before: the sales team could enter any deal value in a Salesforce deal via the Salesforce UI. However, PostgreSQL had a restriction on decimal precision (0). When a sales rep entered $2500.50 into a deal, Salesforce tried to sync the data to Postgres but wasn't allowed. The sync failed, and the data inconsistency wasn't flagged.

To fix this, you'll need to build entire data extraction and data consolidation pipelines. It's a manual effort but the only way to guarantee Heroku Connect syncs valid data without failing silently.

It's difficult to set up triggers

Heroku Connect works well for basic two-way syncing between Salesforce and Postgres. But most teams want to go further - like triggering actions based on data changes. For example, you might want to send a welcome email when a new contact is created in Salesforce.

Unfortunately, Heroku Connect doesn’t make this easy. It doesn’t have built-in support for event triggers or external actions like sending HTTP requests or emails. To achieve this, you’d need to write custom code to detect changes in your Postgres database and handle those triggers manually.

Here’s an example of a Postgres trigger you’d need to set up to send a welcome email when a new account is created:

CREATE OR REPLACE FUNCTION send_welcome_email() 
RETURNS trigger AS $$ 
BEGIN 
  PERFORM pg_notify(
    'new_account', 
    row_to_json(NEW)::text
  );
  RETURN NEW;
END;
$$ LANGUAGE plpgsql;

CREATE TRIGGER notify_new_account 
AFTER INSERT ON accounts 
FOR EACH ROW 
EXECUTE FUNCTION send_welcome_email();

This setup adds complexity to your workflow. And since Heroku Connect itself relies on triggers to sync data, adding your own custom triggers could interfere with its operation.

You have to resolve and retry syncs manually

Heroku Connect automatically retries certain types of errors, such as timeouts or connection resets, but it doesn’t handle all errors automatically. For unexpected issues like SYSTEM_ERROR or foreign key constraint errors, you’ll need to manually intervene.

This can become a bottleneck if you're syncing large volumes of data or working with complex systems prone to these errors. For example, if your sync fails due to foreign key issues, you’re responsible for diagnosing the problem, resolving it, and restarting the sync manually.

You're locked into Heroku

Heroku Connect only works if you’re using Heroku to host your database. If your team prefers a different cloud provider - whether that's AWS RDS, Google Cloud SQL, or an on-prem database - then Heroku Connect won't work for you.

This is a significant limitation for teams that want to keep their cloud options open. If you’re ever looking to move off Heroku or adopt a multi-cloud strategy, you’ll need to rebuild your entire Salesforce integration.

It only works with Salesforce and PostgreSQL

Not only does your database have to be hosted on Heroku, but it also has to be a PostgreSQL database. This is a problem, since many teams also use other databases or data warehouses alongside Postgres (like Snowflake, BigQuery, Motherduck, Databricks, or MongoDB).

With Heroku Connect, you're locked into one bi-directional sync: Salesforce and PostgreSQL. You'll still need another solution if you want to sync other databases.

It's really expensive + there are hidden costs

Heroku Connect’s pricing is bundled with Salesforce, and it’s based on the number of rows synced across all mappings. You’re charged for every record in your Salesforce instance, regardless of how often it changes.

For teams with large datasets, costs can quickly spiral. We’ve seen quotes ranging from $5,000 to over $50,000 per month, depending on the size of the Salesforce instance and the sync frequency. If you have millions of contacts but are only syncing new ones, you’re still paying for all that stale data.

On top of that, you'll also need a Heroku Enterprise license - an annual or multi-year contract.

So the total requirements are:

  • A Salesforce edition with API access (additional cost for Group or Professional; included in Enterprise)
  • A Heroku Enterprise license
  • A Heroku Connect plan

Heroku Connect alternatives

For teams looking for a more flexible and cost-effective solution, Stacksync offers a better alternative to Heroku Connect. Here’s how we compare:

No-code trigger editor

With Stacksync, setting up triggers is simple and code-free. You can easily configure events like sending a welcome email when a new contact is added in Salesforce - without writing any custom logic. Our no-code trigger editor enables you to notify HTTP REST endpoints automatically, streamlining processes that would otherwise require custom code with Heroku Connect.

Real-time performance

Stacksync powers real-time bi-directional sync that can sync up to millions of records per minute. Also, Stacksync can leverage CDC, triggers and regular data polling to optimize performance depending on how many record updates need to be synced concurrently. Stacksync can achieves sub-second sync speed.

Automatic sync retries and observability

Stacksync takes care of sync failures for you. Unlike Heroku Connect, which requires manual intervention for many sync errors, Stacksync automatically retries any failed syncs.

Plus, with our built-in Issues dashboard, you get complete visibility into any sync issues. You’ll see exactly which records are affected and investigate further, or let Stacksync resolve it automatically. For each issue in the Issues dashboard, you have the option to retry or revert the data update that caused the issue.

No cloud lock-in

With Stacksync, you’re free to host your Postgres database wherever you want. You can sync Salesforce with Snowflake, Google Cloud SQL, Amazon RDS, Supabase, Neon and more. This flexibility is particularly valuable for teams that need to avoid cloud lock-in or follow specific compliance requirements.

Simpler pricing

Stacksync offers simpler, more transparent pricing compared to Heroku Connect. Pricing is based on Monthly Active Rows, so you won't have to pay for unused data.

If you're only interested in syncing data between PostgreSQL and Salesforce without any process automation, Heroku Connect works great. For everyone else, Stacksync is an easier way to set up bi-directional syncs.

Sign up for a free trial or talk to one of our engineers to see how Stacksync can simplify your Salesforce integration.

Connect every tool

Create a free account, or book a demo to start building syncs and workflows.