# Message configuration

Email presets control the subject and message content of notification emails. The email message consists of fixed system-visible fields and optional user-defined fields.

Customize only the fields the preset UI exposes. Fixed fields always appear and cannot be modified.

## Supported payload types

The Email destination supports a single payload type for notifications.

| Payload type | `payload_type` API value | Description                                          |
| ------------ | ------------------------ | ---------------------------------------------------- |
| Email        | `email`                  | Sends an email notification for alert or case events |

## Email payload fields

### Fixed fields

Coralogix manages these fields and they always appear in the email.

The UI hides these fields. They cannot be overridden.

| UI label      | API field name | Rendered output type | Required | Allowed values | Description                                                                            |
| ------------- | -------------- | -------------------- | -------- | -------------- | -------------------------------------------------------------------------------------- |
| Fixed subject | `fixedSubject` | String               | true     | n/a            | The fixed prefix of the email subject. Includes the Coralogix notification identifier. |
| Fixed content | `fixedContent` | String               | true     | n/a            | Default email content containing core alert or case details.                           |

The fixed content includes information such as:

- Name and ID
- Type, priority, and status
- Created and updated time
- Condition and query
- Links to the alert or case in Coralogix

### Customizable fields

Customize these fields in the Email preset UI for each preset.

| UI label       | API field name  | Rendered output type | Required | Allowed values | Description                                                                      |
| -------------- | --------------- | -------------------- | -------- | -------------- | -------------------------------------------------------------------------------- |
| Subject        | `customSubject` | String               | false    | n/a            | Customizable portion of the email subject. Appended to the fixed subject prefix. |
| Custom content | `customContent` | String               | false    | n/a            | Additional content included in the email body. Supports templating.              |

### Subject behavior

The final email subject uses the following format:

```text
[Coralogix <entity> notification] <customSubject>
```

Example rendered subject:

```text
[Coralogix alert notification] Triggered P2 – API latency high
```

If `customSubject` is empty, the system uses only the fixed subject prefix.

### Custom content behavior

Use **Custom content** to add contextual or operational information, such as:

- Service or environment details
- Runbook or dashboard links
- Escalation instructions

The custom content appears alongside the fixed content in the email body.

### Templating support

Custom fields support strict templating using alert and case objects.

Example:

```text
Service: {{ alert.groups.service }}
Environment: {{ alert.groups.environment }}
Alert type: {{ alertDef.type }}
```

### Example message configuration

```json
{
  "customSubject": "Triggered P1 – checkout service errors",
  "customContent": "Runbook: https://runbooks.example.com/checkout\nOwner: SRE team"
}
```

### Notes

- Fixed fields cannot be removed or overridden
- Email attachments are not supported
- Message content must be plain text or templated text

## Next steps

Integrate Coralogix with ServiceNow to synchronize records from Cases in [ServiceNow](https://coralogix.com/docs/user-guides/notification-center/destination-types/servicenow/index.md).
