Salesforce and Postgres integration

Whalesync two-way syncs Salesforce objects with tables in any Postgres database, not just Heroku's. Your app reads and writes accounts, cases, and custom objects in SQL, and Salesforce gets its edits.

Salesforce
Postgres
Use cases

What you can do with Salesforce and Postgres

Engineering

Move off Heroku Connect without leaving Postgres

Heroku Connect syncs Salesforce with Heroku Postgres only, and Heroku stopped adding features in February 2026. Whalesync syncs accounts, opportunities, cases, and custom objects with any Postgres that accepts connections from the internet, so the app can move to RDS, Neon, or Supabase and keep its SQL. Map each record's Salesforce Record ID into a text column such as sfid, and the queries that join on it keep working.

Syncs AccountsOpportunitiesCustom Objects
One row per Salesforce account. sfid is a text column filled one way from the read-only Salesforce Record ID, as Heroku Connect's own sfid column was.
Account executives

Show which warehouse sensors have gone quiet

Your platform keeps a sites table with a row for each customer warehouse and a count of sensors that have stopped reporting. Sync it to a custom Site object, created in Salesforce first, and each row's account_id becomes a lookup, so the sites appear in a related list on the account. Before a renewal call, a rep sees which sites have gone dark, as of Whalesync's last pass over the table.

Syncs Custom ObjectsAccounts
Each record is a custom Site synced from a row in Postgres. Account is a lookup set from account_id, and Offline sensors is a number field Postgres fills, one way.
Customer support

Let customers open cases from your app

Your app writes each support request to a support_cases table that syncs with Salesforce cases, linked to the account through account_id. The request becomes a case after Whalesync's next pass over the table, and an agent works it in Salesforce. When the agent closes it, the row's status changes after the next pass over Salesforce, and the customer sees it closed in the app.

Syncs CasesAccounts
Each row is a Salesforce case. status holds one of the org's Case Status values, and account_id links the case to its account's row.
What syncs

Everything that syncs

Each card is something you can sync between Salesforce and Postgres.

  • Salesforce Accounts Two-way
  • Salesforce Contacts Two-way
  • Salesforce Leads Two-way
  • Salesforce Opportunities Two-way
  • Salesforce Tasks Two-way
  • Salesforce Campaigns Two-way
  • Salesforce Campaign Members Two-way
  • Salesforce Cases Two-way
  • Salesforce Users Two-way
  • Salesforce Profiles Two-way
  • Salesforce Record Types Two-way
  • Salesforce Custom Objects Two-way
  • Postgres All Tables Two-way
Live Export

Just need a copy of Salesforce in Postgres?

Live Export keeps a one-way copy of your Salesforce data in Postgres, on a schedule, for the reports, pivot tables, and dashboards that only read it. It's on every plan, with a record allowance of its own.

  • Two-way sync

    Best when your team works in both apps, and an edit in either belongs in the other.

    • Maps fields between tables you choose, in Salesforce and Postgres
    • Picks changes up by itself, with no schedule to set
    • Counts toward your plan's records in sync
  • Live Export

    Best when you only read Salesforce data in Postgres, and nothing you change there should go back.

    • Creates a table for each Salesforce table you pick, in the database you connect
    • Runs daily, hourly, or every 10 minutes, depending on your plan, and whenever you click Run now
    • Writes only what changed on each run, over any edits to what it copied
    • Copies Accounts, Contacts, Leads, Opportunities, Opportunity Products, Campaigns, Campaign Members, Cases, Tasks, Events, Products, Price Books, Contracts, Orders, Quotes, Assets, your custom objects, and the other standard objects your org can query
Step-by-step guide

How to sync Salesforce and Postgres

Step 1: Open a new sync

Start a sync from New sync, with Salesforce and Postgres as its apps.

Step 2: Sign in to Salesforce

Sign in to the Salesforce connector as an admin, or as a user who can see every object and field you'll sync, since Whalesync offers only what that user can see. To test on a sandbox org first, check Use sandbox when you sign in. The org needs API access: Enterprise, Performance, Unlimited, and Developer editions have it, and Professional can add it.

Step 3: Add your Postgres database

Enter a Postgres connection URI for a role with read and write access, and pick the schema to sync. Whalesync connects from 34.66.3.22, so add that address to the database's allowlist if it has one. It works with any host the internet can reach, Heroku Postgres, RDS, Neon, and Supabase among them.

Step 4: Create what Whalesync can't

Whalesync can't add objects or fields to Salesforce, so create any custom object, custom field, or lookup you plan to fill from Postgres first. In Postgres it can create tables and columns for you, but create amount and other money columns yourself as numeric, because the type Whalesync picks for a currency field rounds large values. An existing table needs a primary key whose default generates each value, such as an identity column; otherwise Whalesync can add a whalesync_postgres_id column. Give an enum column the same values as the picklist's API values.

Step 5: Map objects and fields

Pair each Salesforce object with a table, such as Account with accounts and Case with support_cases. Automap asks an AI model to suggest field pairs from their names and types, never from records, and you confirm them or map fields yourself. Map a lookup to a foreign key, with the object it points at in the sync too. To keep a Heroku Connect-style ID, map Salesforce Record ID into a text column such as sfid. After the sync starts, leave synced tables and columns with the names they have.

Step 6: Match records and activate

Where both sides already hold records, pick the field that identifies a record in both places, such as the account name or a stored Salesforce ID. Values have to be identical to match. Check the preview of what Whalesync will create on each side, then activate the sync.

Compare

3 ways to connect Salesforce and Postgres

  • Heroku Connect

    Best when your app already runs on Heroku Postgres, Heroku Connect is in your contract, and you want a sync Salesforce itself supports.

    • Salesforce's own add-on: each object read-only or read-write, with Heroku Postgres only
    • Free demo plan: 10,000 rows, polled every 10 minutes; paid plans, by contract, poll as often as every 2 minutes, and accelerated polling picks up Salesforce changes as they happen
    • Heroku moved to sustaining engineering on February 6, 2026, with no new features
  • Make

    Best when a Salesforce change should write a row in one direction, such as an audit row for every updated opportunity.

    • Salesforce's Watch records trigger starts a scenario; PostgreSQL modules insert, update, or delete rows
    • Make's PostgreSQL app has no trigger, so a database change can't start a scenario (Make)
    • Runs are paid in credits, one for each module that acts (Make)
  • Whalesync

    Best when your app needs Salesforce data in a Postgres you host, and edits made on either side should reach the other.

    • Works with any Postgres reachable from the internet, Heroku's included
    • Salesforce lookups and Postgres foreign keys sync as each other
    • Charged for the records in sync, not for how often they change

Heroku Connect and Make checked against their own pages in November 2026.

FAQ

Frequently asked questions

What's the best way to sync Salesforce with an internal Postgres database?

Whalesync pairs Salesforce objects with Postgres tables and syncs them both ways, on any Postgres host. For a read-only copy to report on, its Live Export creates Postgres tables from the objects you pick and refreshes them on a schedule. Heroku Connect does the same for Heroku Postgres only, and Heroku is adding no new features to it. Automation tools such as Make move single Salesforce events into rows, in one direction.

Can Whalesync replace Heroku Connect?

For keeping Salesforce objects and Postgres tables in sync, yes, and the database can live anywhere. Check that your objects are in the next answer, since Heroku Connect supports more standard objects. Whalesync writes into tables you choose, or creates them, so map the Salesforce Record ID into a text column such as sfid if your queries use it, then point the app at the new tables before you turn Heroku Connect off. The Heroku Connect comparison sets the two side by side.

Which Salesforce objects can sync to Postgres?

Accounts, contacts, leads, opportunities, campaigns, campaign members, cases, tasks, users, profiles, record types, and every custom object. Products, price books, and events aren't offered. Formula, roll-up, and system fields sync one way, out of Salesforce.

Do Salesforce lookups become Postgres foreign keys?

Yes, both ways, when the object the lookup points at is synced too. An existing foreign key constraint is read as a link, and a link column Whalesync creates gets a real FOREIGN KEY constraint. Whalesync can't create Salesforce fields, so add any lookup or custom field in Salesforce before you map it.

Does my Postgres database need to be reachable from the internet?

Yes. Whalesync connects from its own servers with a connection URI, so the database has to accept outside connections. If it allows only known addresses, add Whalesync's IP, 34.66.3.22, to the allowlist. Whalesync handles SSL by itself but can't use a custom CA certificate.

How fast do Salesforce changes reach Postgres?

Not within seconds. Salesforce and Postgres send Whalesync no change notifications, so it reads both again and again. A pass over Salesforce is followed by a two-minute pause and a pass over Postgres by a short one, and a change arrives on the next pass after it's made, which takes longer the more records you sync.

More integrations

Other apps to connect

Connect your tools in minutes