Questions tagged [change-data-capture]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
15 votes
1 answer
701 views

Change event triggers contain default value

I've been playing around with change event triggers to get an understanding of them and I noticed that if my objects have fields with default values, those fields are being included in the update ...
Daniel Hoechst's user avatar
14 votes
1 answer
3k views

How do I see debug logs for Change Data Capture triggers in Salesforce?

With Summer '19 we can now have asynchronous apex change event triggers. This is covered in the release notes - Process Change Event Messages in Apex Triggers and the blog post Get #Buildspiration ...
Daniel Ballinger's user avatar
10 votes
1 answer
916 views

Include activation of change data capture event in managed package subscriber org

First, some quick background. I'm aware there are several different ways this could be solved. Platform events, Queueables, batch jobs, etc... For now I'm specifically interested in how this would be ...
Daniel Ballinger's user avatar
9 votes
2 answers
3k views

Will Change Data Capture eventually replace PushTopics/Streaming API?

I need to notify an external system component about changes in Salesforce data. I am confused by the fact that there exist two seemingly competing solutions in Salesforce for that. Both look very ...
Robert Sösemann's user avatar
7 votes
1 answer
6k views

Change Data Capture vs Platform Events vs Replication API vs Streaming API vs Batch Data Synchronization [closed]

I have a requirement to sync Salesforce data from 2 objects to Datawarehouse and insert/update data from Datawarehouse to Salesforce.We want this data sync to be realtime for this application.Data ...
sfdc's user avatar
  • 13.6k
7 votes
2 answers
2k views

Trigger.OldMap equivalent in ChangeEvent?

I'm trying to move a function from the AfterInsert trigger on account, to a Change Data Capture event, AccountChangeEvent. The problem is this function uses Trigger.OldMap to track if there were ...
Dana Griff's user avatar
  • 1,564
7 votes
1 answer
393 views

Send Change Data Capture events from Managed Package

I am wrapping my head around the question of how to leverage Change Data Capture events in a customer's Managed Package app. They want to define a handful (= 10-15) of the packaged Custom Objects to ...
Robert Sösemann's user avatar
7 votes
1 answer
323 views

Add Async Triggers into a Managed Package

Salesforce released the Process Change Event Messages in Apex Triggers in Summer '19, is this feature available in the managed package?
Jair's user avatar
  • 539
5 votes
2 answers
5k views

Change Data Capture

With the new Change Data Capture tool coming out soon, why would someone use this over Platform Events? My understanding is that CDC utilizes Platform Events under the hood anyways.
user5428's user avatar
  • 1,015
5 votes
3 answers
2k views

Can the cometd library be used in Salesforce to listen to external buses?

I'll confess up front that my knowledge of event architecture is limited: Can the cometd library that we can use to listen for Streaming API and Platform Events also be used to listen to external (i....
AlwaysThinkin's user avatar
5 votes
3 answers
764 views

Including External ID in CDC

We are implementing CDC to mirror record changes in Salesforce to our other platforms. When a change occurs to a record the recordIds are passed which contain the Salesforce IDS. However our external ...
Deployment Failure's user avatar
5 votes
1 answer
798 views

Overflow Events in Change Data Capture

The Salesforce team in their Developer Guide has explained the reasons for the generation of GAP_OVERFLOW events. The Developer Guide also mentions that these events won't carry any actual record Ids ...
Raman's user avatar
  • 103
5 votes
0 answers
1k views

Invalid replayId when Appflow is triggered by ChangeEvent in Salesforce [closed]

For an integration with Salesforce, I am using AWS Appflow and subsequently AWS Eventbridge to process certain change events in Salesforce. I have set up an AppFlow integration in AWS (as explained ...
n41r0j's user avatar
  • 51
5 votes
1 answer
548 views

Streaming API Message Reliability and Acknowledgement

How does the Salesforce streaming API ensure message reliability? I understand you can replay events from any replay id within the retention period, but this does not guarantee message delivery. ...
ogoodwin's user avatar
4 votes
2 answers
1k views

Subscribing to a Channel with an Invalid ReplayId?

I am currently in process of building a CDC application in my environment that captures changes and then places them on an Azure service bus for later processing. The way I have the application ...
Tanner.R's user avatar
  • 161
4 votes
1 answer
613 views

Change Data Capture vs Queueable Apex

With the introduction of Change Data Capture, now there is one more way to execute Asynchronous Apex. What are the advantages of Change Data Capture over Queueable Apex? How Salesforce will enqueue ...
Devendra's user avatar
  • 5,057
4 votes
1 answer
890 views

Salesforce Change Data Capture with Cross-ORG external object

I am facing an issue with Change Data Capture I enabled the Change Data Capture (CDC) feature on Opportunity in the source ORG. I am able to write a trigger on the OpportunityChangeEvent in source ...
speruri's user avatar
  • 93
4 votes
1 answer
1k views

Durable Message Replay from Change Data Capture

Given the following posts from Salesforce: Message Durability Replay Events Sample: Code Walkthrough StreamingReplayClientExtensions/java/CometDReplayExtension.java The way I'm understanding the ...
Kyle B.'s user avatar
  • 223
4 votes
1 answer
252 views

CDC processes all 9999 requests at once. Is this by design or a bug?

In salesforce documentation batch size of platform event is mentioned as 2000 maximum (documentation). Which it definitely follows (tested). But for CDC its not mentioned. I also tried this in my dev ...
Nagendra Singh's user avatar
4 votes
0 answers
491 views

Baffling compile error: "A non foreign key field cannot be referenced in a path expression: ChangeEventHeader"

Why is it that this will not compile: trigger AccountChangeTrigger on AccountChangeEvent (after insert) { String dmlType = Trigger.new[0].ChangeEventHeader.changetype; ... A non foreign key ...
Brent Bowers's user avatar
  • 3,074
4 votes
0 answers
239 views

Can a Change Event Trigger include the same record multiple times?

I'm starting to play with Change Event Triggers, building a handler framework and I'm not sure if I need to handle a scenario where the same record would be included in the same Change Event trigger ...
Mike's user avatar
  • 1,179
3 votes
1 answer
332 views

CDC Not working after 24 hours

Was doing some testing with Change Data Capture and Heroku and now I am not receiving any events. This is against a brand new Developer Edition (DE) org. However, if I switch my connection to another ...
Bryan Anderson's user avatar
3 votes
1 answer
251 views

Can we replace legacy Streaming API code with its latest versions?

Barcode reader in the our Airport vip lounges is triggering a REST Service in our Salesforce service org and after that the screen of the vip lounges should get refreshed with the information of the ...
Chetan's user avatar
  • 303
3 votes
1 answer
258 views

Which feature is best/recommended to capture record changes in AppExchange app which Integrates with external system?

As part of integration in AppExchange, we would like to capture Salesforce record changes in external system when some change happens in Salesforce records. There are multiple ways to inform external ...
Ashish's user avatar
  • 2,362
2 votes
1 answer
3k views

Cannot subscribe to Capture Data Changes (CDC) channel using EMP Connector

I'm trying to implement CDC using the EMP Connector sample. I run it against the sandbox and try to subscribe to channels such as /data/ChangeEvents or /data/AccountChangeEvent. I always get this ...
Sruli Ganor's user avatar
2 votes
2 answers
2k views

Does Platform Event / CDC uses same Async queue as Queueable/ Future?

We have a huge concurrent influx of incoming custom api requests. (1000+ under 5 seconds approx) Because of this we were getting ConcurrentPerOrgLongTxn Limit exceeded. We moved from Sync processing ...
Nagendra Singh's user avatar
2 votes
1 answer
403 views

Publishing CDC with Apex trigger

I've been following/researching a few resources online to create a apex trigger that gets triggered after actions on Account objects. I'm trying to test the first bit so far where I want to capture ...
pragmatic learner's user avatar
2 votes
2 answers
773 views

Sending External ID Fields in change data capture(CDC) payload

We have an external system(legacy) from where we will data convert and move the data to salesforce. Lets say the object name is 'Relationship'. every time later when data changes in salesforce for ...
RedDevil's user avatar
  • 7,765
2 votes
1 answer
613 views

Trigger Flow from Change Data Capture Event (CDC)

Can Salesforce Flows listen to Change Data Capture events like Apex Triggers? I couldn't find anything related on the Web and couldn't make it work in my org. In case I can't I would like to ...
Robert Sösemann's user avatar
2 votes
1 answer
1k views

Change Data Capture - Update Events in bulk

I am writing a trigger in Change Data Capture (CDC) on an update of an event record (EventChangeEvent). I am getting the updated fields in the EventChangeEvent object record. Problem I am facing is ...
Json Bourne's user avatar
2 votes
1 answer
227 views

Why CDC has all Sync Limits being an Async process?

According to Salesforce documentation. You can add up to 50 jobs to the queue with System.enqueueJob in a single transaction. In asynchronous transactions (for example, from a batch Apex job), you ...
Nagendra Singh's user avatar
2 votes
1 answer
476 views

How can you delete a PlatformEventChannelMember record via the REST api?

I am trying to configure Change Data Capture for the ChangeEvents channel via the REST API as you can in Setup Change Data Capture when using the Salesforce UI. I am able to add records of ...
waffletower's user avatar
2 votes
0 answers
140 views

Replace trigger on EventRelation

We have a business need where we want to store an Account (business account or person account) last activity date, according to specific criteria from Event and Task the account is in (for example ...
Pierrot's user avatar
  • 73
2 votes
0 answers
271 views

Does Mulesoft automatically handle CDC gap and overflow events?

Does Mulesoft automagically handles Salesforce Change Data Capture (CDC) Gap and Overflow events automagically? It would be nice it that was the case, rather than have to engineer some solution to ...
Kurt Fairfield's user avatar
2 votes
0 answers
39 views

Why use Change Event triggers over existing async methods? [duplicate]

When and why should we use Change Event Triggers over @future or queueable methods? Also do they use sync or asynch limits? I cannot find any clear documentation stating this.
Girbot's user avatar
  • 5,405
1 vote
1 answer
1k views

LWC emp API track field is not rendering

I am trying with small example of emp API, everything works fine I am able to subscribe and unsubscribe, however, the response of CDC not printing in the UI for some reason. May I am missing a small ...
Ajay 's user avatar
  • 1,529
1 vote
1 answer
189 views

Is it possible to retrieve Case ID on case creation with Change Data Capture?

I am using CDC to get Cases on creation by subscribing to data/CaseEventChannel channel. But I see I am not receiving the case ID, is this wrong? Is there a way to have this? I need it for updating ...
hosseio's user avatar
  • 117
1 vote
2 answers
1k views

How do I create Sales Cadence Records Via Apex Test Code?

I created an Apex CDC Trigger on the ActionCadenceTracker object via the ActionCadenceTrackerChangeEvent to update a Lead's status when the sales cadence is completed. I'd like to write Apex test code ...
Luke Freeland's user avatar
1 vote
1 answer
311 views

Why creation of Apex Trigger on Change Event for Custom Setting fails if it is available in the picklist?

Change Event for Custom Settings is available in the picklist to create Apex Trigger, but when you try to create an Apex Trigger on that, it fails. Why?
Patlatus's user avatar
  • 16k
1 vote
1 answer
489 views

The External Change Data Capture doesn't work with an error!

I'm using OData v4.0 and the External Object is set in Salesforce, which is connected with Heroku Connect. However, the Change Data Capture feature does not work, and the following error occurs. &...
Chris Jang's user avatar
1 vote
1 answer
302 views

Use Change Data Capture in the other direction (Heroku -> SF)

I have a Salesforce ISV app that shares some data with its Heroku-based backend. To notify the backend about data changes in Salesforce we use Change Data Capture. For synching back changes from ...
Robert Sösemann's user avatar
1 vote
1 answer
1k views

Getting "before-update" info in Change Data Capture (CDC) events

the CDC feature looks great. However, the Update events only contain the changed fields after the update. Is there a way to also get the original values of the changed fields before the update? This ...
Sruli Ganor's user avatar
1 vote
1 answer
122 views

How may I enrich CDC events with a lookup?

I would like to retrieve things like CreatedBy.Name on Salesforce Change Data Capture. How may I accomplish it? I have looked into Enrich Change Events with Extra Fields, which mentions that Lookups ...
Jeferson Chaves's user avatar
1 vote
3 answers
2k views

How to implement Change Data Capture in LWC component

Developing a component that displays a visualization based on the value of a field, Opportunity.Magic_Number__c. That field is updated periodically via Salesforce REST API calls outside of our ...
nstuyvesant's user avatar
1 vote
1 answer
344 views

Is it possible to subscribe to events in a LWC flow screen component?

I have an LWC FSC (flow screen component). I am trying to subscribe to a CDC event, but the subscription never seems to execute. The same LWC when displayed on a lightning record page does subscribe ...
Nick C's user avatar
  • 6,426
1 vote
1 answer
896 views

Unable to subscribe to CDC events in Sandbox

With the example given in the link: Trailhead - Subscribe to Events, I was able to successfullt connect to my DEV org and listen to the change events for both custom and standard objects. However ...
Sid's user avatar
  • 340
1 vote
1 answer
805 views

How to get list of custom CDC object names and push topics in java?

I'm new to the API and I hope this is nothing more missing something in the documentation. I found the Change Data Capture Developer Guide and other documentation giving the endpoints for Platform ...
bgiles's user avatar
  • 121
1 vote
0 answers
163 views

Alternative to Change data capture

Since Change data capture event (CDC) is a paid add-on after 5 objects, what alternatives we have to get notified about change in salesforce object ?
SharpCoder's user avatar
1 vote
1 answer
168 views

Event-based integration with AWS: durability

I am trying to build a sync mechanism between Salesforce and AWS using AWS AppFlow(Event based). But as per salesforce doc, Change Data Capture Events are only retained for 72 hours: https://developer....
ashwini571's user avatar
1 vote
0 answers
469 views

Salesforce Platform Event & CDC data volume understanding

Can someone explain me how many platform events or CDC can be published at the same time. For PE I believe 10000 events at the same time, considering it would have the same limit as object records. ...
SF Learner23's user avatar