Newer Version Available
Change Events for Lead Conversion
Converting a lead results in the creation of an account, a contact, and optionally an
opportunity, and also a lead update. When converting a lead, the change event for the lead
update includes fields specific to the conversion.
These fields are included in the lead update change event for a lead conversion.
| Field | Description |
|---|---|
| Status | The lead conversion status. Possible status values are in the LeadStatus standard object. |
| IsConverted | Indicates whether the lead was converted (true). |
| ConvertedDate | The date of the lead conversion. ConvertedDate doesn’t include the time. |
| ConvertedAccountId | The ID of the account created in the lead conversion. |
| ConvertedContactId | The ID of the contact created in the lead conversion. |
| ConvertedOpportunityId | The ID of the opportunity created in the lead conversion. |
The change event for the lead update doesn't include the LastModifiedDate field.
For an example lead update change event for a lead conversion, see Lead Update Change Event in the Example section.
Example
These example change events are generated when converting a lead. The order of the change events corresponds to the sequence of operations: the creation of an account, contact, opportunity, and the lead update. The sequenceNumber field in each change event denotes the sequence of the operations in the same transaction.
Account Create Change Event
1{
2 "data": {
3 "schema": "t9m-QIHrQ-DjEtyYLAowhA",
4 "payload": {
5 "LastModifiedDate": "2021-05-03T23:30:14.000Z",
6 "Name": "Cadinal Inc.",
7 "CreatedById": "00550000001N45jAAC",
8 "AccountSource": "Web",
9 "CreatedDate": "2021-05-03T23:30:14.000Z",
10 "BillingAddress": {
11 "State": "IL",
12 "Country": "USA"
13 },
14 "OwnerId": "00550000001N45jAAC",
15 "Phone": "(847) 262-5000",
16 "ChangeEventHeader": {
17 "commitNumber": 10969942389321,
18 "commitUser": "00550000001N45jAAC",
19 "sequenceNumber": 1,
20 "entityName": "Account",
21 "changeType": "CREATE",
22 "changedFields": [
23 ],
24 "changeOrigin": "com/salesforce/api/soap/51.0;client=SfdcInternalAPI/",
25 "transactionKey": "0003dc15-ae1e-8042-f9a1-cc4ed6f1bc51",
26 "commitTimestamp": 1620084614000,
27 "recordIds": [
28 "0012J00002SrYmBQAV"
29 ]
30 },
31 "LastModifiedById": "00550000001N45jAAC"
32 },
33 "event": {
34 "replayId": 7635322
35 }
36 },
37 "channel": "/data/ChangeEvents"
38}Contact Create Change Event
1{
2 "data": {
3 "schema": "zvY0n7RbB6-4Gy3s5TfJCw",
4 "payload": {
5 "LastModifiedDate": "2021-05-03T23:30:14.000Z",
6 "AccountId": "0012J00002SrYmBQAV",
7 "Email": "brenda@cardinal.net",
8 "Name": {
9 "FirstName": "Brenda",
10 "LastName": "Mcclure"
11 },
12 "OwnerId": "00550000001N45jAAC",
13 "CreatedById": "00550000001N45jAAC",
14 "Phone": "(847) 262-5000",
15 "Title": "CFO",
16 "MailingAddress": {
17 "State": "IL",
18 "Country": "USA"
19 },
20 "LeadSource": "Web",
21 "ChangeEventHeader": {
22 "commitNumber": 10969942389321,
23 "commitUser": "00550000001N45jAAC",
24 "sequenceNumber": 2,
25 "entityName": "Contact",
26 "changeType": "CREATE",
27 "changedFields": [
28 ],
29 "changeOrigin": "com/salesforce/api/soap/51.0;client=SfdcInternalAPI/",
30 "transactionKey": "0003dc15-ae1e-8042-f9a1-cc4ed6f1bc51",
31 "commitTimestamp": 1620084614000,
32 "recordIds": [
33 "0032J00003f7EtfQAE"
34 ]
35 },
36 "CreatedDate": "2021-05-03T23:30:14.000Z",
37 "LastModifiedById": "00550000001N45jAAC"
38 },
39 "event": {
40 "replayId": 7635323
41 }
42 },
43 "channel": "/data/ChangeEvents"
44}Opportunity Create Change Event
1{
2 "data": {
3 "schema": "ahbw80yzNnEGGuB-KtyjvQ",
4 "payload": {
5 "LastModifiedDate": "2021-05-03T23:30:14.000Z",
6 "AccountId": "0012J00002SrYmBQAV",
7 "HasOpportunityLineItem": false,
8 "ForecastCategory": "Closed",
9 "IsClosed": true,
10 "CloseDate": "2021-06-30",
11 "Name": "Cadinal Inc.-",
12 "OwnerId": "00550000001N45jAAC",
13 "CreatedById": "00550000001N45jAAC",
14 "IsWon": true,
15 "StageName": "Prospecting",
16 "Probability": 10,
17 "LeadSource": "Web",
18 "ChangeEventHeader": {
19 "commitNumber": 10969942389321,
20 "commitUser": "00550000001N45jAAC",
21 "sequenceNumber": 3,
22 "entityName": "Opportunity",
23 "changeType": "CREATE",
24 "changedFields": [
25 ],
26 "changeOrigin": "com/salesforce/api/soap/51.0;client=SfdcInternalAPI/",
27 "transactionKey": "0003dc15-ae1e-8042-f9a1-cc4ed6f1bc51",
28 "commitTimestamp": 1620084614000,
29 "recordIds": [
30 "0062J00000r4X4QQAU"
31 ]
32 },
33 "CreatedDate": "2021-05-03T23:30:14.000Z",
34 "IsPrivate": false,
35 "ForecastCategoryName": "Closed",
36 "LastModifiedById": "00550000001N45jAAC"
37 },
38 "event": {
39 "replayId": 7635324
40 }
41 },
42 "channel": "/data/ChangeEvents"
43}1{
2 "data": {
3 "schema": "XBX78x3GtAi1BfOW4Yxzqg",
4 "payload": {
5 "ConvertedOpportunityId": "0062J00000r4X4QQAU",
6 "Status": "Closed - Converted",
7 "ConvertedAccountId": "0012J00002SrYmBQAV",
8 "IsConverted": true,
9 "ConvertedDate": "2021-05-03",
10 "ConvertedContactId": "0032J00003f7EtfQAE",
11 "ChangeEventHeader": {
12 "commitNumber": 10969942389321,
13 "commitUser": "00550000001N45jAAC",
14 "sequenceNumber": 4,
15 "entityName": "Lead",
16 "changeType": "UPDATE",
17 "changedFields": [
18 "Status",
19 "IsConverted",
20 "ConvertedDate",
21 "ConvertedAccountId",
22 "ConvertedContactId",
23 "ConvertedOpportunityId"
24 ],
25 "changeOrigin": "com/salesforce/api/soap/51.0;client=SfdcInternalAPI/",
26 "transactionKey": "0003dc15-ae1e-8042-f9a1-cc4ed6f1bc51",
27 "commitTimestamp": 1620084615000,
28 "recordIds": [
29 "00Q5000000TZYWOEA5"
30 ]
31 }
32 },
33 "event": {
34 "replayId": 7635325
35 }
36 },
37 "channel": "/data/ChangeEvents"
38}