Connecting Heroku Postgres to Salesforce Data Cloud
Last updated May 15, 2024
Table of Contents
Salesforce Data Cloud is a data platform that enables customers to organize and unify data across Salesforce and other external data sources. Sync your Heroku Postgres data with your Salesforce Data Cloud instance so you can create unified customer profiles and act on your data. This article describes how to integrate your Heroku Postgres database with Data Cloud.
Use Cases
You can develop customer-facing apps on Heroku and unify your Postgres data with Data Cloud.
- Unified customer profile: You can combine data from your Heroku apps with data in Data Cloud and build unified customer profiles. Unified profiles bring a customer’s web engagement, order history, and content preferences all in one place. You can understand your customers and make targeted recommendations for increased customer engagement.
- Automate customer engagement: By syncing data from Heroku Postgres to Data Cloud, you can create automations based on how your customers interact with your app. Depending on a customer’s interactions, you can automate sending personalized marketing campaigns, identifying potential opportunities, or creating cases in Salesforce.
Heroku PostgreSQL Connector
The Heroku PostgreSQL connector is included in the Salesforce Data Cloud suite of connectors. The connector provides a one-way sync from Heroku Postgres to Data Cloud. Follow the Salesforce documentation for setting up a PostgreSQL connection with Heroku Postgres. In the Source
tab of the Add Connection window, select Heroku PostgreSQL
.
Before setting up the connector, keep in mind:
- Use at least a
premium-4
plan for setting up the connection. - A connection counts against your database connection limit.
- Consider creating a credential specific for Data Cloud so you only grant access to specific tables necessary for the integration.
You need your database credentials when setting up the connection:
- Username:
User
orusername
from your database credentials - Password:
Password
orpassword
from your database credentials - Connection URL:
Host
orhost
from your database credentials - Schema: enter
public
- Database:
Database
ordbname
from your database credentials
You can find your credentials through the Credentials tab
on a Postgres database through data.heroku.com or by running the pg:credentials:url
command.
$ heroku pg:credentials:url DATABASE --name analyst -a example-app
Connection information for analyst credential
Connection info string:
"dbname=dee932clc3mg8h host=ec2-123-73-145-214.compute-1.amazonaws.com port=6212 user=analyst password=98kd8a9 sslmode=require"
Connection URL: postgres://analyst:98kd8a9@ec2-123-73-145-214.compute-1.amazonaws.com:6212/dee932clc3mg8h
After setting up a connection, you can create a data stream to your Postgres data source. A data stream brings in data from a table in your database to create a data lake object (DLO) in Data Cloud. You can configure the data stream to update data in batches or in real-time. Under Other Sources
of the New Data Stream window, select Heroku PostgreSQL
.
Considerations
- Read the Salesforce docs for the Data Cloud Limits and Guidelines.
- Data Cloud regions are available in Virginia, United States, Frankfurt, Germany, Mumbai, India, Sydney, Australia, and Tokyo, Japan.
Next Steps
With your Heroku Postgres data synced in Data Cloud, you can act on the data by creating calculated insights for analytics, triggering flows to automate processes, creating data actions for event-based orchestrations, and more.
For more information, here’s some recommended reading: