Heroku - 18 Heroku Connect Exercice v 2

This lesson is an exercise based on Heroku Connect. The goal is to create a new mapping for the Salesforce Contact object and synchronize the fields FirstName, LastName and Email. We then add a new Contact in Salesforce with first name John, last name Doe and a starter email, change the email from inside pgAdmin to john.doe@gmail.com, and verify that the change is pushed back to Salesforce. Feel free to try it on your side before watching the walkthrough.

Step 1 — Create a Contact mapping in Heroku Connect

From the Heroku application configured in the previous lesson, open the Heroku Connect dashboard and click Create Mapping. Search for Contact and tick the corresponding entry. The same External ID warning appears as before, but this time the UI also indicates that the LastName field is a prerequisite for the Contact object. We therefore tick FirstName, LastName and Email, leave the rest as is, and save. After a few seconds the dashboard confirms the Contact table is now synced.

Step 2 — Create a Contact in Salesforce

We switch to Salesforce, open the Contacts tab and click New. We fill in only what we need: first name John, last name Doe, and we use the field meant to attach the contact to an existing Account — picking the one created in the previous lesson. If you do not have an Account yet, simply create one in the Accounts tab first. We save: the new contact appears in the list.

Step 3 — Change the email from pgAdmin and verify in Salesforce

We open pgAdmin, navigate to the Heroku Postgres database we connected previously, open the salesforce schema, browse the contact table and scroll down to the contact we just created. We edit the Email column and set it to john.doe@gmail.com, then save. After waiting a few minutes for Heroku Connect to perform its sync, we go back to Salesforce, open the same Contact, and observe that the email field has indeed been updated to the new value. The exercise objectives are validated: a new mapping was created, the Contact object is synced, and the two-way sync works end-to-end. We are now done with Heroku Connect.

Summary

This lesson demonstrates a practical exercise on Heroku Connect where you create a new mapping for the Contact object and synchronize the first name, last name, and email fields between PostgreSQL and Salesforce. You create a new contact in Salesforce, update its email from pgAdmin, and verify that the data synchronizes correctly between the two systems after a few minutes.

Key points

  • Create a new Heroku Connect mapping for the Contact object with required fields: first name, last name, and email
  • Create a new contact entry in Salesforce with the required Account field and customer information
  • Update the email address in pgAdmin and observe automatic bidirectional synchronization to Salesforce
  • Heroku Connect synchronizes data automatically between PostgreSQL and Salesforce within a few minutes
  • Verify successful synchronization by checking the updated contact details in Salesforce

FAQ

What are the required fields when setting up the Heroku Connect mapping for the Contact object?

The required fields are first name, last name, and email. These are configured as prerequisites in the Heroku Connect mapping interface.

How do you verify that changes made in pgAdmin have been synchronized to Salesforce?

After updating the email in pgAdmin, wait a few minutes for the synchronization process to complete, then navigate to the contact in Salesforce to confirm the updated email address appears.

Why is the Account field important when creating a new contact in Salesforce?

The Account field is a required field in Salesforce contacts. You must select an existing account or create a new account before saving the contact.