Newer Version Available

This content describes an older version of this product. View Latest

Change Events for Users

The user and email preferences in change events include only the preferences that are enabled (set to true) without their Boolean values. Preferences that are disabled (set to false) are not included in the event payload.

For a list of user and email preferences, see the User Object in the Object Reference.

Preferences are stored in a 32-bit integer internal field in the database. When a preference is changed, a change is detected in the corresponding 32-bit integer field, and all enabled preferences that are represented by that internal integer field are published, whether or not they were changed.

Note

Example

This change event is generated when a User record is created. Preferences are included under EmailPreferences and UserPreferences.

1{
2  "schema": "93etK5psDNYN7fkR6LeDVw",
3  "payload": {
4  "ChangeEventHeader": {
5    "commitNumber": 59039569143,
6    "commitUser": "005RM000001iKYtYAM",
7    "sequenceNumber": 1,
8    "entityName": "User",
9    "changeType": "CREATE",
10    "changedFields": [],
11    "changeOrigin": "",
12    "transactionKey": "00018898-30ff-31da-204e-aaf5973aaf25",
13    "commitTimestamp": 1565033021000,
14    "recordIds": [
15      "005RM000001vSg0YAE"
16    ]
17  },
18  "ProfileId": "00eRM000000zej4YAA",
19  "EmailPreferences": [
20    "AutoBcc",
21    "StayInTouchReminder"
22  ],
23  "UserPreferences": [
24      "ActivityRemindersPopup",
25      "EventRemindersCheckboxDefault",
26      "TaskRemindersCheckboxDefault",
27      "DisableLikeEmail",
28      "SortFeedByComment",
29      "ShowTitleToExternalUsers",
30      "LightningExperiencePreferred",
31      "HideSfxWelcomeMat"
32    ],
33    "LastModifiedDate": "2019-08-05T19:23:41.000Z",
34    "ReceivesAdminInfoEmails": true,
35    "Email": "jane.smith@example.com",
36    "LanguageLocaleKey": "en_US",
37    "TimeZoneSidKey": "America/Los_Angeles",
38    "IsActive": true,
39    "ForecastEnabled": false,
40    "DigestFrequency": "D",
41    "Name": {
42      "FirstName": "Jane",
43      "LastName": "Smith"
44    },
45    "IsProfilePhotoActive": false,
46    "CommunityNickname": "jane.smith",
47    "CreatedById": "005RM000001iKYtYAM",
48    "UserPermissions": [],
49    "LocaleSidKey": "en_US",
50    "IsSystemControlled": false,
51    "EmailEncodingKey": "ISO-8859-1",
52    "ReceivesInfoEmails": true,
53    "Username": "jane.smith@example.com",
54    "Alias": "janes",
55    "DefaultGroupNotificationFrequency": "N",
56    "CreatedDate": "2019-08-05T19:23:41.000Z",
57    "UserType": "Standard",
58    "LastModifiedById": "005RM000001iKYtYAM"
59  },
60  "event": {
61    "replayId": 27
62  }
63}