Heroku Connect is getting a lot of attention these days due to its seamless integration between Heroku and Salesforce.
Due to a drastic increase in custom apps, Heroku has emerged as an excellent PaaS(Platform as a Service) to host applications on a server specifically in case of solutions involving Salesforce.
As Heroku is a product of Salesforce itself, they invented this Heroku Connect adapter couple of years back to make integrations easy so that apps/websites can be up quickly.
Some background about Heroku
Heroku is a cloud platform as a service (PaaS) supporting several programming languages. Heroku, one of the first cloud platforms has been in development since June 2007, when it supported only the Ruby programming language, but now supports Java, Node.js, Scala, Clojure, Python, PHP, and Go. For this reason, Heroku is said to be a polyglot platform as it lets the developer build, run and scale applications in a similar manner across all the languages.
In this post, I will give you some steps to quickly set up Heroku Connect and connect your website/app with Salesforce.
Go to your Heroku account and open your app.
Add Heroku Connect as an add-on. A free version is available for testing and development purposes.
As soon as added, Click on Heroku Connect to open configurations page.
Click on Setup Connection button which will further ask to choose your Salesforce instance along with a version with which you want to connect.
After authorization, Heroku Connect will create a database specifically for Salesforce so that it can be easily integrated.
PS: Schema name is important on this page as it will derive all Postgres queries.
As a next step, you have to set up what all objects/data needs synchronization between your app and Salesforce. You can configure it on Mappings tab. Click on Create Mapping button to start making your mappings
Create mapping will show all objects available in your system. Select any one to configure fields mapping and more granular configurations.
Important things that need to be noted on this page:
- Poll Frequency: What should be the frequency to sync this object
- Accelerate Polling: Use this option if you need to sync changes instantly on change. This option should be enabled only if required in some scenarios.
- Write Database updates: By default, Heroku connect only refreshes data from Salesforce but don't push any changes. To enable bi-directional sync, there should be a unique external Id field on an object which should be used here.
- Fields: Choose whatever fields you want to sync.
Once the configuration is set, Heroku Connect will start loading data from Salesforce for that object and it can be seen on Mappings tabs itself.
Finally, if you want to check what all records are synced, you can go to Explorer tab to see all records loaded for that object.
To know about how to perform operations with this new database created by Heroku Connect, Please read my next post Crud Operations with Heroku Connect