Let us know so we can improve!
Bring Your Own Channel For Messaging Outbound Event Reference
Partner integrations use the Pub/Sub API to subscribe to the custom platform event. There, they receive outbound messages from the rep in Salesforce and forward them to the customer.
Outbound events include diverse message entries and provide supplementary information related to the conversation entry. This event reference includes essential outbound events for partners to integrate, but a full event reference is available in GitHub: Outbound Custom Event Payloads.
Outbound Message Event
The outbound event with "entryType": "Message" provides outbound message content entered by the rep in Salesforce. To show outbound messages to the messaging end user, supporting this event type is required.
Outbound Message Event Sample Payloads
Salesforce supports a wide variety of payloads for format types and message types. Here are a few examples.
1{
2 "recipient": {
3 "appType": "custom",
4 "subject": "meu776",
5 "role": "EndUser"
6 },
7 "conversationIdentifier": "12831257-d663-4cdf-93f3-c92d0c80cd95",
8 "channelAddressIdentifier": "ffb90fa9-b541-4f18-82f6-3e6d7372ffd6",
9 "payload": {
10 "senderDisplayName": "OrgFarm E",
11 "identifier": "979fb89d-18f1-44b9-9cfd-384964172ab8",
12 "entryType": "Message",
13 "entryPayload": {
14 "entryType": "Message",
15 "id": "979fb89d-18f1-44b9-9cfd-384964172ab8",
16 "abstractMessage": {
17 "messageType": "StaticContentMessage",
18 "inReplyToMessageId": null,
19 "customHandlingType": null,
20 "id": "979fb89d-18f1-44b9-9cfd-384964172ab8",
21 "references": [],
22 "contentCategory": null,
23 "staticContent": {
24 "formatType": "Text",
25 "text": "hi"
26 }
27 },
28 "messageReason": null
29 },
30 "modality": "Messaging",
31 "sender": {
32 "appType": "agent",
33 "subject": "005fi700000hS5x",
34 "role": "Agent"
35 },
36 "recipients": {
37 "secondary": null,
38 "hidden": null,
39 "primary": null
40 },
41 "transcriptedTimestamp": 1772485941236,
42 "clientTimestamp": 1772485940994,
43 "clientDuration": 0
44 }
45}Payloads differ based on which capabilities you register for your integration.
1{
2 "recipient": {
3 "appType": "custom",
4 "subject": "dena2",
5 "role": "EndUser"
6 },
7 "conversationIdentifier": "20477fe8-02f9-4422-864b-e74d870be2b3",
8 "channelAddressIdentifier": "ffb90fa9-b541-4f18-82f6-3e6d7372ffd6",
9 "payload": {
10 "senderDisplayName": "OrgFarm E",
11 "identifier": "ae136cc3-346f-495d-9bd4-33e97d853345",
12 "entryType": "Message",
13 "entryPayload": {
14 "entryType": "Message",
15 "id": "ae136cc3-346f-495d-9bd4-33e97d853345",
16 "abstractMessage": {
17 "messageType": "StaticContentMessage",
18 "inReplyToMessageId": null,
19 "customHandlingType": null,
20 "id": "ae136cc3-346f-495d-9bd4-33e97d853345",
21 "references": null,
22 "contentCategory": null,
23 "staticContent": {
24 "formatType": "Text",
25 "text": "dfsdf\nhttps://orgfarm-4e487d01c2.demo.test1.file.pc-rnd.force.com/sfc/dist/version/download/?oid=00Dfi700000tWsD&ids=068fi700000DRNN&d=%2Fa%2Ffi70000002BV%2FN5a6eXqKi2kIXvRkHzAaAKsIKQPHzcZR_dadj_VSDDE&asPdf=false\n"
26 }
27 },
28 "messageReason": null
29 },
30 "modality": "Messaging",
31 "sender": {
32 "appType": "agent",
33 "subject": "005fi700000hS5x",
34 "role": "Agent"
35 },
36 "recipients": {
37 "secondary": null,
38 "hidden": null,
39 "primary": [
40 {
41 "identifier": "b858ec9c-382b-347f-a3ff-b5a361042698",
42 "displayName": "Guest",
43 "contact": "dena2"
44 }
45 ]
46 },
47 "transcriptedTimestamp": 1773084057462,
48 "clientTimestamp": 1773084057163,
49 "clientDuration": 0
50 }
51}1{
2 "eventType": "Interaction",
3 "messageType": "StaticContentMessage",
4 "channelAddressIdFieldVal": "ffb90fa9-b541-4f18-82f6-3e6d7372ffd6",
5 "replyMessageText": null,
6 "attachmentName": "sample_curl.txt",
7 "attachmentUrl": "https://orgfarm-4e487d01c2.demo.test1.file.pc-rnd.force.com/sfc/dist/version/download/?oid=00Dfi700000tWsD&ids=068fi7000008RW5&d=%2Fa%2Ffi70000002Mn%2FS9k05R70uqprYFnkFH1AqHT9vNPS352MOx8zc8h157c&asPdf=false",
8 "recipientUserName": "dena26",
9 "payloadField": {
10 "string": {
11 "recipient": {
12 "appType": "custom",
13 "subject": "dena26",
14 "role": "EndUser"
15 },
16 "conversationIdentifier": "13806bb4-acfb-4d81-a5c2-94717212e86d",
17 "channelAddressIdentifier": "ffb90fa9-b541-4f18-82f6-3e6d7372ffd6",
18 "payload": {
19 "senderDisplayName": "OrgFarm E",
20 "identifier": "85847482-43b4-40ff-84ad-188c7f3576f7",
21 "entryType": "Message",
22 "entryPayload": {
23 "entryType": "Message",
24 "id": "85847482-43b4-40ff-84ad-188c7f3576f7",
25 "abstractMessage": {
26 "messageType": "StaticContentMessage",
27 "inReplyToMessageId": null,
28 "customHandlingType": null,
29 "id": "85847482-43b4-40ff-84ad-188c7f3576f7",
30 "references": [
31 {
32 "recordId": "068fi7000008RW5",
33 "id": "751aa812-63ca-4ded-9bca-7883d2e1ddae"
34 }
35 ],
36 "contentCategory": null,
37 "staticContent": {
38 "formatType": "Attachments",
39 "text": null,
40 "attachments": [
41 {
42 "name": "sample_curl.txt",
43 "attachmentUploadResult": null,
44 "id": "a586bc75-97a1-4f75-8ba7-72fd49013861",
45 "mimeType": "text/plain",
46 "url": "https://orgfarm-4e487d01c2.demo.test1.file.pc-rnd.force.com/sfc/dist/version/download/?oid=00Dfi700000tWsD&ids=068fi7000008RW5&d=%2Fa%2Ffi70000002Mn%2FS9k05R70uqprYFnkFH1AqHT9vNPS352MOx8zc8h157c&asPdf=false",
47 "referenceId": "751aa812-63ca-4ded-9bca-7883d2e1ddae"
48 }
49 ]
50 }
51 },
52 "messageReason": null
53 },
54 "modality": "Messaging",
55 "sender": {
56 "appType": "agent",
57 "subject": "005fi700000hS5x",
58 "role": "Agent"
59 },
60 "recipients": {
61 "secondary": null,
62 "hidden": null,
63 "primary": [
64 {
65 "identifier": "15cf6a6b-fe9d-343b-afdd-776dfed3f225",
66 "displayName": "Guest",
67 "contact": "dena26"
68 }
69 ]
70 },
71 "transcriptedTimestamp": 1773088413656,
72 "clientTimestamp": 1773088413129,
73 "clientDuration": 0
74 }
75 }
76 },
77 "previewImageUrl": null,
78 "url": null,
79 "title": null
80}To support showing a Messaging end user when a rep starts and stops typing, see Configure Inbound Acknowledgments and Outbound Typing Indicators for Bring Your Own Channel for CCaaS or for Bring Your Own Channel for Messaging.
1{
2 "eventType": "Interaction",
3 "payload": {
4 "recipient": {
5 "appType": "custom",
6 "subject": "meu776",
7 "role": "EndUser"
8 },
9 "conversationIdentifier": "12831257-d663-4cdf-93f3-c92d0c80cd95",
10 "channelAddressIdentifier": "ffb90fa9-b541-4f18-82f6-3e6d7372ffd6",
11 "payload": {
12 "senderDisplayName": "OrgFarm E",
13 "identifier": "4ae9c868-8af6-46d9-bcfa-470ce0b3d31d",
14 "entryType": "TypingStartedIndicator",
15 "entryPayload": {
16 "entryType": "TypingStartedIndicator",
17 "id": "4ae9c868-8af6-46d9-bcfa-470ce0b3d31d",
18 "timestamp": 1772486272384
19 },
20 "modality": "Messaging",
21 "sender": {
22 "appType": "agent",
23 "subject": "005fi700000hS5x",
24 "role": "Agent"
25 },
26 "recipients": {
27 "secondary": null,
28 "hidden": null,
29 "primary": null
30 },
31 "transcriptedTimestamp": 1772486272610,
32 "clientTimestamp": 1772486272384,
33 "clientDuration": 0
34 }
35 }
36}1{
2 "eventType": "Interaction",
3 "payload": {
4 "recipient": {
5 "appType": "custom",
6 "subject": "meu776",
7 "role": "EndUser"
8 },
9 "conversationIdentifier": "12831257-d663-4cdf-93f3-c92d0c80cd95",
10 "channelAddressIdentifier": "ffb90fa9-b541-4f18-82f6-3e6d7372ffd6",
11 "payload": {
12 "senderDisplayName": "OrgFarm E",
13 "identifier": "a58816e7-7f9c-4cb0-bd93-fd9854826bf4",
14 "entryType": "TypingStoppedIndicator",
15 "entryPayload": {
16 "entryType": "TypingStoppedIndicator",
17 "id": "a58816e7-7f9c-4cb0-bd93-fd9854826bf4",
18 "timestamp": 1772486274361
19 },
20 "modality": "Messaging",
21 "sender": {
22 "appType": "agent",
23 "subject": "005fi700000hS5x",
24 "role": "Agent"
25 },
26 "recipients": {
27 "secondary": null,
28 "hidden": null,
29 "primary": null
30 },
31 "transcriptedTimestamp": 1772486274440,
32 "clientTimestamp": 1772486274361,
33 "clientDuration": 0
34 }
35 }
36}To support showing citations in an Agentforce Service Agent message, see Add Citations in Agent Responses for Bring Your Own Channel for CCaaS or for Bring Your Own Channel for Messaging.
1{
2 "recipient": {
3 "appType": "custom",
4 "subject": "testing-asa-citation-0001",
5 "role": "EndUser"
6 },
7 "conversationIdentifier": "b2a89043-0850-4b02-b7d1-f6222b3eb963",
8 "channelAddressIdentifier": "82f67da0-bacc-4748-8cd9-e3a2727f7202",
9 "payload": {
10 "senderDisplayName": "Agentforce Service Agent",
11 "identifier": "1772659199329-REQ-1",
12 "entryType": "Message",
13 "entryPayload": {
14 "entryType": "Message",
15 "id": "1772659199329-REQ-1",
16 "abstractMessage": {
17 "messageType": "StaticContentMessage",
18 "inReplyToMessageId": null,
19 "customHandlingType": null,
20 "id": "1772659199329-REQ-1",
21 "references": null,
22 "contentCategory": null,
23 "staticContent": {
24 "formatType": "Text",
25 "text": "To replace your iPhone battery, you can follow step-by-step instructions available on various platforms. Here are some options: 1. DIY Replacement: You can replace the battery yourself using DIY kits. Detailed instructions and comparisons of costs, savings, and time for different models can be found on here. 2. Professional Repair Shop: You can take your iPhone to a reputable repair shop.",
26 "citationContent": {
27 "citations": [
28 {
29 "citedReference": {
30 "citedReferenceType": "Link",
31 "link": {
32 "url": "https://www.example.com/Wiki/iPhone_Battery_Replacement"
33 },
34 "recordId": null,
35 "label": "https://www.example.com/Wiki/iPhone_Battery_Replacement"
36 },
37 "citedDetails": {
38 "citedDetailsType": "InlineMetadata",
39 "inlineMetadata": [
40 {
41 "claim": {
42 "claimStartOffset": 0,
43 "claimEndOffset": 309
44 },
45 "citedLocationOffset": 309
46 }
47 ]
48 }
49 },
50 {
51 "citedReference": {
52 "citedReferenceType": "Link",
53 "link": {
54 "url": "https://www.example.com/News/11220/3-ways-replace-iphone-battery"
55 },
56 "recordId": null,
57 "label": "https://www.example.com/News/11220/3-ways-replace-iphone-battery"
58 },
59 "citedDetails": {
60 "citedDetailsType": "InlineMetadata",
61 "inlineMetadata": [
62 {
63 "claim": {
64 "claimStartOffset": 309,
65 "claimEndOffset": 391
66 },
67 "citedLocationOffset": 391
68 }
69 ]
70 }
71 }
72 ]
73 }
74 }
75 },
76 "messageReason": null
77 },
78 "modality": "Messaging",
79 "sender": {
80 "appType": "chatbot",
81 "subject": "0XxSG000000W0kr",
82 "role": "Chatbot"
83 },
84 "recipients": {
85 "secondary": null,
86 "hidden": null,
87 "primary": null
88 },
89 "transcriptedTimestamp": 1772659207510,
90 "clientTimestamp": 1772659207457,
91 "clientDuration": 0
92 }
93}MessageUpdated Event
The MessageUpdated event signals whether an asynchronous file upload was successful or not in the attachmentUploadResult object. While not required, we recommend that partner integrations listen for and handle this event.
MessageUpdated Event Sample Payloads
1{
2 "recipient": {
3 "appType": "custom",
4 "subject": "dena5",
5 "role": "EndUser"
6 },
7 "conversationIdentifier": "3cbc496d-9dcd-487e-b0b2-f695db7c5b77",
8 "channelAddressIdentifier": "ffb90fa9-b541-4f18-82f6-3e6d7372ffd6",
9 "payload": {
10 "senderDisplayName": "Automated Process",
11 "identifier": "aa031a9d-f35c-4de0-bed6-417ed113ecf8",
12 "entryType": "MessageUpdated",
13 "entryPayload": {
14 "entryType": "MessageUpdated",
15 "id": "aa031a9d-f35c-4de0-bed6-417ed113ecf8",
16 "updatedMessage": {
17 "messageType": "StaticContentMessage",
18 "inReplyToMessageId": "b121d04b-39c5-42c8-9f64-5ec44e1c9c43",
19 "customHandlingType": null,
20 "id": "b121d04b-39c5-42c8-9f64-5ec44e1c9c43",
21 "references": [
22 {
23 "recordId": "068fi700000DiMb",
24 "id": "35f5ad29-399a-4316-b138-369714c8ce56"
25 }
26 ],
27 "contentCategory": null,
28 "staticContent": {
29 "formatType": "Attachments",
30 "text": "sdfsf",
31 "attachments": [
32 {
33 "name": "Screenshot 2026-02-04 at 4.06.15 PM.png",
34 "attachmentUploadResult": {
35 "resultType": "CompletedAttachmentUploadResult"
36 },
37 "id": "b121d04b-39c5-42c8-9f64-5ec44e1c9c43",
38 "mimeType": "image/png",
39 "url": "/sfc/servlet.shepherd/version/renditionDownload?rendition=PNG&versionId=068fi700000DiMb&operationContext=DELIVERY&contentId=05Tfi700000XBzB&page=0",
40 "referenceId": "35f5ad29-399a-4316-b138-369714c8ce56"
41 }
42 ]
43 }
44 }
45 },
46 "modality": "Messaging",
47 "sender": {
48 "appType": "conversation",
49 "subject": "005fi700000hYqX",
50 "role": "System"
51 },
52 "recipients": {
53 "secondary": null,
54 "hidden": null,
55 "primary": null
56 },
57 "transcriptedTimestamp": 1773161879434,
58 "clientTimestamp": 1773161879434,
59 "clientDuration": 0,
60 "parentId": ""
61 }
62}1{
2 "recipient": {
3 "appType": "custom",
4 "subject": "test1242311",
5 "role": "EndUser"
6 },
7 "conversationIdentifier": "045bcdd6-ede0-49f8-86bb-69878ec5ba11",
8 "channelAddressIdentifier": "d336cedd-1c08-45ba-81bb-aed6c133a236",
9 "payload": {
10 "senderDisplayName": "Automated Process",
11 "identifier": "3b6b843c-0fcd-446e-a70e-bddc20389d60",
12 "entryType": "MessageUpdated",
13 "entryPayload": {
14 "entryType": "MessageUpdated",
15 "id": "3b6b843c-0fcd-446e-a70e-bddc20389d60",
16 "updatedMessage": {
17 "messageType": "StaticContentMessage",
18 "inReplyToMessageId": "76776ef1-1dc7-48e4-8e30-8ec84c85021e",
19 "id": "76776ef1-1dc7-48e4-8e30-8ec84c85021e",
20 "staticContent": {
21 "formatType": "Attachments",
22 "text": "test smaller content length ",
23 "attachments": [
24 {
25 "name": "Screenshot 2025-02-27 at 1.54.58 PM.png",
26 "attachmentUploadResult": {
27 "resultType": "ErrorAttachmentUploadResult",
28 "errorMessage": "Error downloading file: 1790094797-341060 (818093790)",
29 "errorType": "InternalServerError"
30 },
31 "id": "76776ef1-1dc7-48e4-8e30-8ec84c85021e",
32 "mimeType": "application/octet-stream",
33 "url": "https://sdb6byo-dev-ed.develop.test1.my.pc-rnd.salesforce.com/img/conversation/spinner_120.png",
34 "referenceId": null
35 }
36 ]
37 }
38 }
39 },
40 "sender": {
41 "appType": "conversation",
42 "subject": "005SG000003Xsxa",
43 "role": "System"
44 },
45 "transcriptedTimestamp": 1741117720945,
46 "clientTimestamp": 1741117720945,
47 "clientDuration": 0
48 }
49}ParticipantChanged Event
Whenever a rep leaves or joins a conversation, a ParticipantChanged event fires. The event payload specifies whether it was a remove or add operation. Partners can build optional Messaging session clean up logic by consuming and handling these events.
ParticipantChanged Event Sample Payloads
1{
2 "eventType": "Interaction",
3 "payload": {
4 "recipient": {
5 "appType": "custom",
6 "subject": "dena1",
7 "role": "EndUser"
8 },
9 "conversationIdentifier": "1ff84ce1-0d98-448f-8630-65eb91abae4a",
10 "channelAddressIdentifier": "ffb90fa9-b541-4f18-82f6-3e6d7372ffd6",
11 "payload": {
12 "senderDisplayName": "Automated Process",
13 "identifier": "6bd987a2-573a-442f-b62c-65adc437748f",
14 "entryType": "ParticipantChanged",
15 "entryPayload": {
16 "entryType": "ParticipantChanged",
17 "id": "6bd987a2-573a-442f-b62c-65adc437748f",
18 "entries": [
19 {
20 "operation": "remove",
21 "menuMetadata": null,
22 "supportedModalities": null,
23 "participant": {
24 "appType": "agent",
25 "subject": "005fi700000hS5x",
26 "role": "Agent"
27 },
28 "displayName": "OrgFarm E"
29 }
30 ],
31 "activeModalities": ["Messaging"]
32 },
33 "modality": "Messaging",
34 "sender": {
35 "appType": "conversation",
36 "subject": "005fi700000hYqX",
37 "role": "System"
38 },
39 "recipients": {
40 "secondary": null,
41 "hidden": null,
42 "primary": null
43 },
44 "transcriptedTimestamp": 1772491823140,
45 "clientTimestamp": 1772491823140,
46 "clientDuration": 0
47 }
48 }
49}1{
2 "eventType": "Interaction",
3 "payload": {
4 "recipient": {
5 "appType": "custom",
6 "subject": "meu776",
7 "role": "EndUser"
8 },
9 "conversationIdentifier": "12831257-d663-4cdf-93f3-c92d0c80cd95",
10 "channelAddressIdentifier": "ffb90fa9-b541-4f18-82f6-3e6d7372ffd6",
11 "payload": {
12 "senderDisplayName": "Automated Process",
13 "identifier": "5aca071c-275d-4412-933c-2a4faf500d67",
14 "entryType": "ParticipantChanged",
15 "entryPayload": {
16 "entryType": "ParticipantChanged",
17 "id": "5aca071c-275d-4412-933c-2a4faf500d67",
18 "entries": [
19 {
20 "operation": "add",
21 "menuMetadata": null,
22 "supportedModalities": null,
23 "participant": {
24 "appType": "agent",
25 "subject": "005fi700000hS5x",
26 "role": "Agent"
27 },
28 "displayName": "OrgFarm E"
29 }
30 ],
31 "activeModalities": ["Messaging"]
32 },
33 "modality": "Messaging",
34 "sender": {
35 "appType": "conversation",
36 "subject": "005fi700000hYqX",
37 "role": "System"
38 },
39 "recipients": {
40 "secondary": null,
41 "hidden": null,
42 "primary": null
43 },
44 "transcriptedTimestamp": 1772485927971,
45 "clientTimestamp": 1772485927971,
46 "clientDuration": 0
47 }
48 }
49}See Also
GitHub: Outbound Custom Event Payloads
Let us know so we can improve!