# Transactional Email Events

The Event Notification Service supports these event notification types and their corresponding payloads.

| Notification Event Type                | Description                                                   |
| -------------------------------------- | ------------------------------------------------------------- |
| `TransactionalSendEvents.EmailSent`    | Indicates that the email was sent to the email provider.      |
| `TransactionalSendEvents.EmailNotSent` | Indicates that the email wasn't sent and includes the reason. |
| `TransactionalSendEvents.EmailBounced` | Indicates that the email bounced and includes the reason.     |

## Common Event Attributes

All or some of these attributes are shared for all event data payloads.

| Attribute           | Type   | Description                                                   |
| ------------------- | ------ | ------------------------------------------------------------- |
| `eventCategoryType` | string | The taxonomy of the event                                     |
| `timestampUTC`      | number | UTC Epoch time                                                |
| `compositeId`       | string | Internal tracking ID (deprecated)                             |
| `composite`         | object | Object containing broken down composite ID                    |
| `composite.jobId`   | string | The unique job ID.                                            |
| `composite.batchId` | string | The unique batch ID.                                          |
| `composite.listId`  | string | The unique list ID.                                           |
| `definitionKey`     | string | Send Definition Customer Key (Transactional Sent Events Only) |
| `definitionId`      | string | Send Definition Id (Transactional Sent Events Only)           |
| `mid`               | number | Tenant Business Unit Id event was produced from               |
| `eid`               | number | Tenant Enterprise Id event was produced from                  |
| `info`              | object | Object containing event-specific details                      |

## Transactional Email Sent Event

This event notification payload is an example of what your callback receives for a `TransactionalSendEvents.EmailSent` event.

| Attribute       | Type   | Description                              |
| --------------- | ------ | ---------------------------------------- |
| to              | string | The recipient's email address            |
| subscriberKey   | string | The unique ID of the recipient           |
| messageKey      | string | Object containing event-specific details |
| status          | string | Result of the Sent Event                 |
| renderedSubject | string | The subject line after personalization   |

### Transactional Email Sent Payload Example

```@json
{
  "eventCategoryType": "TransactionalSendEvents.EmailSent",
  "timestampUTC": 1600698608530,
  "compositeId": "466651f2-9c28-e911-a261-78e3b50b4f00.2001070.44609.4153.1251508322",
  "composite": {
    "jobId": "2001070",
    "batchId": "4153",
    "listId": "44609",
    "subscriberId": "1251508322",
    "emailId": "182583"
  },
  "definitionKey": "makana-appt",
  "mid": 1447640,
  "eid": 1447640,
  "sendClassificationType": "Operational",
  "info": {
    "to": "mduarte.10166.0749@salesforce.exacttargettest.com",
    "subscriberKey": "mduarte.10166.0749@sf.exacttargettest.com",
    "messageKey": "f2b21aa0-fc16-11ea-9bc1-fbf804a5a66e",
    "status": "Sent",
    "renderedSubject": "Don't Forget Your Appointment"
  },
  "definitionId": "466651f2-9c28-e911-a261-78e3b50b4f00"
}
```

## Transactional Email Not Sent Event

This event notification payload is an example of what your callback receives for a TransactionalSendEvents.EmailNotSent event.

### Email Not Sent Info Attributes

| Attribute     | Type   | Description                              |
| ------------- | ------ | ---------------------------------------- |
| to            | string | The recipient's email address            |
| subscriberKey | string | The unique ID of the recipient           |
| messageKey    | string | Object containing event-specific details |
| reason        | string | The descriptive reason                   |
| statusCode    | string | The subscriber error code                |
| statusMessage | string | The subscriber error message             |

### TransactionalSendEvents.EmailNotSent Payload Example

```@json
[
  {
    "eventCategoryType": "TransactionalSendEvents.EmailNotSent",
    "timestampUTC": 1600630238373,
    "compositeId": "3d9ee7e3-57f1-e911-a2d6-1402ec8faa09.1722202.69399.0.0",
    "definitionKey": "makana-appt",
    "mid": 1476456,
    "eid": 1476266,
    "info": {
      "to": "mduarte.10166.0749@sf.exacttargettest.com",
      "subscriberKey": "101660749",
      "messageKey": "c3896725-6847-40bd-9217-dda17ee6cba2",
      "reason": "The subscriber ExactTarget system status is unsubscribed",
      "statusCode": "1",
      "statusMessage": "Unsubscribed"
    },
    "definitionId": "3d9ee7e3-57f1-e911-a2d6-1402ec8faa09",
    "composite": {
      "jobId": "2001070",
      "batchId": "4153",
      "listId": "44609",
      "subscriberId": "1251508322",
      "emailId": "182583"
    }
  }
]
```

## Transactional Email Bounced Event

This event notification payload is an example of what your callback receives for a `TransactionalSendEvents.EmailBounced` event.

| Attribute       | Type   | Description                                           |
| --------------- | ------ | ----------------------------------------------------- |
| `to`            | string | The recipient's email address                         |
| `subscriberKey` | string | The unique ID of the recipient                        |
| `messageKey`    | string | Object containing event-specific details              |
| `bounceCode`    | string | The type of bounce - "HARD" or "SOFT"                 |
| `bounceMessage` | string | The string from the recipient email send the provider |
| `smtpReason`    | string | The error value of the SMTP reason                    |

```@json
[
  {
    "eventCategoryType": "TransactionalSendEvents.EmailBounced",
    "timestampUTC": 1583849944000,
    "compositeId": "9bcfe8e8-5a3b-e911-a2c7-1402ec83d7c0.1888699.69238.29.207500672",
    "definitionKey": "makana-appt",
    "mid": 1476456,
    "eid": 1476266,
    "info": {
      "to": "mduarte.10166.0749@sf.exacttargettest.com",
      "subscriberKey": "5bed12d54c74fd93ee1de599",
      "messageKey": "hJlMt8-fckKT4silLiVusA",
      "bounceCode": "HARD",
      "bounceMessage": "5.1.1 (bad destination mailbox address) User Unknown",
      "smtpReason": "5.1.1"
    },
    "definitionId": "9bcfe8e8-5a3b-e911-a2c7-1402ec83d7c0",
    "composite": {
      "jobId": "2001070",
      "batchId": "4153",
      "listId": "44609",
      "subscriberId": "1251508322",
      "emailId": "297967"
    }
  }
]
```
