Use Change Data Capture when your product needs to know that a Salesforce record changed, and platform events when it needs to know that something happened that isn't a single row changing. Change Data Capture (CDC) publishes on every create, update, delete and undelete of the objects a customer selects, with a schema Salesforce defines. A platform event is published only when Apex, a flow or an API call publishes it, with fields you define.
For a SaaS company the choice is less about features than about what each one costs inside every customer's org. Both draw on one shared delivery allocation, they count differently against managed package limits, and the subscriber you run has to work across hundreds of customer orgs, not one. Appnigma works with B2B SaaS teams on exactly this kind of customer-facing Salesforce integration. Our done for you delivery builds and maintains the integrations your customers ask for, and our marketplace apps work ships the managed package when the logic has to live inside Salesforce.
Updated October 2026. Checked against the Change Data Capture Developer Guide, the Platform Events Developer Guide and the Pub/Sub API Developer Guide. The earlier version said change events carry old and new values, treated CDC and platform event delivery as two separate budgets, and said Pub/Sub API handles PushTopic events. None of those match Salesforce's docs. This update corrects them and adds what happens during bulk loads, the packaged channel rule for CDC, and the multi-org subscriber design.
How the two event types differ
The differences that matter for an integration are who publishes, what the payload carries, and which limits each one spends. The table uses Salesforce's documented behavior for high-volume platform events, which is the only kind you can still define.
| Change Data Capture | Platform events | |
|---|---|---|
| Who publishes | Salesforce, on record changes | Your Apex, flows, or an API client |
| Schema | Mirrors the object, for example AccountChangeEvent | Fields you define on an __e object |
| Can an external system publish | No | Yes, through Pub/Sub API, REST, SOAP or Bulk API |
| Payload on update | New values of changed fields, plus the changedFields list | Whatever you put in it |
| Includes prior field values | No | Only if your publisher adds them |
| Hourly publishing allocation | None | 250,000 on Enterprise and above, 50,000 on Developer |
| 24-hour delivery allocation | Shared with platform events | Shared with CDC |
| Retention | 72 hours | 72 hours |
| Maximum message size | 1 MB, larger changes become gap events | 1 MB, larger publishes fail |
| Editions | Enterprise, Performance, Unlimited, Developer | Not supported in Professional or Group |
The publishing numbers come from Default Platform Event Allocations. For CDC, Salesforce "doesn't enforce a publishing limit for Change Data Capture because users don't control the total events published," per Change Data Capture Allocations. Both are stored "for 72 hours," per Event Message Durability. Standard-volume platform events, the older kind with a 24-hour window, "will be retired in Summer '27," per Standard-Volume Platform Event Allocations.
One delivery allocation covers both event types
The most common design error is to budget CDC and platform events separately. Salesforce states that "the event delivery allocation is shared between high-volume platform events and Change Data Capture events," on both the CDC allocations page and the platform event allocations page. Without an add-on, Performance and Unlimited orgs can receive 50,000 delivered events in a rolling 24 hours. Enterprise orgs get 25,000 and Developer orgs get 10,000.
Delivery is counted per subscriber client, not per event. Salesforce's own example is an Unlimited org where "20,000 event messages are delivered to two subscribed clients. So you consumed 40,000 events." The allocation covers Pub/Sub API, CometD, the empApi Lightning component and event relays. It excludes Apex triggers and flows, so an event consumed only inside Salesforce doesn't draw it down. The docs still list Process Builder in that exclusion. Salesforce "no longer supports Workflow Rules and Process Builder as of December 31, 2025," per this Help article. New subscribers inside the org should be flows or triggers.
For a SaaS vendor that changes the math, because your subscriber is rarely the only one in the customer's org. Here is a worked example from the documented limits, not a measured customer. An Enterprise org selects Account and Opportunity for CDC and makes 9,000 qualifying changes a day. Your product's subscriber receives 9,000. The customer's own middleware subscribes to the same changes and receives another 9,000. One admin keeps a Lightning page open that listens through empApi, which is a third subscribed client, and that makes 27,000. The org is past its 25,000 allocation, and your integration is usually the one that gets the support ticket.
Two settings keep you inside the number. Subscribe to a custom channel that holds only the objects you read, not the default ChangeEvents channel, and add a stream filter so the org delivers only the changes you act on. Salesforce lists both as ways to "reduce the consumption of delivered events" on the CDC allocations page. An add-on licence raises delivery by "100,000 per day (3 million a month)" and allows spikes through a grace allocation, per the add-on licence page. The customer buys it, not you, which is why it belongs in your install requirements rather than in a support reply.
What happens to change events during a data load
A bulk update doesn't always publish one change event per record. Salesforce merges events "if the same change occurred in multiple records of the same object type during one second," and sends one event whose recordIds field lists every record, per Merged Change Events. A mass update that sets one field to one value can arrive as far fewer events than records. A data load with different values per row can't be merged, and arrives one event per record.
Very large transactions behave differently again. "The first 100,000 changes generate change events," and the rest produce one overflow event per object type that carries no record IDs, per Overflow Events. In an update, "each field change counts toward the overflow threshold." Gap events replace a change event when it would exceed 1 MB, or when a change happened directly in the database, per Gap Events. Your subscriber has to handle both by querying the records again, because neither carries the field values.
If a load pushes delivery past the allocation, the org doesn't silently drop events. The subscription is disconnected with the Pub/Sub API error code sfdc.platform.eventbus.grpc.subscription.limit.exceeded. The events stay on the bus "for the retention period of 72 hours," and you resume from the last stored replay ID once usage falls, per the CDC allocations page. The real risk is a subscriber that stays disconnected for more than three days, a long weekend plus a slow fix. After that the replay window has closed and only a reconciliation query, comparing LastModifiedDate since your last good sync, gets the customer's data back in step. For large objects that query is a job for Bulk API 2.0, which is also how most teams run the first backfill before the stream takes over.
Does a change event include the old value?
No. On an update, a change event received through Pub/Sub API holds the new value of each changed field, and "unchanged fields have an empty value even if they have a value on the record," per Change Event Body Fields. The header's changedFields list tells you which fields moved, and nulledFields tells you which were set to null. There is no prior value anywhere in the message.
This matters when your product logic depends on the transition, such as an opportunity moving from one stage to another, or an owner change you need to route. You have two documented options. Keep your own copy of the record and compare on receipt, which an external sync usually does anyway. Or publish a platform event from an Apex trigger, which has access to the record's earlier values in the same transaction, and put both values in the payload. The second option moves the event into your managed package, which brings in the limits in the next section.
How managed packages count against each allocation
If you distribute a managed package, the two features treat your package in opposite ways, and the CDC rule has a condition most summaries leave out.
For CDC, an org can select five entities by default across all channels. Salesforce excludes "selections that installed AppExchange released managed packages make in a custom channel that's part of the package," per Allocations for AppExchange Released Managed Packages. The exemption depends on your package shipping its own custom channel with its channel members. It applies to first and second generation packages, and "the entity selection allocation is still enforced in the package development org." A customer at five selections can still install your package.
For platform events the rule runs the other way. "Platform events that originate from an installed managed package share the org's allocation for the maximum number of platform event definitions," per Common Platform Event Allocations. The ceiling is 100 definitions on Performance and Unlimited, 50 on Enterprise and 5 on Developer. A package that defines eight platform events won't install in a Developer org used for a trial. Professional and Group Edition orgs are a harder stop, because "installation of a package that contains platform event objects fails in those orgs," per Considerations for Defining and Publishing Platform Events.
| CDC entity selections | Platform event definitions | |
|---|---|---|
| Does a released AppExchange package count against the customer's allocation | No, for selections in the package's own custom channel | Yes |
| Customer org allocation | 5 entities by default, removed by the CDC add-on | 100, 50 or 5 by edition, none in Professional |
| Package development org | Still enforced | Same allocation as any org |
The packaged channel has one upgrade detail. Salesforce lists PlatformEventChannel as not updated during a package upgrade, while PlatformEventChannelMember is, per the packageable components list. Ship the channel in your first release and add objects to it as members later.
The practical design is a small number of platform event definitions, often one per integration with a type field, and a packaged CDC channel for the objects you mirror. For the wider set of limits that change once a package is certified, see our guide to governor limits in managed packages.
Subscribing from your own product across many customer orgs
Salesforce documents Pub/Sub API as "a single interface for publishing and subscribing to platform events, including real-time event monitoring events, and change data capture events," per Get Started with Pub/Sub API. It uses gRPC and binary Avro, and the client pulls events in batches of up to 100 per fetch, per Pub/Sub API Allocations. PushTopic events are not part of it. Salesforce marks PushTopic as "a legacy product" and suggests Change Data Capture instead, per PushTopic Events (Legacy).
A vendor subscriber runs one stream per customer org per channel, each authorized by that customer, which is the OAuth setup for a SaaS app connecting to many orgs. Four details decide whether it survives production. First, store the replay ID per org and per channel after you process each batch, because that is what lets you resume inside the 72-hour window. Second, the integration user your subscriber runs as needs the right access. "Change Data Capture ignores sharing settings and sends change events for all records of a Salesforce object," so the subscribing user needs View All Records on each object, or View All Data, per Required Permissions for Change Event Subscribers. A user without it can still subscribe and silently receives nothing for that object, which looks like a quiet org rather than a permissions bug. Third, check the customer's edition before you promise real-time sync. Pub/Sub API and CDC are documented for Enterprise, Performance, Unlimited and Developer editions. Fourth, expect duplicates. Platform event publishing "uses the at-least-once pub/sub model, not the exactly-once model," per the platform event considerations, so make your handler idempotent on the event's EventUuid.
Publishing back into the org has its own cost. Platform events published through REST, SOAP or Bulk API consume the org's daily API request allocation on top of the event publishing allocation. Events published through Pub/Sub API, Apex or flows don't, per Default Platform Event Allocations. A vendor that publishes into customer orgs over REST is spending the same daily API requests the customer's other tools use. For how that daily allocation works per org, see our post on Salesforce API rate limits. Running this across a customer base is mostly an operations problem. Appnigma's integration infrastructure is built for that, and lets you "monitor each customer's connections, identify issues, and move fixes through the same review and release process."
Which one to pick for a customer-facing integration
Pick CDC when your product mirrors Salesforce records into its own store, such as a sync of accounts, contacts or opportunities. Salesforce publishes for you, the payload follows the object as fields are added, and a packaged custom channel keeps you out of the customer's five entity slots.
Pick platform events when the signal isn't a row changing, when an external system publishes into Salesforce, or when you need the prior value in the payload. You control the schema, which matters when the subscriber is your product and a field rename in the customer's org would otherwise break it.
Most production integrations use both. CDC keeps the data in step, and a few platform events carry the decisions your product makes or the requests it sends back. Our post on Salesforce integration patterns covers where events fit next to request and reply calls and batch sync.
Mistakes that show up after customers install
- Budgeting CDC and platform events separately, then running out of the one shared delivery allocation in a customer org with its own subscribers.
- Subscribing to the default ChangeEvents channel instead of a filtered custom channel, so every selected object counts against delivery.
- Selecting CDC entities from setup instructions instead of a packaged custom channel, which spends the customer's five default slots.
- Expecting old values in change events, then finding the transition logic has nothing to compare against.
- Treating overflow and gap events as errors to log rather than records to refetch.
- Processing a platform event twice because the handler wasn't idempotent on EventUuid.
- Keeping replay IDs in memory, so a restart after a three-day outage has nothing to resume from and no reconciliation path.
Frequently Asked Questions
What is the difference between platform events and change data capture?
Change Data Capture is published by Salesforce whenever a selected record is created, updated, deleted or undeleted. Platform events are published only when your code, a flow or an API client publishes them, with fields you define.
Do platform events and change data capture share limits?
Yes. They share one 24-hour delivery allocation, counted per subscriber client. Performance and Unlimited orgs get 50,000 events. Enterprise gets 25,000 and Developer gets 10,000.
Does Salesforce change data capture include old values?
No. An update event carries the new values of changed fields and a changedFields list. If you need the prior value, keep your own copy or publish a platform event from an Apex trigger.
Do managed package platform events count against the customer's limit?
Yes, package platform event definitions share the org's allocation of 100, 50 or 5, and the package won't install in Professional or Group Edition. CDC selections a released AppExchange package makes in its own custom channel don't count against the five entity default.
Can Appnigma build our event-driven Salesforce integration?
Yes. Appnigma's done for you delivery builds and maintains customer-facing integrations with a named integration engineer, and marketplace apps covers the managed package when the events start inside Salesforce.
Related Articles
- Governor Limits in Verified Managed Packages
- Salesforce Integration Patterns and Best Practices
- Salesforce Webhook Integrations
- Salesforce API Rate Limits
- Salesforce Bulk API 2.0 Guide
- Salesforce ERP Integration Guide
Sources
- Salesforce Developers, Change Data Capture Developer Guide, Change Data Capture Allocations
- Salesforce Developers, Platform Events Developer Guide, Default Platform Event Allocations for Event Publishing and Delivery
- Salesforce Developers, Platform Events Developer Guide, Common Platform Event Allocations
- Salesforce Developers, Platform Events Developer Guide, Increase Your Allocations with a Platform Event Add-On License
- Salesforce Developers, Platform Events Developer Guide, Standard-Volume Platform Event Allocations
- Salesforce Developers, Change Data Capture Developer Guide, Change Event Body Fields
- Salesforce Developers, Change Data Capture Developer Guide, Merged Change Events
- Salesforce Developers, Change Data Capture Developer Guide, Overflow Events
- Salesforce Developers, Change Data Capture Developer Guide, Gap Events
- Salesforce Developers, Change Data Capture Developer Guide, Required Permissions for Change Event Subscribers
- Salesforce Developers, Pub/Sub API Developer Guide, Get Started with Pub/Sub API
- Salesforce Developers, Pub/Sub API Developer Guide, Pub/Sub API and Event Allocations
- Salesforce Developers, Pub/Sub API Developer Guide, Event Message Durability
- Salesforce Developers, Streaming API Developer Guide, PushTopic Events (Legacy)
- Salesforce Developers, Platform Events Developer Guide, Considerations for Defining and Publishing Platform Events
- Salesforce Developers, Second-Generation Managed Packaging Developer Guide, Components Available in Managed Packages
- Salesforce Help, Workflow Rules and Process Builder End of Support