Ways to Integrate Heroku with Salesforce

In any enterprise, there are various services, and those services are built through different programming languages and may be also running on different platforms. There are instances on various systems (for e.g. An accounting system) that run on a platform and the Cloud Services are rendered through the Salesforce platform. This enterprise application is deployed on Heroku and needs to be integrated with Salesforce. Let us first understand “What is Heroku?”.

What is Heroku?

Heroku is a cloud platform as a service (PaaS) supporting many programming languages. One of the first cloud platforms, Heroku has been in development since June 2007, once it supported entirely the Ruby artificial language, but presently supports Java, Node.js, Scala, Python and plenty of others.

It allows you to deploy any app that is written with any of the above programming languages. It can also be integrated with Salesforce. Heroku essentially has various integration methods.

What are the possible ways to Integrate Heroku with Salesforce?

Integration of Salesforce with Heroku can be understood from the above figure

Some of the integration methods are:

  • Heroku Connect
  • Salesforce Connect
  • Canvas
  • Salesforce REST APIs
  • Web Services Callouts

Let us now understand the above terms, one by one.

Heroku Connect

Heroku Connect uses a variety of methods to optimize interactions between a Heroku Postgres database and the Lightning Platform APIs, including SOAP, Bulk, Streaming, and other batch processes.

Heroku Connect makes it straightforward for you to create Heroku apps that share knowledge along with your Salesforce deployment.

An example to cite is multiple Salesforce org that synchronize with Heroku Postgres information.

This performs periodic actions like lookups for alternative services, invoice generation similarly to analytics.

Salesforce Connect

Salesforce Connect provides seamless integration of data across system boundaries by letting your users scan, search, and modify info that’s stored outside your Salesforce org.

It uses external objects for information proxy of external information into Salesforce, with no need to copy it into the database. These external objects are the same as custom objects, however, they’re used for mapping data outside the Salesforce org.

For example, maybe you have got data that’s stored on-premises in an enterprise resource planning (ERP) system. Instead of repeating the info into your org, you’ll use external objects to access the info in real-time via web service callouts

Salesforce REST APIst

This is ideally utilized in situations when the client needs something more than data integration.

Once the integration is ready to go, then the API permits the user to perform a variety of actions on Salesforce.

The REST API is obtainable by the Salesforce platform are often invoked from a Heroku application.

The API provides the following:

  • Session ID or OAuth 2.0 Authentication for the query of object metadata
  • Execute queries with SOQL/SOSL
  • Interact with Approval Processes
  • Create or Modify Records
  • The data is accessed through straightforward JSON-formatted hypertext transfer protocol requests. This addresses each kind of integration, that of data proxies and custom Interfaces.

    Example to cite is an order management application that runs on Heroku and wishes to fetch customer info from Salesforce.
    Here one integration user will fetch all the mandatory info from Salesforce.

    Salesforce Connect provides seamless integration of data across system boundaries by letting your users scan, search, and modify info that’s stored outside your Salesforce org. It uses external objects for information proxy of external information into Salesforce, with no need to copy it into the database.

    These external objects are the same as custom objects, however, they’re used for mapping data outside the Salesforce org. For example, maybe you have got data that’s stored on-premises in an enterprise resource planning (ERP) system. Instead of repeating the info into your org, you’ll use external objects to access the info in real-time via web service callouts.

    Web Services Callouts

    You can tightly integrate your Apex with an external service just by making a call to an external Webservice, with an Apex Callout. A hypertext transfer protocol request also can be sent to an Apex code. The Callouts are helpful for external processes in Heroku.

    Other than writing the callouts in Apex, workflow messages may be used. This enables the events on Salesforce to trigger a Heroku method.

    Canvas

    It permits you to embed a web app or UI on Heroku with the UI of Salesforce.

    It makes use of JavaScript API for loading an external program into Salesforce to interact with Salesforce information.

    An open-Source web technology is employed to create this UI – to run on Heroku.
    This is of primary importance while using canvas. Canvas apps are often loaded into Salesforce with an iframe. Canvas uses a secure communications protocol via JavaScript.
    Example to cite: when a canvas app is employed on any account page’s layout and provides a totally different context through chatter feeds, Visualforce pages and mobile cards.

    JavaScript is used within the canvas app to render data. Next, we tend to dig into “How to Use Heroku Connect for Integration?

    What are the Reasons behind the Integration of Heroku with Salesforce?

    The reasons for Salesforce integration are:

    • Data Replication
    • Data Proxies
    • Custom User Interfaces
    • External Processes

    Data Replication

    Data Replication is all regarding the repetition or synchronization of information between Salesforce and the other application. One of the common use cases offers a low-latency interface and high turnout for a customer-facing application, one that’s built on open-source technologies.

    Data Proxies

    In data Proxies, there’s no repetition of the information. It aggregates different data stores. There is no ought to store the information however the information is fetched on-demand from an external system.

    An example to cite is to get reports with an inventory system once Salesforce is integrated with warehouse and fetch the specified information

    Custom User Interfaces

    Customer User Interfaces in Salesforce are built with technologies such as Lightning components and Visualforce.
    The interfaces once designed with open source technologies of the likes of Node.js, PHP and Java will be with success integrated with Salesforce UI or run with Salesforce knowledge and
    run on Heroku.

    External Processes

    It is doable to offload batch processing or workflow and trigger event handling by using external processes. This is all dependent on the number of jobs to be done.

    How to Use Heroku Connect for Salesforce Integration?

    We already understood that Heroku Connect works in conjunction with the Heroku Postgres database which helps in data replication and data proxies.

    Data Replication takes place once Salesforce works in tandem with the above-mentioned SQL database.

    Otherwise, the information is proxied from Postgres database into Salesforce.

    This happens with the Salesforce Connect

    what is heroku

    The Data Replication with Heroku Connect is either one way or two-way in nature.With information Replication between Heroku Postgres to Salesforce, it ought to be configured with low latency, though not in real-time.

    Use case for Heroku Connect

    A typical example is once a business-to-consumer app makes use of Salesforce information and even changes it.

    The use case is that of a product catalog to be accessible by a public web site.

    Here Heroku Connect helps in data replication and makes the data available to this site. This web site is typically designed with open-source technologies like PHP, Java or NodeJS. The interface with the Heroku Connect is simply a typical SQL.

    Heroku Connect Application Architecture

    Some of the points worth remembering are:

    • Salesforce owns the design for Data Replication with Heroku Connect.
    • Configure the Heroku Connect Mapping after objects are customized in Salesforce.
    • Mapping is not only possible for n-number objects as well as the relationships between objects. Here custom objects are collated with standard objects. Only the Heroku app can read/write on this object.

    Summary

    Heroku is a platform-as-a-service (PaaS) that is built on the Cloud platform to enable enterprises to deploy, run, manage and scale applications that run across enterprises.

    It is doable to integrate Heroku with Salesforce and therefore the reasons are data replication, data proxies, customer user interfaces, and external processes.

    There are numerous ways to integrate Heroku with Salesforce – one amongst them is Heroku Connect.

    Heroku Connect works in conjunction with Heroku Postgres information.

    It helps in data replication and data proxies.

    Data Replication takes place once Salesforce works in tandem with a SQL database.

    Heroku Connect mapping only works after configuration.

    Posted in Heroku, Heroku Connect Salesforce, Heroku with Salesforce, What is Heroku.

    Leave a Reply

    Your email address will not be published. Required fields are marked *

    *