Over the last two decades, the Salesforce platform has been transforming how organizations handle customer relationship management. Through the platform’s innovation, countless organizations have been able to gain an edge over their competitors when it comes to increased communication and improved customer relationships. 

Salesforce offers many benefits to organizations and is very user-friendly. While managing data in Salesforce is definitely doable, implementing change data capture (CDC) in Salesforce helps organizations work more efficiently with existing data by enabling faster data integration and analysis through fewer system resources. Read on to discover the 7 steps for implementing change data capture in Salesforce. 

Table of Contents

What Is Salesforce?

In 1999, Marc Benioff launched the Salesforce platform. As one of the oldest cloud-based software companies in the world, Salesforce has become the number-one customer relationship management (CRM) platform. 

With its many features, Salesforce offers:

  • An effective place to store customer data.
  • A convenient way to track customer interactions. 
  • A simplified space to view data in action. 
  • A vehicle to easily collaborate with colleagues throughout multiple sectors. 

Overall, the Salesforce platform enables companies to make well-informed and more efficient decisions while they easily create the best customer relationships possible. 

Related Reading: The Salesforce Database Explained

What Is Change Data Capture?

Change data capture, or CDC, is a set of software processes that work to identify changes in source tables and databases. It can track and make changes to these items in real-time. When implemented properly, CDC helps organizations work more efficiently with existing information by enabling faster data integration and analysis through fewer system resources.

Proper execution of CDC in Salesforce can make the user experience much better for those who use the platform. Read on to discover 7 steps for effectively implementing change data capture in Salesforce.

Related Reading: 7 Reasons Why You Should Be Using Change Data Capture


Steps for Change Data Capture in Salesforce

Implementing CDC in Salesforce offers many benefits to users. CDC enables users to receive real-time notifications of all changes happening within their Salesforce records. It sends these timely messages to the event bus, where users can subscribe to the specific channels they need access to.

1. Enable Change Data Capture and Select an Object 

The first step in implementing change data capture on an object in Salesforce is to go to the "Change Data Capture" section in the setup tab. When you’re on this tab, select the object for which you want CDC to be enabled. This section outlines and makes available all objects, including those that are custom.

2. Subscribe to the Event Channel 

After selecting the object and enabling change data capture, you will need to subscribe to the event channel. The Salesforce platform provides users with a Java tool called emp connecter, which allows them to easily subscribe to the event channel and print out any event messages. You can also find the emp connector on Github. 

3. Build the Jar 

The next step is to build the jar, which you can do with the following command: 

java -jar target/emp-connector-0.0.1-SNAPSHOT-phat.jar /data/Employee__ChangeEvent

4. Access Salesforce Events 

After you build the jar, access Salesforce events by subscribing to specific URLs. You can access specific default object URLs through the following format: 


For accessing change data events on custom objects, use the format below: 



5. Use the Jar File to Subscribe to Events in the Specified URL 

Open the shell and type the following command, using the jar file to subscribe to events in the specified URL: 

java -jar target/emp-connector-0.0.1-SNAPSHOT-phat.jar /data/sale_item__ChangeEvent

6. Create a New Sale Item Object

After having subscribed to the event, it's time to create a new sale item object. You can achieve this by going to the App launcher and selecting sale_item. By selecting "Click New," you will be able to populate the name and description fields. Be sure to click "Save" after completing this task!

7. Go to the Terminal 

The final step in implementing CDC in Salesforce is to go to the terminal where the emp connector is running. You should find the message in the following format:

{ "schema": "-pszPCNGM45tUPU1ftkjxEA", "payload": { "LastModifiedDate": "2020-01-25T20:36:12.000Z", "OwnerId": "005RM000001vI54mYAE", "CreatedById": "005RM000001vI54mYAE", "ChangeEventHeader": { "commitNumber": 65842604581, "commitUser": "005RM000001vI54mYAE", "sequenceNumber": 1, "entityName": "sale_item__c", "changeType": "CREATE", "changedFields": [], "changeOrigin": "com/salesforce/api/soap/47.0;client=SfdcInternalAPI/", "transactionKey": "00051c2e-a75a-3f97-03fc-cdf4e16d9d3c", "commitTimestamp": 1569443783000, "recordIds": [ "a00RM0000114ICTYA2" ] }, "CreatedDate": "2020-01-25T20:36:12.000Z", "name": "IPhone", "description": "IPhone black with triple camera", "LastModifiedById": "005RM000001vI54mYAE", }, "event": { "replayId": 15053 } }

Change can take place in one of these four values — Create, Update, Delete, Undelete. 

Related Reading: Understanding Change Data Capture: Everything You Need to Know

How Integrate.io Can Help

Implementing change data capture in Salesforce is achievable when you follow the custom-code approach outlined above. However, you may need an expert developer to get the job done. Luckily, there is an easier solution for implementing change data capture in Salesforce. This solution is to use the Integrate.io platform, which can help you set up numerous Salesforce data integrations.

Are you ready to discover what the Integrate.io platform has to offer your organization? If so, contact our team today to schedule a 7-day demo of our platform, and see how we can help your company optimize all aspects of your data management.