This project demos a simple way to synchronize two Salesforce orgs together using Heroku, Postgres, Heroku Connect, and Postgres triggers. Specifically it shows contacts phone numbers from each org staying synchronized with each other. The code in this app adds 2 simple postgres triggers to keep contacts phone numbers from each Salesforce org synchronized after Heroku Connect is setup. It relies on Heroku Connect for most of the synchronization. THIS IS JUST A DEMO
- Signup for 2 free demo Salesforce orgs link to signup
- Signup for a Heroku account link to Heroku signup
- Deploy this app to Heroku
- Set config vars SCHEMA_A and SCHEMA_B to the names you want to use for each orgs postgres schema name
- Click deploy app
- Configure both Heroku Connect for each org. Map the contact object. Make sure to include the email field, phone field, check Accelerate Polling, and check the checkbox that enables updates back to Salesforce.
- From the admin screen on the Heroku App, click Open App, then click Make Database Triggers
- Now when you change the phone number on a contact in 1 Salesforce org, the contact with the same email in the second org will be updated with the new phone number from the other org.
for question or issues please create a new Github issue