For Salesforce ISVs, Heroku Connect makes it easy for you to build Heroku apps that extend the data and functionality of their Force.com managed packages. Using bi-directional synchronization between Salesforce and Heroku Postgres, Heroku Connect unifies the data in a Postgres database with the customers' contacts, accounts, and other custom objects in the Salesforce database.
This reference architecture demonstrates how a multitenant application on Heroku can be used to extend a distributed Force.com application via the Heroku Connect service. Moreover, it shows how to automate the setup and configuration of the Heroku Connect service per customer, which synchronizes data between that customer’s Salesforce environment and the ISV's centralized, multitenant Postgres database.
![Deploy to Salesforce](https://raw.githubusercontent.com/afawcett/githubsfdeploy/master/src/main/webapp/resources/img/deploy.png)
- A simple application containing a post-install script and a few custom fields
Note: In Salesforce post-installation scripts only operate within managed packages; for the sake of being open source, this project is necessarily an unmanaged package. Although the functionality of the post-install script can be triggered manually, the unmanaged package should ideally be converted into a managed package such that the post-install script is able to run.
- Processes
- Frontend Rails app, which handles the creation of sync operations, via the Heroku Connect API, between customers' Salesforce organizations and a multitenant Heroku Postgres database
- Ruby process for background jobs
- Add-ons
- Heroku Postgres database
- Heroku Connect, with which select data from customers' Salesforce organizations are synchronized with the Postgres database
- Heroku Redis key-value store, which is used by background job process to store all job and operational data
- SendGrid, used for sending emails
- Heroku Scheduler, used for scheduled processing of relevant social media records
- PaperTrail, optional, used for log aggregation and management
See the sequence diagram for a visual overview of how it works.
For comprehensive setup instructions for both the Heroku and Force.com components, refer to the Heroku app repository.