|
| 1 | +--- |
| 2 | +title: Azure Communication Services - Email events |
| 3 | +description: This article describes how to use Azure Communication Services as an Event Grid event source for Email Events. |
| 4 | +ms.topic: conceptual |
| 5 | +ms.date: 09/30/2022 |
| 6 | +ms.author: anmolbohra |
| 7 | +--- |
| 8 | + |
| 9 | +# Azure Communication Services - Email events |
| 10 | + |
| 11 | +This article provides the properties and schema for communication services telephony and SMS events. For an introduction to event schemas, see [Azure Event Grid event schema](event-schema.md). |
| 12 | + |
| 13 | +## Events types |
| 14 | + |
| 15 | +Azure Communication Services emits the following telephony and SMS event types: |
| 16 | + |
| 17 | +| Event type | Description | |
| 18 | +| ----------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | |
| 19 | +| Microsoft.Communication.EmailDeliveryReportReceived | Published when a delivery report is received for an Email sent by the Communication Service. | |
| 20 | +| Microsoft.Communication.EmailEngagementTrackingReportReceived | Published when the Email sent is either opened or the link, if applicable is clicked. | |
| 21 | + |
| 22 | +## Event responses |
| 23 | + |
| 24 | +When an event is triggered, the Event Grid service sends data about that event to subscribing endpoints. |
| 25 | + |
| 26 | +This section contains an example of what that data would look like for each event. |
| 27 | + |
| 28 | +### Microsoft.Communication.EmailDeliveryReportReceived event |
| 29 | + |
| 30 | +```json |
| 31 | +[{ |
| 32 | + "id": "00000000-0000-0000-0000-000000000000", |
| 33 | + "topic": "/subscriptions/{subscription-id}/resourceGroups/{group-name}/providers/microsoft.communication/communicationservices/{communication-services-resource-name}", |
| 34 | + "subject": "sender/[email protected]/message/00000000-0000-0000-0000-000000000000", |
| 35 | + "data": { |
| 36 | + |
| 37 | + |
| 38 | + "messageId": "00000000-0000-0000-0000-000000000000", |
| 39 | + "status": "Delivered", |
| 40 | + "DeliveryStatusDetails": "No error.", |
| 41 | + "ReceivedTimestamp": "2020-09-18T00:22:20.2855749Z", |
| 42 | + }, |
| 43 | + "eventType": "Microsoft.Communication.EmailDeliveryReportReceived", |
| 44 | + "dataVersion": "1.0", |
| 45 | + "metadataVersion": "1", |
| 46 | + "eventTime": "2020-09-18T00:22:20Z" |
| 47 | +}] |
| 48 | +``` |
| 49 | + |
| 50 | +> [!NOTE] |
| 51 | +> Possible values for `Status` are `Delivered`, `Expanded` and `Failed`. |
| 52 | +
|
| 53 | +### Microsoft.Communication.EmailEngagementTrackingReportReceived event |
| 54 | + |
| 55 | +```json |
| 56 | +[{ |
| 57 | + "id": "00000000-0000-0000-0000-000000000000", |
| 58 | + "topic": "/subscriptions/{subscription-id}/resourceGroups/{group-name}/providers/microsoft.communication/communicationservices/{communication-services-resource-name}", |
| 59 | + "subject": "sender/[email protected]/message/00000000-0000-0000-0000-000000000000", |
| 60 | + "data": { |
| 61 | + |
| 62 | + "messageId": "00000000-0000-0000-0000-000000000000", |
| 63 | + "userActionTimeStamp": "2022-09-06T22:34:52.1303595+00:00", |
| 64 | + "engagementContext": "", |
| 65 | + "userAgent": "", |
| 66 | + "engagementType": "view" |
| 67 | + }, |
| 68 | + "eventType": "Microsoft.Communication.EmailEngagementTrackingReportReceived", |
| 69 | + "dataVersion": "1.0", |
| 70 | + "metadataVersion": "1", |
| 71 | + "eventTime": "2022-09-06T22:34:52.1303612Z" |
| 72 | +}] |
| 73 | +``` |
| 74 | + |
| 75 | +> [!NOTE] |
| 76 | +> Possible values for `engagementType` are `View`, and `Click`. When the `engagementType` is `Click`, `engagementContext` is the link in the Email sent which was clicked. |
0 commit comments