Azure Communication Services - Advanced Messaging events
This article provides the properties and schema for communication services advanced messaging events. For an introduction to event schemas, see Azure Event Grid event schema.
Event types
Azure Communication Services emits the following Advanced Messaging event types:
Event type | Description |
---|---|
Microsoft.Communication.AdvancedMessageReceived | Published when Communication Service receives a WhatsApp message. |
Microsoft.Communication.AdvancedMessageDeliveryStatusUpdated | Published when the WhatsApp sends status of message notification as sent/read/failed. |
Event responses
When an event is triggered, the Event Grid service sends data about that event to subscribing endpoints.
This section contains an example of what that data would look like for each event.
Microsoft.Communication.AdvancedMessageReceived event
[{
"id": "fdc64eca-390d-4974-abd6-1a13ccbe3160",
"topic": "/subscriptions/{subscription-id}/resourcegroups/{resourcegroup-name}/providers/microsoft.communication/communicationservices/acsxplatmsg-test",
"subject": "advancedMessage/sender/{sender@id}/recipient/00000000-0000-0000-0000-000000000000",
"data": {
"content": "Hello",
"channelType": "whatsapp",
"from": "{sender@id}",
"to": "00000000-0000-0000-0000-000000000000",
"receivedTimestamp": "2023-07-06T18:30:19+00:00"
},
"eventType": "Microsoft.Communication.AdvancedMessageReceived",
"dataVersion": "1.0",
"metadataVersion": "1",
"eventTime": "2023-07-06T18:30:22.1921716Z"
}]
Microsoft.Communication.AdvancedMessageDeliveryStatusUpdated event
[{
"id": "48cd6446-01dd-479f-939c-171c86c46700",
"topic": "/subscriptions/{subscription-id}/resourcegroups/{resourcegroup-name}/providers/microsoft.communication/communicationservices/acsxplatmsg-test",
"subject": "advancedMessage/00000000-0000-0000-0000-000000000000/status/Failed",
"data": {
"messageId": "00000000-0000-0000-0000-000000000000",
"status": "Sent",
"channelType": "whatsapp",
"from": "{sender@id}",
"to": "{receiver@id}",
"receivedTimestamp": "2023-07-06T18:42:28+00:00"
},
"eventType": "Microsoft.Communication.AdvancedMessageDeliveryStatusUpdated",
"dataVersion": "1.0",
"metadataVersion": "1",
"eventTime": "2023-07-06T18:42:28.8454662Z"
}]
[{
"id": "48cd6446-01dd-479f-939c-171c86c46700",
"topic": "/subscriptions/{subscription-id}/resourcegroups/{resourcegroup-name}/providers/microsoft.communication/communicationservices/acsxplatmsg-test",
"subject": "advancedMessage/00000000-0000-0000-0000-000000000000/status/Failed",
"data": {
"messageId": "00000000-0000-0000-0000-000000000000",
"status": "Failed",
"channelType": "whatsapp",
"from": "{sender@id}",
"to": "{receiver@id}",
"receivedTimestamp": "2023-07-06T18:42:28+00:00",
"error": {
"channelCode": "131026",
"channelMessage": "Message Undeliverable."
}
},
"eventType": "Microsoft.Communication.AdvancedMessageDeliveryStatusUpdated",
"dataVersion": "1.0",
"metadataVersion": "1",
"eventTime": "2023-07-06T18:42:28.8454662Z"
}]
Note
Possible values for Status
are Sent
, Delivered
, Read
and Failed
.
Quickstart
For a quickstart that shows how to subscribe for Advanced Messaging events using web hooks, see Quickstart: Handle Advanced Messaging events.
Povratne informacije
https://aka.ms/ContentUserFeedback.
Stiže uskoro: Tijekom 2024. postupno ćemo ukinuti servis Problemi sa servisom GitHub kao mehanizam za povratne informacije za sadržaj i zamijeniti ga novim sustavom za povratne informacije. Dodatne informacije potražite u članku:Pošaljite i pogledajte povratne informacije za