A ChangeEvent object is available for each object that supports Change Data Capture. You can subscribe to a stream of change events using Change Data Capture to receive data tied to record changes in Salesforce. Changes include record creation, updates to an existing record, deletion of a record, and undeletion of a record. A change event isn’t a Salesforce object—it doesn’t support CRUD operations or queries. It’s included in the object reference so you can discover which Salesforce objects support change events.
Supported Calls
describeSObjects()
Special Access Rules
All objects may not be available in your org. Some objects require specific feature settings and permissions to be enabled.
For more special access rules, if any, see the documentation for the standard object. For example, for AccountChangeEvent, see the special access rules for Account.
Change Event Support
Change events are available for all custom objects and a subset of standard objects. Change events that correspond to custom settings are partially supported. They aren’t supported in Apex triggers but are supported in other types of subscribers. For more information about standard object support, see the Objects That Support Change Events section below.
Change Event Name
The name of a change event is based on the name of the corresponding object for which it captures the changes.
Standard Object Change Event Name:
1<Standard_Object_Name>ChangeEvent
Example: AccountChangeEvent
Custom Object Change Event Name:
1<Custom_Object_Name>__ChangeEvent
Example: MyCustomObject__ChangeEvent
Change Event Fields
The fields that a change event can include correspond to the fields on the associated parent Salesforce object, with a few exceptions. For example, AccountChangeEvent fields correspond to the fields on Account.
The fields that a change event doesn’t include are:
The IsDeleted system field.
The SystemModStamp system field.
Any field whose value isn’t on the record and is derived from another record or from a formula, except roll-up summary fields, which are included. Examples are formula fields. Examples of fields with derived values include LastActivityDate and PhotoUrl.
Each change event also contains header fields. The header fields are included inside the ChangeEventHeader field. They contain information about the event, such as whether the change was an update or delete and the name of the object, like Account.
In addition to the event payload, the event schema ID is included in the schema field. Also included is the event-specific field, replayId, which is used for retrieving past events.
Event Message Example
This example is an event message in JSON format for a new account record creation.
1{2 "schema": "IeRuaY6cbI_HsV8Rv1Mc5g",3 "payload": {4 "ChangeEventHeader": {5 "entityName": "Account",6 "recordIds": [7 "<record_ID>"8 ],9 "changeType": "CREATE",10 "changeOrigin": "com/salesforce/api/soap/51.0;client=SfdcInternalAPI/",11 "transactionKey": "0002343d-9d90-e395-ed20-cf416ba652ad",12 "sequenceNumber": 1,13 "commitTimestamp": 1612912679000,14 "commitNumber": 10716283339728,15 "commitUser": "<User_ID>"16 },17 "Name": "Acme",18 "Description": "Everyone is talking about the cloud. But what does it mean?",19 "OwnerId": "<Owner_ID>",20 "CreatedDate": "2021-02-09T23:17:59Z",21 "CreatedById": "<User_ID>",22 "LastModifiedDate": "2021-02-09T23:17:59Z",23 "LastModifiedById": "<User_ID>"24 },25 "event": {26 "replayId": 627 }28}
API Version and Schema
When you subscribe to change events, the subscription uses the latest API version and the event messages received reflect the latest field definitions. For more information, see API Version and Event Schema in the Change Data Capture Developer Guide.
These objects have associated ChangeEvent objects.
Account (including Person Account)
AccountCleanInfo
AccountContactRelation
AccountContactRole
AccountPlan
AccountTeamMember
ActionCadence
ActionCadenceStep
ActionCadenceStepTracker
ActionCadenceTracker
AdOrderLineAdTarget
AdProductTargetCategory
AdQuoteLineAdTarget
AdTargetCategory
AdTargetCategorySegment
AgentWork
AgentWorkSkill
AppExtension
Asset
AssetWarranty
AssetRelationship
AssignedResource
AssociatedLocation
AuthorizationForm
AuthorizationFormConsent
AuthorizationFormDataUse
AuthorizationFormText
Automotive Cloud. Some objects are supported. See StandardObjectNameChangeEvent in the Automotive Cloud Developer Guide.
BriefcaseAssignment
BriefcaseDefinition
BroadcastTopicNetwork
BusinessBrand
CalendarView
CallTemplate
Campaign
CampaignMember
CampaignMemberStatus
CartDeliveryGroup
CartItem
CartItemPriceAdjustment
CartTax
CartValidationOutput
Case
CaseRelatedIssue
ChangeRequest
ChangeRequestRelatedIssue
ChangeRequestRelatedItem
CollaborationGroupRecord
CollabTemplateMetric
CommerceEntitlementBuyerGroup
CommerceEntitlementPolicy
CommerceEntitlementProduct
CommSubscription
CommSubscriptionChannelType
CommSubscriptionConsent
CommSubscriptionTiming
ConferenceNumber
Consumer Goods Cloud. Some objects are supported. See StandardObjectNameChangeEvent in the Consumer Goods Cloud Developer Guide.
Contact
ContactCleanInfo
ContentDocument
ContentDocumentLink
ContentFolder
ContactPointAddress
ContactPointConsent
ContactPointEmail
ContactPointPhone
ContactPointTypeConsent
ContentVersion
Contract
ContractLineItem
Conversation Reason objects: ConversationContextEntry, ConversationReason, ConversationReasonExcerpt, and ConversationReasonGroup. See Einstein Conversation Insights in Salesforce Help.
Coupon
CustomFieldDisplayValue
DataUseLegalBasis
DataUsePurpose
DigitalSignature
DocProcReview
DynamicDataCapture
EmailMessage
EmailTemplate
EngagementAttendee
EngagementChannelType
EngagementInteraction
EngagementTopic
Entitlement
Event
EventRelation
Expense
ExternalClientAppSettings
ExternalEvent
FieldServiceMobileSettings
Financial Services Cloud. Some objects are supported. See StandardObjectNameChangeEvent in the Financial Services Cloud Developer Guide.
FlowRecord
FlowRecordElement
FlowRecordVersion
FlowOrchestration
FlowOrchestrationVersion
ForecastingOwnerAdjustment
FulfillmentOrderItemTax
Health Cloud. Some objects are supported. See StandardObjectNameChangeEvent in the Salesforce Health Cloud Developer Guide.
Incident Related Item
Individual
LandingPage
Lead
LinkedArticle
ListEmail
LiveAgentSession
LiveChatTranscript
LiveChatTranscriptEvent
LiveChatVisitor
Location
LocationGroup
LocationGroupAssignment
Loyalty Management. Some objects are supported. See StandardObjectNameChangeEvent in the Loyalty Management Developer Guide.
Macro
MacroInstruction
MaintenanceAsset
MaintenancePlan
ManagedContent
Manufacturing Cloud. Some objects are supported. See StandardObjectNameChangeEvent in the Manufacturing Cloud Developer Guide.