Salesforce Summaries – A Developer’s Guide to Heroku Connect

SalesforceSummaries: a series delivering key insights from Salesforce YouTube videos, to save you time as you keep up to date with the latest technological changes within the Salesforce ecosystem. 

Introduction:

Heroku makes the scaling of cloud computing resources much easier and efficient, with the concept of ‘dynos’. However, Heroku also offers a service to connect to Salesforce very efficiently. Leveraging this with Salesforce Canvas results in compelling applications. In addition to this summary, the links here and here will also help you to understand more about the power of leveraging Heroku with Salesforce.

Details:A Developer’s Guide to Heroku Connect

Presenter: William Gradin

Details: 20 minutes

Key Terms: Heroku, Heroku Connect, Salesforce Canvas, Business Intelligence, Tableau

[email protected] — Force.com is a great platform to build apps that extend business processes. If you need an app that requires all the security and granular controls, then Force.com is a fantastic platform to build the app on. Force.com is especially great for employee facing apps.

[email protected] — Heroku is a platform to develop customer apps on. You can build apps using a large set of programming languages as Heroku is language agnostic. You can scale cloud computing resources easily to match your demand.

[email protected] — Lyft (the ridesharing app) is built on the Heroku platform.

[email protected] — The best customer apps connect two critical elements: customer engagement and business process. You can leverage Heroku for customer engagement and Force.com for business processes.

[email protected] — To achieve this, you can leverage Heroku Connect. Heroku Connect is the data synchronisation engine between Heroku and Salesforce and shuttles data back and forth and syncs it between these 2 platforms.

In the use case of Lyft, new drivers would use the app that has been deployed to Heroku to sign up to Lyft. Then, this data is synced with the corresponding Salesforce org and that’s where apps and functionality in this org (Force.com platform) can be leveraged. For example, an approval process is initiated whenever a new driver signs up.

[email protected] — As per the code here, the following node.js app with Angular front end has been deployed to Heroku which simply displays the contact list from a Salesforce developer org. The syncing is bi-directional and so if one edits a contact record on the node.js app, then that is displayed in Salesforce and vice-versa.

[email protected] — The screenshot below shows the Heroku Connect product. OAuth has been used to authenticate into Force.com so that Heroku Connect can talk to the Force.com APIs. And Heroku Connect has also been connected to the Postgres database that sits underneath the Heroku application.

[email protected] — By selecting the ‘Add’ button, all of the Salesforce sObjects will be displayed.

[email protected] — In this example, the Contact sObject has been queried and then the following screen is displayed with all of the Contact fields.

[email protected] — For the purposes of the demo, just a few fields from the Contact sObject has been selected. On the next screen, the access mode displays:

This is where you can specify the sync’ing direction (either bi-directional or just one way).

The Heroku spinner icon is going; which indicates that Heroku Connect is connecting to Force.com and pulling down all of the Contact records into the Postgres database.

[email protected] — Leveraging the command line, one can see the table has been created in Heroku and using SQL, you can query the data in this table.

[email protected] — Leveraging the Heroku dashboard, one can see the number of records in the database.

[email protected] — The node.js app is returning the contact data from the Heroku database. The response is in JSON format, which is then returned to the client.

[email protected] — Because the sync has been to set bi-directionally, one can update a contact record in the node.js app and this will consequently update the Heroku database and therefore, via Heroku Connect, update the record in Salesforce. The code for the contact update from the node.js app is:

[email protected] — Heroku Connect is built on a synchronization engine. It is running 24/7, sync’ing data back and forth between Heroku and Force.com. Heroku Connect is able to leverage the Salesforce streaming, SOAP and bulk API. Heroku Connect is, in effect, giving you an alternative API into the Force.com platform. And that API is just SQL because Heroku Connect hides all the complexities of dealing with the Force.com system.

[email protected] — This other presentation will walkthrough how Tableau leverages Heroku Connect.

[email protected] — The vision from Tableau is to help people to see and understand their data. Tableau was created in 2003 and is the fastest growing BI (business intelligence) company.

[email protected] — A big question that Tableau asked was ‘how can we provide users the power of Tableau and embed it within Salesforce?’.

[email protected] — The technologies that are used to achieve this are:

[email protected] — Here is an architecture diagram to show the data flow between the different systems.

The Salesforce Canvas connector establishes the trusted relationship between Tableau and Salesforce. This is where communication between the two systems takes place over HTTPS. SAML can be leveraged with this process too, so that you can use Single Sign On.

[email protected] — The Salesforce data is posted to the Heroku postgres database via Heroku Connect. Tableau establishes a live connection with Heroku and the end result is that near real-time data visualisations are displayed in Salesforce via Canvas.

[email protected] — As per the demo, the results are compelling:

Tableau rendering inside Salesforce Canvas with near real-time data via Heroku Connect

Leave a Reply