Skip to content

Commit c2bf70f

Browse files
committed
doc: refresh with PubSubEventEmitter
1 parent 80f42cc commit c2bf70f

File tree

1 file changed

+71
-80
lines changed

1 file changed

+71
-80
lines changed

README.md

Lines changed: 71 additions & 80 deletions
Original file line numberDiff line numberDiff line change
@@ -163,89 +163,80 @@ Here's an example that will get you started quickly. It listens to a single acco
163163
Received 1 events, latest replay ID: 18098167
164164
Handling Account change event with ID 18098167 on channel /data/AccountChangeEvent (1/1 events received so far)
165165
{
166-
"replayId": 18098167,
167-
"payload": {
168-
"ChangeEventHeader": {
169-
"entityName": "Account",
170-
"recordIds": [
171-
"0014H00002LbR7QQAV"
172-
],
173-
"changeType": "UPDATE",
174-
"changeOrigin": "com/salesforce/api/soap/58.0;client=SfdcInternalAPI/",
175-
"transactionKey": "000046c7-a642-11e2-c29b-229c6786473e",
176-
"sequenceNumber": 1,
177-
"commitTimestamp": 1696444513000,
178-
"commitNumber": 11657372702432,
179-
"commitUser": "00558000000yFyDAAU",
180-
"nulledFields": [],
181-
"diffFields": [],
182-
"changedFields": [
183-
"LastModifiedDate",
184-
"BillingAddress.State"
185-
]
186-
},
187-
"Name": null,
188-
"Type": null,
189-
"ParentId": null,
190-
"BillingAddress": {
191-
"Street": null,
192-
"City": null,
193-
"State": "CA",
194-
"PostalCode": null,
195-
"Country": null,
196-
"StateCode": null,
197-
"CountryCode": null,
198-
"Latitude": null,
199-
"Longitude": null,
200-
"Xyz": null,
201-
"GeocodeAccuracy": null
202-
},
203-
"ShippingAddress": null,
204-
"Phone": null,
205-
"Fax": null,
206-
"AccountNumber": null,
207-
"Website": null,
208-
"Sic": null,
209-
"Industry": null,
210-
"AnnualRevenue": null,
211-
"NumberOfEmployees": null,
212-
"Ownership": null,
213-
"TickerSymbol": null,
214-
"Description": null,
215-
"Rating": null,
216-
"Site": null,
217-
"OwnerId": null,
218-
"CreatedDate": null,
219-
"CreatedById": null,
220-
"LastModifiedDate": 1696444513000,
221-
"LastModifiedById": null,
222-
"Jigsaw": null,
223-
"JigsawCompanyId": null,
224-
"CleanStatus": null,
225-
"AccountSource": null,
226-
"DunsNumber": null,
227-
"Tradestyle": null,
228-
"NaicsCode": null,
229-
"NaicsDesc": null,
230-
"YearStarted": null,
231-
"SicDesc": null,
232-
"DandbCompanyId": null,
233-
"CustomerPriority__c": null,
234-
"SLA__c": null,
235-
"Active__c": null,
236-
"NumberofLocations__c": null,
237-
"UpsellOpportunity__c": null,
238-
"SLASerialNumber__c": null,
239-
"SLAExpirationDate__c": null,
240-
"Potential_Value__c": null,
241-
"Match_Billing_Address__c": null,
242-
"Number_of_Contacts__c": null,
243-
"Region__c": null
244-
}
166+
"replayId": 18098167,
167+
"payload": {
168+
"ChangeEventHeader": {
169+
"entityName": "Account",
170+
"recordIds": [
171+
"0014H00002LbR7QQAV"
172+
],
173+
"changeType": "UPDATE",
174+
"changeOrigin": "com/salesforce/api/soap/58.0;client=SfdcInternalAPI/",
175+
"transactionKey": "000046c7-a642-11e2-c29b-229c6786473e",
176+
"sequenceNumber": 1,
177+
"commitTimestamp": 1696444513000,
178+
"commitNumber": 11657372702432,
179+
"commitUser": "00558000000yFyDAAU",
180+
"nulledFields": [],
181+
"diffFields": [],
182+
"changedFields": [
183+
"LastModifiedDate",
184+
"BillingAddress.City",
185+
"BillingAddress.State"
186+
]
187+
},
188+
"Name": null,
189+
"Type": null,
190+
"ParentId": null,
191+
"BillingAddress": {
192+
"Street": null,
193+
"City": "San Francisco",
194+
"State": "CA",
195+
"PostalCode": null,
196+
"Country": null,
197+
"StateCode": null,
198+
"CountryCode": null,
199+
"Latitude": null,
200+
"Longitude": null,
201+
"Xyz": null,
202+
"GeocodeAccuracy": null
203+
},
204+
"ShippingAddress": null,
205+
"Phone": null,
206+
"Fax": null,
207+
"AccountNumber": null,
208+
"Website": null,
209+
"Sic": null,
210+
"Industry": null,
211+
"AnnualRevenue": null,
212+
"NumberOfEmployees": null,
213+
"Ownership": null,
214+
"TickerSymbol": null,
215+
"Description": null,
216+
"Rating": null,
217+
"Site": null,
218+
"OwnerId": null,
219+
"CreatedDate": null,
220+
"CreatedById": null,
221+
"LastModifiedDate": 1696444513000,
222+
"LastModifiedById": null,
223+
"Jigsaw": null,
224+
"JigsawCompanyId": null,
225+
"CleanStatus": null,
226+
"AccountSource": null,
227+
"DunsNumber": null,
228+
"Tradestyle": null,
229+
"NaicsCode": null,
230+
"NaicsDesc": null,
231+
"YearStarted": null,
232+
"SicDesc": null,
233+
"DandbCompanyId": null
234+
}
245235
}
246236
```
247237
248-
Note that the change event payloads include all object fields but fields that haven't changed are null.
238+
Note that the change event payloads include all object fields but fields that haven't changed are null. In the above example, the only changes are the Billing State, Billing City and Last Modified Date.
239+
249240
Use the values from `ChangeEventHeader.nulledFields`, `ChangeEventHeader.diffFields` and `ChangeEventHeader.changedFields` to identify actual value changes.
250241
251242
After receiving the number of requested events, the script will terminate with these messages:

0 commit comments

Comments
 (0)