Web Analytics
Integrate Salesforce With Heroku Using Heroku Connect And Postgres
Dec
1
2021
1 Dec 2021

Integrate Salesforce With Heroku Using Heroku Connect And Postgres

This article describes how we can integrate Salesforce with Heroku using Heroku Connect and Postgres.

What is Heroku?

Heroku is a cloud service for hosting your applications. It is a Platform as a service with support for auto-scaling and deployment. It primarily uses Git for deploying applications.

Heroku supports several programming languages like Java, Nodejs, PHP, Python, etc.

Data replication, data proxies, custom user interface, and external processes are the main reasons for integrating Salesforce with Heroku.

Here are the ways to integrate Salesforce with Heroku

  1. Heroku Connect
  2. Salesforce Connect
  3. Salesforce REST APIs

In this article, we are going to integrate Salesforce with Heroku Connect using Heroku Postgres Database.

Heroku Connect

It is an Add-on available in Heroku which supports us to integrate Salesforce and Heroku.

Heroku Postgres Database

It is the SQL database service that runs by Heroku and this is also available as an add-on in Heroku.
Requirements:

  1. Salesforce Developer Account
  2. Heroku Account

Here are the steps to integrate Salesforce with Heroku Connect

1. Log in and click on “Create new app”

Create new app

Enter your App Name and select the region. Then click on “Create App”

Create App

Now add Heroku Add-Ons

2. Click on the Top menu bar “Resources”

Resources

Then type “Heroku Connect” on the Add-on search bar and select the plan name as “Demo Edition – Free”

Here, I am using a free version of my application. The paid version is also available as per user requirement

Heroku Connect

Then click on “Submit order form” and You will see the Heroku Connect in the Add-ons list.

Submit order form

Add-ons

We can also add other available Add-ons as per our requirement

Again Click on “Resources” and  Type “Heroku Postgres” in the Add-ons Search bar and Select Heroku Postgres. Then select a plan name as “Hobby Dev – Free” and then click on “Submit order form” and You will see the Heroku Postgres in the Add-ons list.

Now, We have added both Heroku Connect and Heroku Postgres Database in our application.

We have added all the required add ons into the Heroku. Now we can start integrating Salesforce with Heroku Connect.

3. From Heroku Application select Heroku Connect and Click on “Setup Connection”. Enter Schema name and then click next

Setup Connection

Now, you can select the Environment and API version as per requirement. Here, we are using “sandbox” but you can select other options as well.

sandbox

Then do login using your Salesforce credentials

salesforce credentials
Create Mapping

4. Now we are able to create a Salesforce object of our choice with Heroku. Then we can add an object of our choice by clicking on “Create Mapping” and selecting fields as per our requirements. Some of the fields are by default selected which we can’t deselect.

Create Mapping

For syncing data from the Heroku Postgres database to Salesforce, we need one External Key. We can add that field as a Unique Identifier.

We can create that Unique Identifier from the Salesforce object and then map that key from here

Unique Identifier

Here, we have to select the Unique Identifier for syncing data. Then save and continue to get back to the mapping screen

Now we can see the Explorer in the top menu bar. Once clicked on it we can see the list of created records.

created records

We can see their Last change column which will show the status of the created record.

Now click on the right arrow sign to the full detail of a particular record then click on data to see all the data of that record.

timeline

Pricing

  1. From Heroku pricing, we can upgrade plans as per our requirements.

Conclusion

This article is all about configuring Salesforce with Heroku to synchronize the data of Salesforce with the Heroku Postgres database.