2

I want to use Heroku Connect to sync data between Salesforce and Postgres on Heroku. I am totally new to Heroku Connect.

  • Model A is a Postgres DB on Heroku that contains 3 tables with 20 fields. The entities represented by the tables are related to each other via foreign key(s).
  • Model B is a Salesforce schema that is one object with 20 fields

Can I use Heroku Connect to map these models and perform the sync?

1 Answer 1

0

Heroku Connect (HC) does not perform schema translation - data model must be the same on both sides.

Since HC can sync in either direction, you could implement the schema translation yourself on Heroku side by creating views that are based on joins between your 3 tables, then map the resulting views to Salesforce objects. The latter will most likely have to be custom objects but you may be able to wiggle your views into standard objects too. This solution will only work for sync in one direction: from Postgres on Heroku to Salesforce. Postgres views are read-only in Heroku Connect.

If you want a sync in the other direction (from Salesforce to Postgres on Heroku), then you'll need to do additional work on Postgres side. You'll have to grab the data from Postgres tables based on Salesforce objects and map/transform them to your Model A tables. This is a common data pipeline construction task, there are lots of ETL and other tools and options for solving it.

2
  • I want to do sync on both directions, I already have an existing Postgres model (with joins etc it's connected to a backend of an angular app online) and i need to create a SF model in order to do a mapping, so you propose to create the exact same model I already have on my back ?
    – Sushi
    Commented Oct 26, 2020 at 10:19
  • If you want to use Heroku Connect bidirectionally, then yes, your only option is to create a 1:1 representation. If you don't like that, choose another integration architecture or another tool that does the mapping for you. You can also look into Heroku External Objects - it might solve your problem
    – identigral
    Commented Oct 26, 2020 at 17:55

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .