Introduction
Salesforce and Heroku are powerful platforms for businesses. Salesforce, a CRM established in 1999, provides a comprehensive solution, while Heroku offers a cloud-based platform for creating and scaling apps in any language. By connecting Salesforce to Heroku, you can automatically update the Sales Cloud with Salesforce CRM data. This integration saves time and ensures that sales teams have real-time information on leads, accessible from mobile devices or laptops. With their combined capabilities, these platforms can effectively save time, money, and effort. Here are five ways to leverage Salesforce with Heroku, enabling seamless integration and improved efficiency.
As a Salesforce developer you know that Heroku provides a great place to run apps that integrate with Salesforce for a variety of use cases. Basically, there are four following reasons to integrate salesforce with Heroku:
- Data replication
- Data proxies
- Custom user interfaces
- External processes
We look at each one in more depth later on in the module.
Heroku Integration Through Data Replication
Data replication involves copying or synchronizing data between Salesforce and another system, serving various purposes. It facilitates cross-data source reporting and analysis, enabling data warehousing. Data replication is also useful for integrating legacy systems with Salesforce, either for retrieving data from Salesforce or feeding data into it. When it comes to Heroku and Salesforce integration, a common use case is creating a high-throughput, low-latency interface for customer-facing applications built using open-source technologies.
To illustrate, consider a scenario where you sell inflatable unicorn party hats. Salesforce serves as your system of record, storing product information like pricing and inventory. Meanwhile, your public website, built with Node.js, Rails, Java, or similar technologies, relies on this data to display availability and facilitate orders. In this case, replicating the product information to a datastore on Heroku makes sense. It allows the Heroku-powered website to handle a significant volume of requests quickly and efficiently. Additionally, data replication can be used to propagate metrics, such as the number of likes on a product, back to Salesforce for the marketing team’s insights.
Heroku Integration Through Data Proxies
Data proxies serve as aggregators for different datastores, eliminating the need for data replication. Unlike data replication, data is not copied but rather read on demand. This approach allows data science, business intelligence, reporting, and dashboarding tools to consolidate data from multiple datastores effortlessly.
Integrating legacy and external systems with data proxies enables seamless data exchange with Salesforce. For instance, when a Salesforce user needs to generate inventory reports that combine product data from Salesforce with warehouse data from an external system, it can swiftly provide the required information. Salesforce retrieves the necessary data from the external system in real-time, without storing the data itself.
Similarly, data proxies can operate in the reverse direction. For example, when an application running on Heroku acts as a data proxy, it can provide a secure and transformational layer between Salesforce and another system. This arrangement facilitates smooth data transfer and enhances security.
Integration Through Custom User Interfaces
Customer User Interfaces in Salesforce are built with technologies such as Lightning components and Visualforce. In fact, interfaces when built with open source technologies of the likes of Node.js, PHP and Java can be successfully integrated with Salesforce UI or run with Salesforce data and run on Heroku.
Integration Through External Processes
External processes can offload batch processing and trigger event handling to apps on Heroku. This method can be helpful depending on the type of job that needs to be done and the amount of effort involved. Data science, machine learning, image and video processing, and integration with legacy or external systems can be reasons to offload external processes to Heroku.
As an example, let’s say your real estate company uploads photos for each house it lists for sale. These photos are huge, so you need a way to resize them to reduce loading times and storage costs. You can easily offload this job to an external process on Heroku. Each time a photo is uploaded to Salesforce, it is sent to an app on Heroku for processing, and the resized image is saved back into Salesforce. The app on Heroku that handles the external process could be responsible only for that one piece of the system. In that case, the app is likely considered a microservice that can be deployed separately without any other system dependencies.
Integration Methods Overview
So now you know that data replication, data proxies, custom user interfaces, and external processes are all great reasons to combine Heroku and Salesforce. But how do you actually do this? A number of methods to accomplish these types of integrations are available, including:
- Heroku Connect
- Salesforce Connect
- Salesforce REST APIs
- Callouts
- Canvas
Heroku Connect
Overall offers both data replication and data proxies for Salesforce integration. Data replication synchronizes data between Salesforce and a Heroku Postgres database. The synchronization can be one-way or bidirectional, depending on the configuration. Additionally, Heroku Connect provides a data proxy to Salesforce through the OData protocol using Heroku External Objects. By maintaining a connection to the Heroku Postgres database, Heroku Connect generates RESTful endpoints through the OData wrapper. This enables other web services to retrieve data from the specified Heroku Postgres database seamlessly.
Altogether, offers significant benefits for data replication, including the quick and easy accessibility of a subset of Salesforce data to Heroku apps. As an app developer, you can utilize standard SQL queries to interact with the data, leveraging the low-latency and high-throughput access provided by Heroku Connect and Postgres.
Salesforce Connect
Salesforce Connect, formerly known as Lightning Connect, serves as a data proxy that allows pulling in external data sources, such as OData, on-demand into Salesforce. The data is not copied to the Salesforce database. Endpoints exposing OData 2.0 can be run on Heroku or provided by external systems. Heroku Connect can expose a Heroku Postgres database as OData, enabling consumption by Salesforce Connect. Furthermore, Salesforce Connect custom adapters empower Salesforce to act as a proxy for any data source that Apex can communicate with, including REST with XML or JSON and SOAP.
The primary benefit of Salesforce Connect is that it brings external data into the Salesforce UI and makes it look as if the data resides in Salesforce, although it’s just proxied on demand from an external data source. This process makes it easy to collate disparate data sources for Salesforce users.
Salesforce REST APIs
The Salesforce REST APIs enable apps on Heroku to access Salesforce data effortlessly using JSON-formatted HTTP requests. This integration is valuable for creating data proxies and custom user interfaces. By leveraging OAuth, applications running on Heroku, built with open-source technologies, can authorize users in a custom user interface and interact with Salesforce data on their behalf. This integration caters to a wide range of use cases, allowing seamless data exchange between Salesforce and external systems, even in scenarios where there is no user interface involved.
Callouts
You can tightly integrate your Apex with an external service just by making a call to an external Webservice, with an Apex Callout. An HTTP request can also be sent to an Apex code. The Callouts are useful for external processes in Heroku. Other than writing the callouts in Apex, workflow messages can also be used. This enables the events on Salesforce to trigger a Heroku process.
Canvas
Canvas provides a way to load an external user interface into Salesforce that can interact with Salesforce data through a JavaScript API. You can run the external UI on Heroku and build it with an open-source web technology. The data requests that Canvas apps make happen in the context of the Salesforce user.
Conclusion
Heroku, a platform-as-a-service (PaaS) built on the Cloud platform, enables enterprises to deploy, manage, and scale applications across their organization. Integration between Heroku and Salesforce is possible and offers several benefits, including data replication, data proxies, custom user interfaces, and external processes. Heroku Connect is one of the integration methods available.
Heroku Connect operates alongside the Heroku Postgres database and facilitates data replication and data proxies. Data replication occurs when Salesforce and a SQL database work together, while Heroku Connect mapping requires proper configuration to function effectively.
FAQs
1.How do I Connect Salesforce to Heroku?
To configure Heroku Connect, you authenticate to a Salesforce instance using OAuth and allow Heroku Connect to make API calls on your behalf. Meanwhile, uses this API connection to synchronize the data between Salesforce and the Heroku Postgres database.
2. Is Heroku better than AWS?
Initially, it offers you a ready-to-use environment that allows you to deploy your code fast, whereas the deployment process of AWS service is quite complicated. Above all, best suitable for Startups, Medium Businesses, whereas AWS is mainly focused on Medium Businesses and Large Enterprises.
3. Is Heroku better than Azure?
Ease of use: Thanks to its singular focus, Heroku is more user-friendly than large public cloud PaaS providers such as Azure, AWS, and GCP. Heroku helps users save a great deal of time and effort when building and deploying web apps.
For More Blogs: Click here.